aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-08-04 10:28:38 +1000
committerBrian Behlendorf <[email protected]>2024-09-18 11:23:50 -0700
commit72be1f4062ae3e7cf02b9bcdc2ddd0e85ab927ca (patch)
treeb81c08e3555a8bd32dfac6602aa7160f0ed28c9c /module/os/linux
parentf3d30f1ce0d445e5cdab8f3e5cbfa75b9677014d (diff)
config: remove HAVE_VFS_RW_ITERATE
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #16479
Diffstat (limited to 'module/os/linux')
-rw-r--r--module/os/linux/zfs/zpl_file.c116
1 files changed, 0 insertions, 116 deletions
diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c
index 428afac44..0c9e6f94e 100644
--- a/module/os/linux/zfs/zpl_file.c
+++ b/module/os/linux/zfs/zpl_file.c
@@ -240,8 +240,6 @@ zpl_file_accessed(struct file *filp)
}
}
-#if defined(HAVE_VFS_RW_ITERATE)
-
/*
* When HAVE_VFS_IOV_ITER is defined the iov_iter structure supports
* iovecs, kvevs, bvecs and pipes, plus all the required interfaces to
@@ -342,91 +340,6 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from)
return (wrote);
}
-#else /* !HAVE_VFS_RW_ITERATE */
-
-static ssize_t
-zpl_aio_read(struct kiocb *kiocb, const struct iovec *iov,
- unsigned long nr_segs, loff_t pos)
-{
- cred_t *cr = CRED();
- fstrans_cookie_t cookie;
- struct file *filp = kiocb->ki_filp;
- size_t count;
- ssize_t ret;
-
- ret = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
- if (ret)
- return (ret);
-
- zfs_uio_t uio;
- zfs_uio_iovec_init(&uio, iov, nr_segs, kiocb->ki_pos, UIO_USERSPACE,
- count, 0);
-
- crhold(cr);
- cookie = spl_fstrans_mark();
-
- ret = -zfs_read(ITOZ(filp->f_mapping->host), &uio,
- flip->f_flags | zfs_io_flags(kiocb), cr);
-
- spl_fstrans_unmark(cookie);
- crfree(cr);
-
- if (ret < 0)
- return (ret);
-
- ssize_t read = count - uio.uio_resid;
- kiocb->ki_pos += read;
-
- zpl_file_accessed(filp);
-
- return (read);
-}
-
-static ssize_t
-zpl_aio_write(struct kiocb *kiocb, const struct iovec *iov,
- unsigned long nr_segs, loff_t pos)
-{
- cred_t *cr = CRED();
- fstrans_cookie_t cookie;
- struct file *filp = kiocb->ki_filp;
- struct inode *ip = filp->f_mapping->host;
- size_t count;
- ssize_t ret;
-
- ret = generic_segment_checks(iov, &nr_segs, &count, VERIFY_READ);
- if (ret)
- return (ret);
-
- ret = generic_write_checks(filp, &pos, &count, S_ISBLK(ip->i_mode));
- if (ret)
- return (ret);
-
- kiocb->ki_pos = pos;
-
- zfs_uio_t uio;
- zfs_uio_iovec_init(&uio, iov, nr_segs, kiocb->ki_pos, UIO_USERSPACE,
- count, 0);
-
- crhold(cr);
- cookie = spl_fstrans_mark();
-
- ret = -zfs_write(ITOZ(ip), &uio,
- filp->f_flags | zfs_io_flags(kiocb), cr);
-
- spl_fstrans_unmark(cookie);
- crfree(cr);
-
- if (ret < 0)
- return (ret);
-
- ssize_t wrote = count - uio.uio_resid;
- kiocb->ki_pos += wrote;
-
- return (wrote);
-}
-
-#endif /* HAVE_VFS_RW_ITERATE */
-
static ssize_t
zpl_direct_IO_impl(void)
{
@@ -440,7 +353,6 @@ zpl_direct_IO_impl(void)
return (0);
}
-#if defined(HAVE_VFS_RW_ITERATE)
#if defined(HAVE_VFS_DIRECT_IO_ITER)
static ssize_t
zpl_direct_IO(struct kiocb *kiocb, struct iov_iter *iter)
@@ -463,27 +375,6 @@ zpl_direct_IO(int rw, struct kiocb *kiocb, struct iov_iter *iter, loff_t pos)
#error "Unknown Direct I/O interface"
#endif
-#else /* HAVE_VFS_RW_ITERATE */
-
-#if defined(HAVE_VFS_DIRECT_IO_IOVEC)
-static ssize_t
-zpl_direct_IO(int rw, struct kiocb *kiocb, const struct iovec *iov,
- loff_t pos, unsigned long nr_segs)
-{
- return (zpl_direct_IO_impl());
-}
-#elif defined(HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET)
-static ssize_t
-zpl_direct_IO(int rw, struct kiocb *kiocb, struct iov_iter *iter, loff_t pos)
-{
- return (zpl_direct_IO_impl());
-}
-#else
-#error "Unknown Direct I/O interface"
-#endif
-
-#endif /* HAVE_VFS_RW_ITERATE */
-
static loff_t
zpl_llseek(struct file *filp, loff_t offset, int whence)
{
@@ -1250,7 +1141,6 @@ const struct file_operations zpl_file_operations = {
.open = zpl_open,
.release = zpl_release,
.llseek = zpl_llseek,
-#ifdef HAVE_VFS_RW_ITERATE
#ifdef HAVE_NEW_SYNC_READ
.read = new_sync_read,
.write = new_sync_write,
@@ -1265,12 +1155,6 @@ const struct file_operations zpl_file_operations = {
#endif
.splice_write = iter_file_splice_write,
#endif
-#else
- .read = do_sync_read,
- .write = do_sync_write,
- .aio_read = zpl_aio_read,
- .aio_write = zpl_aio_write,
-#endif
.mmap = zpl_mmap,
.fsync = zpl_fsync,
#ifdef HAVE_FILE_AIO_FSYNC