Hi all, This is mostly equivalent to v3 except that bch2_fiemap_hole() now implements a do_drop_locks() style pattern to manage locking order between folios and the extent tree. The pagecache scan is factored out into a new helper to facilitate the retry.
Patches also available in my test branch: https://evilpiepirate.org/~testdashboard/ci?branch=bfoster Brian v4: - Implement a do_drop_locks() like pattern in bch2_fiemap_hole() to avoid deadlock and livelock or excessive spinning. v3: https://lore.kernel.org/linux-bcachefs/[email protected]/ - Use nonblocking pagecache seek to address extent btree vs. folio deadlocks. v2: https://lore.kernel.org/linux-bcachefs/[email protected]/ - Clean up bch2_fiemap() a bit to use processing helpers. - Added patch for sync flag fixup. v1: https://lore.kernel.org/linux-bcachefs/[email protected]/ 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 | 207 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 166 insertions(+), 41 deletions(-) -- 2.44.0
