Limit scope of extent locks in btrfs_buffered_write()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: btrfs_has_ordered_extent() to check for ordered extent in rangefs/ fs/ | +12 | 1 reply | |
| 2/2 | btrfs: reduce scope of extent locks during buffered writefs/ | +16 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Limit scope of extent locks in btrfs_buffered_write()
From: Goldwyn Rodrigues <[email protected]>
This is in preparation for using iomap for btrfs. It will help in keeping the extent lock limited to iomap_end() function.
The extent locks are taken for a majority of the write sequence. With Josef patches limiting the extent locks to recording extent changes, we can reduce the scope of locking of extent locks during write to only when recording the extent as delalloc. Restrict the locking to btrfs_dirty_pages(). However, the write needs to make sure that there are no pending ordered extents. So, wait for any pending ordered extents before performing the copying of data from userspace.
As for testing, it did go through a round of xfstests without any crash or failure. However, since this touches a crucial part of write, please make sure this is correct especially in terms of data corruption by overwrites/staleness.
Goldwyn Rodrigues (2):
btrfs: btrfs_has_ordered_extent() to check for ordered extent in range
btrfs: reduce scope of extent locks during buffered write
fs/btrfs/file.c | 109 ++++++---------------------------------- fs/btrfs/ordered-data.c | 11 ++++ fs/btrfs/ordered-data.h | 1 + 3 files changed, 28 insertions(+), 93 deletions(-)
Signature · 1 line
2.46.0