mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Removing old code outside of 4.18 kernsls
There were checks still in place to verify we could completely use iov_iter's on the Linux side. All interfaces are available as of kernel 4.18, so there is no reason to check whether we should use that interface at this point. This PR completely removes the UIO_USERSPACE type. It also removes the check for the direct_IO interface checks. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Brian Atkinson <batkinson@lanl.gov> Closes #16856
This commit is contained in:
committed by
Brian Behlendorf
parent
b57f53036d
commit
1862c1c0a8
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
#define UIO_DIRECT 0x0001 /* Direct I/O request */
|
||||
|
||||
#if defined(HAVE_VFS_IOV_ITER) && defined(HAVE_FAULT_IN_IOV_ITER_READABLE)
|
||||
#if defined(HAVE_FAULT_IN_IOV_ITER_READABLE)
|
||||
#define iov_iter_fault_in_readable(a, b) fault_in_iov_iter_readable(a, b)
|
||||
#endif
|
||||
|
||||
@@ -52,12 +52,9 @@ typedef enum zfs_uio_rw {
|
||||
} zfs_uio_rw_t;
|
||||
|
||||
typedef enum zfs_uio_seg {
|
||||
UIO_USERSPACE = 0,
|
||||
UIO_SYSSPACE = 1,
|
||||
UIO_BVEC = 2,
|
||||
#if defined(HAVE_VFS_IOV_ITER)
|
||||
UIO_ITER = 3,
|
||||
#endif
|
||||
UIO_SYSSPACE = 0,
|
||||
UIO_BVEC = 1,
|
||||
UIO_ITER = 2,
|
||||
} zfs_uio_seg_t;
|
||||
|
||||
/*
|
||||
@@ -72,9 +69,7 @@ typedef struct zfs_uio {
|
||||
union {
|
||||
const struct iovec *uio_iov;
|
||||
const struct bio_vec *uio_bvec;
|
||||
#if defined(HAVE_VFS_IOV_ITER)
|
||||
struct iov_iter *uio_iter;
|
||||
#endif
|
||||
};
|
||||
int uio_iovcnt; /* Number of iovecs */
|
||||
offset_t uio_soffset; /* Starting logical offset */
|
||||
@@ -129,7 +124,7 @@ zfs_uio_iovec_init(zfs_uio_t *uio, const struct iovec *iov,
|
||||
unsigned long nr_segs, offset_t offset, zfs_uio_seg_t seg, ssize_t resid,
|
||||
size_t skip)
|
||||
{
|
||||
ASSERT(seg == UIO_USERSPACE || seg == UIO_SYSSPACE);
|
||||
ASSERT(seg == UIO_SYSSPACE);
|
||||
|
||||
uio->uio_iov = iov;
|
||||
uio->uio_iovcnt = nr_segs;
|
||||
@@ -175,7 +170,6 @@ zfs_uio_bvec_init(zfs_uio_t *uio, struct bio *bio, struct request *rq)
|
||||
memset(&uio->uio_dio, 0, sizeof (zfs_uio_dio_t));
|
||||
}
|
||||
|
||||
#if defined(HAVE_VFS_IOV_ITER)
|
||||
static inline void
|
||||
zfs_uio_iov_iter_init(zfs_uio_t *uio, struct iov_iter *iter, offset_t offset,
|
||||
ssize_t resid, size_t skip)
|
||||
@@ -192,7 +186,6 @@ zfs_uio_iov_iter_init(zfs_uio_t *uio, struct iov_iter *iter, offset_t offset,
|
||||
uio->uio_soffset = uio->uio_loffset;
|
||||
memset(&uio->uio_dio, 0, sizeof (zfs_uio_dio_t));
|
||||
}
|
||||
#endif /* HAVE_VFS_IOV_ITER */
|
||||
|
||||
#if defined(HAVE_ITER_IOV)
|
||||
#define zfs_uio_iter_iov(iter) iter_iov((iter))
|
||||
|
||||
Reference in New Issue
Block a user