summaryrefslogtreecommitdiff
path: root/lib/xarray.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2025-07-09 16:34:20 +0100
committerDavid Sterba <dsterba@suse.com>2025-07-22 00:09:22 +0200
commit240fafaa4400f7c577a5e8e40c496663da0e0798 (patch)
tree4760597a9ddfcd185a4eb3cd396b15275470ef8e /lib/xarray.c
parent68e0fcc3617b7a61ab93eeb6d8b935046d152685 (diff)
btrfs: make btrfs_check_nocow_lock() check more than one extent
Currently btrfs_check_nocow_lock() stops at the first extent it finds and that extent may be smaller than the target range we want to NOCOW into. But we can have multiple consecutive extents which we can NOCOW into, so by stopping at the first one we find we just make the caller do more work by splitting the write into multiple ones, or in the case of mmap writes with large folios we fail with -ENOSPC in case the folio's range is covered by more than one extent (the fallback to NOCOW for mmap writes in case there's no available data space to reserve/allocate was recently added by the patch "btrfs: fix -ENOSPC mmap write failure on NOCOW files/extents"). Improve on this by checking for multiple consecutive extents. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'lib/xarray.c')
0 files changed, 0 insertions, 0 deletions