[PATCH v3 0/4] bcachefs: fiemap delalloc support and cleanup

Brian Foster
2024-04-08T14:46:50Z

Hi all,

Here's v3 of the fiemap delalloc support patches for bcachefs. The main
difference from v2 is that the pagecache seek calls are now using
nonblocking mode to avoid deadlocks between fiemap and the write path.
The write path locks in folio -> extent btree order while fiemap walks
the extent btree and scans for folios in transaction context. Therefore,
the latter must restart the iterating transaction in the event of folio
trylock failure and restart the scan from where it left off.

The series is pushed to CI via my test branch, as usual:

https://evilpiepirate.org/~testdashboard/ci?branch=bfoster

Brian

v3:
- Use nonblocking pagecache seek to address extent btree vs. folio
deadlocks.
v2: https://lore.kernel.org/linux-bcachefs/20240117155611.248042-1-bfoster@redhat.com/
- Clean up bch2_fiemap() a bit to use processing helpers.
- Added patch for sync flag fixup.
v1: https://lore.kernel.org/linux-bcachefs/20231219140215.300753-1-bfoster@redhat.com/

Brian Foster (4):
bcachefs: drop duplicate fiemap sync flag
bcachefs: track current fiemap offset in start variable
bcachefs: refactor fiemap processing into extent helper and struct
bcachefs: add fiemap delalloc extent detection

fs/bcachefs/fs.c | 175 +++++++++++++++++++++++++++++++++++------------
1 file changed, 133 insertions(+), 42 deletions(-)

--
2.44.0