Fix direct write with respect to inode locking
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: Fold generic_write_checks() in btrfs_write_check()fs/ | +17 | 3 replies | |
| 2/2 | btrfs: Make btrfs_direct_write atomic with respect to inode_lockfs/ | +30 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Nikolay Borisov |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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