diff options
Diffstat (limited to 'module/os/linux/zfs/zfs_uio.c')
-rw-r--r-- | module/os/linux/zfs/zfs_uio.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/module/os/linux/zfs/zfs_uio.c b/module/os/linux/zfs/zfs_uio.c index e435e1a9f..a31d2d7e1 100644 --- a/module/os/linux/zfs/zfs_uio.c +++ b/module/os/linux/zfs/zfs_uio.c @@ -55,7 +55,7 @@ * a non-zero errno on failure. */ static int -uiomove_iov(void *p, size_t n, enum uio_rw rw, struct uio *uio) +zfs_uiomove_iov(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) { const struct iovec *iov = uio->uio_iov; size_t skip = uio->uio_skip; @@ -126,7 +126,7 @@ uiomove_iov(void *p, size_t n, enum uio_rw rw, struct uio *uio) } static int -uiomove_bvec(void *p, size_t n, enum uio_rw rw, struct uio *uio) +zfs_uiomove_bvec(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) { const struct bio_vec *bv = uio->uio_bvec; size_t skip = uio->uio_skip; @@ -160,7 +160,7 @@ uiomove_bvec(void *p, size_t n, enum uio_rw rw, struct uio *uio) #if defined(HAVE_VFS_IOV_ITER) static int -uiomove_iter(void *p, size_t n, enum uio_rw rw, struct uio *uio, +zfs_uiomove_iter(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio, boolean_t revert) { size_t cnt = MIN(n, uio->uio_resid); @@ -182,7 +182,7 @@ uiomove_iter(void *p, size_t n, enum uio_rw rw, struct uio *uio, return (EFAULT); /* - * Revert advancing the uio_iter. This is set by uiocopy() + * Revert advancing the uio_iter. This is set by zfs_uiocopy() * to avoid consuming the uio and its iov_iter structure. */ if (revert) @@ -196,21 +196,21 @@ uiomove_iter(void *p, size_t n, enum uio_rw rw, struct uio *uio, #endif int -uiomove(void *p, size_t n, enum uio_rw rw, struct uio *uio) +zfs_uiomove(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) { if (uio->uio_segflg == UIO_BVEC) - return (uiomove_bvec(p, n, rw, uio)); + return (zfs_uiomove_bvec(p, n, rw, uio)); #if defined(HAVE_VFS_IOV_ITER) else if (uio->uio_segflg == UIO_ITER) - return (uiomove_iter(p, n, rw, uio, B_FALSE)); + return (zfs_uiomove_iter(p, n, rw, uio, B_FALSE)); #endif else - return (uiomove_iov(p, n, rw, uio)); + return (zfs_uiomove_iov(p, n, rw, uio)); } -EXPORT_SYMBOL(uiomove); +EXPORT_SYMBOL(zfs_uiomove); int -uio_prefaultpages(ssize_t n, struct uio *uio) +zfs_uio_prefaultpages(ssize_t n, zfs_uio_t *uio) { struct iov_iter iter, *iterp = NULL; @@ -230,40 +230,40 @@ uio_prefaultpages(ssize_t n, struct uio *uio) #endif return (0); } -EXPORT_SYMBOL(uio_prefaultpages); +EXPORT_SYMBOL(zfs_uio_prefaultpages); /* - * The same as uiomove() but doesn't modify uio structure. + * The same as zfs_uiomove() but doesn't modify uio structure. * return in cbytes how many bytes were copied. */ int -uiocopy(void *p, size_t n, enum uio_rw rw, struct uio *uio, size_t *cbytes) +zfs_uiocopy(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio, size_t *cbytes) { - struct uio uio_copy; + zfs_uio_t uio_copy; int ret; - bcopy(uio, &uio_copy, sizeof (struct uio)); + bcopy(uio, &uio_copy, sizeof (zfs_uio_t)); if (uio->uio_segflg == UIO_BVEC) - ret = uiomove_bvec(p, n, rw, &uio_copy); + ret = zfs_uiomove_bvec(p, n, rw, &uio_copy); #if defined(HAVE_VFS_IOV_ITER) else if (uio->uio_segflg == UIO_ITER) - ret = uiomove_iter(p, n, rw, &uio_copy, B_TRUE); + ret = zfs_uiomove_iter(p, n, rw, &uio_copy, B_TRUE); #endif else - ret = uiomove_iov(p, n, rw, &uio_copy); + ret = zfs_uiomove_iov(p, n, rw, &uio_copy); *cbytes = uio->uio_resid - uio_copy.uio_resid; return (ret); } -EXPORT_SYMBOL(uiocopy); +EXPORT_SYMBOL(zfs_uiocopy); /* * Drop the next n chars out of *uio. */ void -uioskip(uio_t *uio, size_t n) +zfs_uioskip(zfs_uio_t *uio, size_t n) { if (n > uio->uio_resid) return; @@ -292,5 +292,6 @@ uioskip(uio_t *uio, size_t n) uio->uio_loffset += n; uio->uio_resid -= n; } -EXPORT_SYMBOL(uioskip); +EXPORT_SYMBOL(zfs_uioskip); + #endif /* _KERNEL */ |