mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Share zfs_fsync, zfs_read, zfs_write, et al between Linux and FreeBSD
The zfs_fsync, zfs_read, and zfs_write function are almost identical between Linux and FreeBSD. With a little refactoring they can be moved to the common code which is what is done by this commit. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #11078
This commit is contained in:
committed by
Brian Behlendorf
parent
fa7b558bef
commit
3d40b65540
@@ -59,7 +59,6 @@ typedef struct uio {
|
||||
boolean_t uio_fault_disable;
|
||||
uint16_t uio_fmode;
|
||||
uint16_t uio_extflg;
|
||||
offset_t uio_limit;
|
||||
ssize_t uio_resid;
|
||||
size_t uio_skip;
|
||||
} uio_t;
|
||||
@@ -113,6 +112,7 @@ typedef struct xuio {
|
||||
#define uio_iovcnt(uio) (uio)->uio_iovcnt
|
||||
#define uio_iovlen(uio, idx) (uio)->uio_iov[(idx)].iov_len
|
||||
#define uio_iovbase(uio, idx) (uio)->uio_iov[(idx)].iov_base
|
||||
#define uio_fault_disable(uio, set) (uio)->uio_fault_disable = set
|
||||
|
||||
static inline void
|
||||
uio_iov_at_index(uio_t *uio, uint_t idx, void **base, uint64_t *len)
|
||||
|
||||
Reference in New Issue
Block a user