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 /include/sys | |
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 'include/sys')
-rw-r--r-- | include/sys/crypto/common.h | 2 | ||||
-rw-r--r-- | include/sys/dmu.h | 12 | ||||
-rw-r--r-- | include/sys/sa.h | 2 | ||||
-rw-r--r-- | include/sys/uio_impl.h | 8 | ||||
-rw-r--r-- | include/sys/zfs_sa.h | 2 | ||||
-rw-r--r-- | include/sys/zfs_vnops.h | 8 |
6 files changed, 17 insertions, 17 deletions
diff --git a/include/sys/crypto/common.h b/include/sys/crypto/common.h index a4f9d9848..9a239225c 100644 --- a/include/sys/crypto/common.h +++ b/include/sys/crypto/common.h @@ -244,7 +244,7 @@ typedef struct crypto_data { iovec_t cdu_raw; /* Pointer and length */ /* uio scatter-gather format */ - uio_t *cdu_uio; + zfs_uio_t *cdu_uio; } cdu; /* Crypto Data Union */ } crypto_data_t; diff --git a/include/sys/dmu.h b/include/sys/dmu.h index 0c50d0409..ad96b729f 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -847,14 +847,14 @@ void dmu_write_by_dnode(dnode_t *dn, 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); #ifdef _KERNEL -int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size); -int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size); -int dmu_read_uio_dnode(dnode_t *dn, struct uio *uio, uint64_t size); -int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size, +int dmu_read_uio(objset_t *os, uint64_t object, zfs_uio_t *uio, uint64_t size); +int dmu_read_uio_dbuf(dmu_buf_t *zdb, zfs_uio_t *uio, uint64_t size); +int dmu_read_uio_dnode(dnode_t *dn, zfs_uio_t *uio, uint64_t size); +int dmu_write_uio(objset_t *os, uint64_t object, zfs_uio_t *uio, uint64_t size, dmu_tx_t *tx); -int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size, +int dmu_write_uio_dbuf(dmu_buf_t *zdb, zfs_uio_t *uio, uint64_t size, dmu_tx_t *tx); -int dmu_write_uio_dnode(dnode_t *dn, struct uio *uio, uint64_t size, +int dmu_write_uio_dnode(dnode_t *dn, zfs_uio_t *uio, uint64_t size, dmu_tx_t *tx); #endif struct arc_buf *dmu_request_arcbuf(dmu_buf_t *handle, int size); diff --git a/include/sys/sa.h b/include/sys/sa.h index 432e0bc41..98eb8f9cd 100644 --- a/include/sys/sa.h +++ b/include/sys/sa.h @@ -158,7 +158,7 @@ void sa_handle_lock(sa_handle_t *); void sa_handle_unlock(sa_handle_t *); #ifdef _KERNEL -int sa_lookup_uio(sa_handle_t *, sa_attr_type_t, uio_t *); +int sa_lookup_uio(sa_handle_t *, sa_attr_type_t, zfs_uio_t *); int sa_add_projid(sa_handle_t *, dmu_tx_t *, uint64_t); #endif diff --git a/include/sys/uio_impl.h b/include/sys/uio_impl.h index cfef0b95d..be70cea54 100644 --- a/include/sys/uio_impl.h +++ b/include/sys/uio_impl.h @@ -41,9 +41,9 @@ #include <sys/uio.h> -extern int uiomove(void *, size_t, enum uio_rw, uio_t *); -extern int uio_prefaultpages(ssize_t, uio_t *); -extern int uiocopy(void *, size_t, enum uio_rw, uio_t *, size_t *); -extern void uioskip(uio_t *, size_t); +extern int zfs_uiomove(void *, size_t, zfs_uio_rw_t, zfs_uio_t *); +extern int zfs_uio_prefaultpages(ssize_t, zfs_uio_t *); +extern int zfs_uiocopy(void *, size_t, zfs_uio_rw_t, zfs_uio_t *, size_t *); +extern void zfs_uioskip(zfs_uio_t *, size_t); #endif /* _SYS_UIO_IMPL_H */ diff --git a/include/sys/zfs_sa.h b/include/sys/zfs_sa.h index 4e6d28638..1ca7ced33 100644 --- a/include/sys/zfs_sa.h +++ b/include/sys/zfs_sa.h @@ -134,7 +134,7 @@ typedef struct znode_phys { #define DXATTR_MAX_ENTRY_SIZE (32768) #define DXATTR_MAX_SA_SIZE (SPA_OLD_MAXBLOCKSIZE >> 1) -int zfs_sa_readlink(struct znode *, uio_t *); +int zfs_sa_readlink(struct znode *, zfs_uio_t *); void zfs_sa_symlink(struct znode *, char *link, int len, dmu_tx_t *); void zfs_sa_get_scanstamp(struct znode *, xvattr_t *); void zfs_sa_set_scanstamp(struct znode *, xvattr_t *, dmu_tx_t *); diff --git a/include/sys/zfs_vnops.h b/include/sys/zfs_vnops.h index 6bf077b4b..18259f0dc 100644 --- a/include/sys/zfs_vnops.h +++ b/include/sys/zfs_vnops.h @@ -27,16 +27,16 @@ #include <sys/zfs_vnops_os.h> extern int zfs_fsync(znode_t *, int, cred_t *); -extern int zfs_read(znode_t *, uio_t *, int, cred_t *); -extern int zfs_write(znode_t *, uio_t *, int, cred_t *); +extern int zfs_read(znode_t *, zfs_uio_t *, int, cred_t *); +extern int zfs_write(znode_t *, zfs_uio_t *, int, cred_t *); extern int zfs_holey(znode_t *, ulong_t, loff_t *); extern int zfs_access(znode_t *, int, int, cred_t *); extern int zfs_getsecattr(znode_t *, vsecattr_t *, int, cred_t *); extern int zfs_setsecattr(znode_t *, vsecattr_t *, int, cred_t *); -extern int mappedread(znode_t *, int, uio_t *); -extern int mappedread_sf(znode_t *, int, uio_t *); +extern int mappedread(znode_t *, int, zfs_uio_t *); +extern int mappedread_sf(znode_t *, int, zfs_uio_t *); extern void update_pages(znode_t *, int64_t, int, objset_t *); /* |