summaryrefslogtreecommitdiff
path: root/rust/helpers/err.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2024-01-15 22:46:00 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-25 02:10:29 +0300
commitb9b0494017b5f6d0664ecbcd2d8870800f045581 (patch)
treeac3fe141e72f1fea41223d11e029cb51bc1956f3 /rust/helpers/err.c
parent2d55a637095d0eaaad609b8a518589ead34487b3 (diff)
downloadlinux-b9b0494017b5f6d0664ecbcd2d8870800f045581.tar.xz
bcachefs: add fiemap delalloc extent detection
bcachefs currently populates fiemap data from the extents btree. This works correctly when the fiemap sync flag is provided, but if not, it skips all delalloc extents that have not yet been flushed. This is because delalloc extents from buffered writes are first stored as reservation in the pagecache, and only become resident in the extents btree after writeback completes. Update the fiemap implementation to process holes between extents by scanning pagecache for data, via seek data/hole. If a valid data range is found over a hole in the extent btree, fake up an extent key and flag the extent as delalloc for reporting to userspace. Note that this does not necessarily change behavior for the case where there is dirty pagecache over already written extents, where when in COW mode, writeback will allocate new blocks for the underlying ranges. The existing behavior is consistent with btrfs and it is recommended to use the sync flag for the most up to date extent state from fiemap. Signed-off-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'rust/helpers/err.c')
0 files changed, 0 insertions, 0 deletions