diff options
author | Qu Wenruo <wqu@suse.com> | 2021-09-27 15:21:57 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-10-26 19:08:04 +0200 |
commit | b4ccace878f47fd5008de41d45ec42f38d0e8c7d (patch) | |
tree | 4af8f62061f19bd603d443ea5b711a8309aa6f65 /fs/btrfs/extent_io.h | |
parent | 6aabd85835dd20808ee289586f5fb2ad1241ce81 (diff) |
btrfs: refactor submit_compressed_extents()
We have a big chunk of code inside a while() loop, with tons of strange
jumps for error handling. It's definitely not to the code standard of
today. Move the code into a new function, submit_one_async_extent().
Since we're here, also do the following changes:
- Comment style change
To follow the current scheme
- Don't fallback to non-compressed write then hitting ENOSPC
If we hit ENOSPC for compressed write, how could we reserve more space
for non-compressed write?
Thus we go error path directly.
This removes the retry: label.
- Add more comment for super long parameter list
Explain which parameter is for, so we don't need to check the
prototype.
- Move the error handling to submit_one_async_extent()
Thus no strange code like:
out_free:
...
goto again;
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
0 files changed, 0 insertions, 0 deletions