mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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 <ryan@iXsystems.com> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Brian Atkinson <batkinson@lanl.gov> Closes #11438
This commit is contained in:
+3
-3
@@ -1502,7 +1502,7 @@ sa_lookup(sa_handle_t *hdl, sa_attr_type_t attr, void *buf, uint32_t buflen)
|
||||
|
||||
#ifdef _KERNEL
|
||||
int
|
||||
sa_lookup_uio(sa_handle_t *hdl, sa_attr_type_t attr, uio_t *uio)
|
||||
sa_lookup_uio(sa_handle_t *hdl, sa_attr_type_t attr, zfs_uio_t *uio)
|
||||
{
|
||||
int error;
|
||||
sa_bulk_attr_t bulk;
|
||||
@@ -1515,8 +1515,8 @@ sa_lookup_uio(sa_handle_t *hdl, sa_attr_type_t attr, uio_t *uio)
|
||||
|
||||
mutex_enter(&hdl->sa_lock);
|
||||
if ((error = sa_attr_op(hdl, &bulk, 1, SA_LOOKUP, NULL)) == 0) {
|
||||
error = uiomove((void *)bulk.sa_addr, MIN(bulk.sa_size,
|
||||
uio_resid(uio)), UIO_READ, uio);
|
||||
error = zfs_uiomove((void *)bulk.sa_addr, MIN(bulk.sa_size,
|
||||
zfs_uio_resid(uio)), UIO_READ, uio);
|
||||
}
|
||||
mutex_exit(&hdl->sa_lock);
|
||||
return (error);
|
||||
|
||||
Reference in New Issue
Block a user