Skip to content

Rearrange inode locking

Goldwyn Rodrigues linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8btrfs: Move pos increment and pagecache extension to btrfs_buffered_write()fs/btrfs/file.c+5 -80 replies
2/8btrfs: Move FS error state bit early during writefs/btrfs/file.c+9 -122 replies
3/8btrfs: Introduce btrfs_write_check()fs/btrfs/file.c+71 -670 replies
4/8btrfs: Introduce btrfs_inode_lock()/unlock()fs/btrfs/ctree.h fs/btrfs/file.c+50 -95 replies
5/8btrfs: Push inode locking and unlocking in buffered/direct writefs/btrfs/file.c+46 -240 replies
6/8btrfs: Use shared inode lock for direct writes within EOFfs/btrfs/file.c+7 -184 replies
7/8btrfs: Remove dio_semfs/btrfs/btrfs_inode.h fs/btrfs/file.c fs/btrfs/inode.c+0 -250 replies
8/8btrfs: Move generic_write_sync() to btrfs_buffered_write()fs/btrfs/file.c fs/btrfs/inode.c+19 -160 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/8] Rearrange inode locking

This series attempts to arrange inode locking and unlocking to be more aligned to ext4 and xfs, and makes it simpler in logic. The main goal is to have shared inode lock for direct reads and direct writes within EOF to make sure we do not race with truncate.

The advantage is that we get rid of btrfs_inode->dio_sem in the DIO path.

This patch is on top of btrfs-iomap-dio work and survived a run of xfstests.

Git: https://github.com/goldwynr/linux/tree/btrfs-inode-lock

 btrfs_inode.h |   10 -
 ctree.h       |    8 +
 file.c        |  355 +++++++++++++++++++++++++++++++---------------------------
 inode.c       |   13 +-
 4 files changed, 207 insertions(+), 179 deletions(-)
Signature · 1 line
Goldwyn