Reduce scope of extent locking while reading
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: clear folio writeback after completing ordered rangefs/ | +2 | 0 replies | |
| 2/2 | btrfs: take extent lock only while reading extent mapfs/ fs/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Reduce scope of extent locking while reading
From: Goldwyn Rodrigues <[email protected]>
Extent locking is not required for the entire read process. Once the extent map is read all information to retrieve is available in the extent map, and is cached in em_cached for later retrieval. The extent map cached is also refcounted so it would not disappear. Limit the extent locking while reading the extnet maps only. The rest is just creating bio and fetching/decompressing the data according to the extent map provided.
The only reason this was not working is because we would get EIO as the CRCs would not match (or were not committed to disk as yet) for folios that were written and released. In order to get over it, mark the extent as finished only after all folios are cleared of writeback.
I have run the xfstests on it without any deadlocks or corruptions. However, a fresh outlook on what could go wrong with a limiting the scope of locks would be good.
Goldwyn Rodrigues (2):
btrfs: clear folio writeback after completing ordered range
btrfs: take extent lock only while reading extent map
fs/btrfs/compression.c | 5 --- fs/btrfs/extent_io.c | 99 +++--------------------------------------- 2 files changed, 7 insertions(+), 97 deletions(-)
Signature · 1 line
2.46.0