Skip to content

RFC Btrfs: stop abusing current->journal_info for direct I/O

Omar Sandoval linux-btrfs linux-fsdevel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest6 patches 0 repliesNew
  2. v13 patches 11 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6fs: pass iocb to direct I/O get_block()fs/affs/file.c fs/btrfs/inode.c fs/direct-io.c +14 more+113 -430 replies
2/6ext4: use iocb->private instead of bh->b_privatefs/ext4/inode.c+4 -60 replies
3/6ocfs2: use iocb->private instead of bh->b_privatefs/ocfs2/aops.c fs/ocfs2/aops.h+54 -290 replies
4/6fs: stop propagating bh->b_private for direct I/Ofs/direct-io.c fs/ext4/inode.c fs/ocfs2/aops.c +1 more+4 -140 replies
5/6fs: pass iocb to direct I/O submit_io()fs/btrfs/inode.c fs/direct-io.c include/linux/fs.h+6 -50 replies
6/6Btrfs: stop abusing current->journal_info in btrfs_direct_IO()fs/btrfs/inode.c+6 -230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/6] Btrfs: stop abusing current->journal_info for direct I/O

From: Omar Sandoval <[email protected]>

Hi,

This is a different approach from v1 [1] of this series to stop abusing current->journal_info in Btrfs. This approach unifies everything to use iocb->private instead of map_bh->b_private. Patches 1 and 5 pass the iocb to a couple of callbacks which need it. Patches 2 and 3 migrates the users of b_private to use iocb->private, and patch 4 gets rid of the b_private handling in the direct I/O code. Patch 6 cleans up Btrfs.

I'm not convinced that this is cleaner that my first approach, but it at least avoids growing the argument list to do_blockdev_direct_IO(), which was Al's complaint of v1.

Thanks!

1: https://www.spinics.net/lists/linux-btrfs/msg77859.html

Omar Sandoval (6):
fs: pass iocb to direct I/O get_block()
ext4: use iocb->private instead of bh->b_private
ocfs2: use iocb->private instead of bh->b_private
fs: stop propagating bh->b_private for direct I/O
fs: pass iocb to direct I/O submit_io()
Btrfs: stop abusing current->journal_info in btrfs_direct_IO()

 fs/affs/file.c      |  9 ++++++-
 fs/btrfs/inode.c    | 36 +++++++------------------
 fs/direct-io.c      | 23 +++++++---------
 fs/ext2/inode.c     |  9 ++++++-
 fs/ext4/ext4.h      |  2 --
 fs/ext4/inode.c     | 40 ++++++++++++++++------------
 fs/f2fs/data.c      |  5 ++--
 fs/fat/inode.c      |  9 ++++++-
 fs/gfs2/aops.c      |  5 ++--
 fs/hfs/inode.c      |  9 ++++++-
 fs/hfsplus/inode.c  |  9 ++++++-
 fs/jfs/inode.c      |  9 ++++++-
 fs/nilfs2/inode.c   |  9 ++++++-
 fs/ocfs2/aops.c     | 39 ++++++++++++++-------------
 fs/ocfs2/aops.h     | 64 ++++++++++++++++++++++++++++++---------------
 fs/reiserfs/inode.c |  4 +--
 fs/udf/inode.c      |  9 ++++++-
 include/linux/fs.h  | 17 ++++++------
 18 files changed, 187 insertions(+), 120 deletions(-)
Signature · 1 line
2.18.0