Skip to content

Fix direct write with respect to inode locking

Goldwyn Rodrigues linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: Fold generic_write_checks() in btrfs_write_check()fs/btrfs/file.c+17 -163 replies
2/2btrfs: Make btrfs_direct_write atomic with respect to inode_lockfs/btrfs/file.c+30 -251 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchNikolay Borisov
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Fix direct write with respect to inode locking

From: Goldwyn Rodrigues <[email protected]>

In my previous attempt to fix direct I/O using iomap, the inode locks were pushed into respective direct and buffered writes. However, in case of fallback to buffered write, direct-io would release the inode lock and reacquire it for buffered. This can cause corruption if another process acquires the lock in between and writes around the same offset. Change the flow so that the lock is acquired at the begining and release only after the fallback buffered is complete.

Goldwyn Rodrigues (2):
btrfs: Fold generic_write_checks() in btrfs_write_check()
btrfs: Make btrfs_direct_write atomic with respect to inode_lock

 fs/btrfs/file.c | 86 ++++++++++++++++++++++++++-----------------------
 1 file changed, 46 insertions(+), 40 deletions(-)
Signature · 1 line
2.29.2