diff options
author | Brian Foster <bfoster@redhat.com> | 2024-01-15 22:27:49 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-25 02:10:29 +0300 |
commit | 2d55a637095d0eaaad609b8a518589ead34487b3 (patch) | |
tree | 5803dd390ebb3a2a7cf6877bb4315c8e944c909b /rust/helpers/err.c | |
parent | d020a9fb11bd85f4f16392e2a44c46ae9778b3ee (diff) | |
download | linux-2d55a637095d0eaaad609b8a518589ead34487b3.tar.xz |
bcachefs: refactor fiemap processing into extent helper and struct
The bulk of the loop in bch2_fiemap() involves processing the
current extent key from the iter, including following indirections
and trimming the extent size and such. This patch makes a few
changes to reduce the size of the loop and facilitate future changes
to support delalloc extents.
Define a new bch_fiemap_extent structure to wrap the bkey buffer
that holds the extent key to report to userspace along with
associated fiemap flags. Update bch2_fill_extent() to take the
bch_fiemap_extent as a param instead of the individual fields.
Finally, lift the bulk of the extent processing into a
bch2_fiemap_extent() helper that takes the current key and formats
the bch_fiemap_extent appropriately for the fill function.
No functional changes intended by this patch.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'rust/helpers/err.c')
0 files changed, 0 insertions, 0 deletions