linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET v3 0/3] Convert fs drivers to ->read_iter()
@ 2024-04-09 15:22 Jens Axboe
  2024-04-09 15:22 ` [PATCH 1/4] iov_iter: add copy_to_iter_full() Jens Axboe
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jens Axboe @ 2024-04-09 15:22 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: brauner, linux-kernel, viro

Hi,

There are still a few users of fops->read() in the core parts of the
fs stack. Which is a shame, since it'd be nice to get rid of the
non-iterator parts of down the line, and reclaim that part of the
file_operations struct.

Outside of moving in that direction as a cleanup, using ->read_iter()
enables us to mark them with FMODE_NOWAIT. This is important for users
like io_uring, where per-IO nonblocking hints make a difference in how
efficiently IO can be done.

Those two things are my main motivation for starting this work, with
hopefully more to come down the line.

All patches have been booted and tested, and the corresponding test
cases from ltp have been run.

Since v2:
- Pass appropriate flags to get_unused_fd() and anon_inode_getfile().
  Doesn't change anything, but it does convey more closely what each
  of them look at.
- Add copy_to_iter_full() helper and use it for all conversions

 fs/signalfd.c       | 44 ++++++++++++++++++++++++++++----------------
 fs/timerfd.c        | 33 +++++++++++++++++++++++----------
 fs/userfaultfd.c    | 44 ++++++++++++++++++++++++++++----------------
 include/linux/uio.h | 10 ++++++++++
 4 files changed, 89 insertions(+), 42 deletions(-)

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-11 16:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 15:22 [PATCHSET v3 0/3] Convert fs drivers to ->read_iter() Jens Axboe
2024-04-09 15:22 ` [PATCH 1/4] iov_iter: add copy_to_iter_full() Jens Axboe
2024-04-09 17:06   ` Al Viro
2024-04-09 17:10     ` Jens Axboe
2024-04-09 15:22 ` [PATCH 2/4] timerfd: convert to ->read_iter() Jens Axboe
2024-04-10 22:27   ` Jens Axboe
     [not found]     ` <CGME20240411114048eucas1p21707a2d0bfb9c5a21f3e8aa76c0d82c1@eucas1p2.samsung.com>
2024-04-11 11:40       ` Marek Szyprowski
2024-04-11 16:32         ` Jens Axboe
2024-04-09 15:22 ` [PATCH 3/4] userfaultfd: " Jens Axboe
2024-04-09 15:22 ` [PATCH 4/4] signalfd: " Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).