diff options
author | Brian Atkinson <[email protected]> | 2021-01-20 22:27:30 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-20 21:27:30 -0800 |
commit | d0cd9a5cc65e39feab5631ad4b5c09cf004ad3f0 (patch) | |
tree | f228b2dbb9655257e4f8e85862320ee61cae9ff4 /module/os/linux/zfs/zfs_vnops_os.c | |
parent | e2af2acce3436acdb2b35fdc7c9de1a30ea85514 (diff) |
Extending FreeBSD UIO Struct
In FreeBSD the struct uio was just a typedef to uio_t. In order to
extend this struct, outside of the definition for the struct uio, the
struct uio has been embedded inside of a uio_t struct.
Also renamed all the uio_* interfaces to be zfs_uio_* to make it clear
this is a ZFS interface.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Brian Atkinson <[email protected]>
Closes #11438
Diffstat (limited to 'module/os/linux/zfs/zfs_vnops_os.c')
-rw-r--r-- | module/os/linux/zfs/zfs_vnops_os.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/os/linux/zfs/zfs_vnops_os.c b/module/os/linux/zfs/zfs_vnops_os.c index 3be387a30..15b7f019c 100644 --- a/module/os/linux/zfs/zfs_vnops_os.c +++ b/module/os/linux/zfs/zfs_vnops_os.c @@ -298,7 +298,7 @@ update_pages(znode_t *zp, int64_t start, int len, objset_t *os) * the file is memory mapped. */ int -mappedread(znode_t *zp, int nbytes, uio_t *uio) +mappedread(znode_t *zp, int nbytes, zfs_uio_t *uio) { struct inode *ip = ZTOI(zp); struct address_space *mp = ip->i_mapping; @@ -320,7 +320,7 @@ mappedread(znode_t *zp, int nbytes, uio_t *uio) unlock_page(pp); pb = kmap(pp); - error = uiomove(pb + off, bytes, UIO_READ, uio); + error = zfs_uiomove(pb + off, bytes, UIO_READ, uio); kunmap(pp); if (mapping_writably_mapped(mp)) @@ -372,8 +372,8 @@ zfs_write_simple(znode_t *zp, const void *data, size_t len, iov.iov_base = (void *)data; iov.iov_len = len; - uio_t uio; - uio_iovec_init(&uio, &iov, 1, pos, UIO_SYSSPACE, len, 0); + zfs_uio_t uio; + zfs_uio_iovec_init(&uio, &iov, 1, pos, UIO_SYSSPACE, len, 0); cookie = spl_fstrans_mark(); error = zfs_write(zp, &uio, 0, kcred); @@ -381,8 +381,8 @@ zfs_write_simple(znode_t *zp, const void *data, size_t len, if (error == 0) { if (residp != NULL) - *residp = uio_resid(&uio); - else if (uio_resid(&uio) != 0) + *residp = zfs_uio_resid(&uio); + else if (zfs_uio_resid(&uio) != 0) error = SET_ERROR(EIO); } @@ -3198,7 +3198,7 @@ top: */ /* ARGSUSED */ int -zfs_readlink(struct inode *ip, uio_t *uio, cred_t *cr) +zfs_readlink(struct inode *ip, zfs_uio_t *uio, cred_t *cr) { znode_t *zp = ITOZ(ip); zfsvfs_t *zfsvfs = ITOZSB(ip); |