diff options
author | Christoph Hellwig <hch@lst.de> | 2023-06-28 17:31:41 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:16 +0200 |
commit | 6e144bf16ba07dff649e6bd6afd79d2e353f6216 (patch) | |
tree | f1d464dfb857fa57501d00e597f79d26ae8b7cb7 /fs/btrfs/extent_io.c | |
parent | 44962ca37c8cf882ba72e4cd67f30eaecb920a52 (diff) |
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