Merge commit 'refs/remotes/origin/linux-have-uio-rw' into HEAD
This commit is contained in:
commit
514f9f626c
4
.topmsg
4
.topmsg
|
@ -1,6 +1,6 @@
|
||||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||||
Subject: [PATCH] linux debug zerocopy
|
Subject: [PATCH] linux have uio rw
|
||||||
|
|
||||||
Add debug ONLY option for zerocopy
|
Use uio-rw if HAVE_UIO_RW defined
|
||||||
|
|
||||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||||
|
|
|
@ -675,7 +675,7 @@ dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
dmu_write_impl(os, object, offset, size, buf, tx, 0);
|
dmu_write_impl(os, object, offset, size, buf, tx, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#if defined(_KERNEL) && defined(HAVE_UIO_RW)
|
||||||
int
|
int
|
||||||
dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size)
|
dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -477,11 +477,13 @@ void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
const void *buf, dmu_tx_t *tx);
|
const void *buf, dmu_tx_t *tx);
|
||||||
void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
dmu_tx_t *tx);
|
dmu_tx_t *tx);
|
||||||
|
#if defined(_KERNEL) && defined(HAVE_UIO_RW)
|
||||||
int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size);
|
int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size);
|
||||||
int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size,
|
int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size,
|
||||||
dmu_tx_t *tx);
|
dmu_tx_t *tx);
|
||||||
int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
|
int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
|
||||||
uint64_t size, struct page *pp, dmu_tx_t *tx);
|
uint64_t size, struct page *pp, dmu_tx_t *tx);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int zfs_prefetch_disable;
|
extern int zfs_prefetch_disable;
|
||||||
|
|
||||||
|
|
|
@ -337,8 +337,10 @@ extern void zfs_log_acl(zilog_t *zilog, dmu_tx_t *tx, znode_t *zp,
|
||||||
extern void zfs_xvattr_set(znode_t *zp, xvattr_t *xvap);
|
extern void zfs_xvattr_set(znode_t *zp, xvattr_t *xvap);
|
||||||
extern void zfs_upgrade(zfsvfs_t *zfsvfs, dmu_tx_t *tx);
|
extern void zfs_upgrade(zfsvfs_t *zfsvfs, dmu_tx_t *tx);
|
||||||
|
|
||||||
|
#if defined(HAVE_UIO_RW)
|
||||||
extern caddr_t zfs_map_page(page_t *, enum seg_rw);
|
extern caddr_t zfs_map_page(page_t *, enum seg_rw);
|
||||||
extern void zfs_unmap_page(page_t *, caddr_t);
|
extern void zfs_unmap_page(page_t *, caddr_t);
|
||||||
|
#endif /* HAVE_UIO_RW */
|
||||||
|
|
||||||
extern zil_get_data_t zfs_get_data;
|
extern zil_get_data_t zfs_get_data;
|
||||||
extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE];
|
extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE];
|
||||||
|
|
|
@ -317,6 +317,7 @@ zfs_ioctl(vnode_t *vp, int com, intptr_t data, int flag, cred_t *cred,
|
||||||
return (ENOTTY);
|
return (ENOTTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_KERNEL) && defined(HAVE_UIO_RW)
|
||||||
/*
|
/*
|
||||||
* Utility functions to map and unmap a single physical page. These
|
* Utility functions to map and unmap a single physical page. These
|
||||||
* are used to manage the mappable copies of ZFS file data, and therefore
|
* are used to manage the mappable copies of ZFS file data, and therefore
|
||||||
|
@ -341,6 +342,7 @@ zfs_unmap_page(page_t *pp, caddr_t addr)
|
||||||
ppmapout(addr);
|
ppmapout(addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* _KERNEL && HAVE_UIO_RW */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When a file is memory mapped, we must keep the IO data synchronized
|
* When a file is memory mapped, we must keep the IO data synchronized
|
||||||
|
|
Loading…
Reference in New Issue