diff options
author | Dave Chinner <dchinner@redhat.com> | 2022-11-23 12:40:12 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2022-11-23 12:40:12 +1100 |
commit | b71f889c18ada210a97aa3eb5e00c0de552234c6 (patch) | |
tree | 1d1e345f5a9060de93020e176cccfd5d8e590f48 /fs/iomap | |
parent | 198dd8aedee6a7d2de0dfa739f9a008a938f6848 (diff) | |
download | linux-b71f889c18ada210a97aa3eb5e00c0de552234c6.tar.bz2 |
xfs: use byte ranges for write cleanup ranges
xfs_buffered_write_iomap_end() currently converts the byte ranges
passed to it to filesystem blocks to pass them to the bmap code to
punch out delalloc blocks, but then has to convert filesytem
blocks back to byte ranges for page cache truncate.
We're about to make the page cache truncate go away and replace it
with a page cache walk, so having to convert everything to/from/to
filesystem blocks is messy and error-prone. It is much easier to
pass around byte ranges and convert to page indexes and/or
filesystem blocks only where those units are needed.
In preparation for the page cache walk being added, add a helper
that converts byte ranges to filesystem blocks and calls
xfs_bmap_punch_delalloc_range() and convert
xfs_buffered_write_iomap_end() to calculate limits in byte ranges.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/iomap')
0 files changed, 0 insertions, 0 deletions