summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-28 18:31:41 +0300
committerDavid Sterba <dsterba@suse.com>2023-08-21 15:52:16 +0300
commit6e144bf16ba07dff649e6bd6afd79d2e353f6216 (patch)
treef1d464dfb857fa57501d00e597f79d26ae8b7cb7 /fs/btrfs/extent_io.c
parent44962ca37c8cf882ba72e4cd67f30eaecb920a52 (diff)
downloadlinux-6e144bf16ba07dff649e6bd6afd79d2e353f6216.tar.xz
btrfs: refactor the zoned device handling in cow_file_range
Handling of the done_offset to cow_file_range is a bit confusing, as it is not updated at all when the function succeeds, and the -EAGAIN status is used bother for the case where we need to wait for a zone finish and the one where the allocation was partially successful. Change the calling convention so that done_offset is always updated, and 0 is returned if some allocation was successful (partial allocation can still only happen for zoned devices), and waiting for a zone finish is done internally in cow_file_range instead of the caller. Also write a comment explaining the logic. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
0 files changed, 0 insertions, 0 deletions