diff options
author | 2021-09-27 15:21:57 +0800 | |
---|---|---|
committer | 2021-10-26 19:08:04 +0200 | |
commit | b4ccace878f47fd5008de41d45ec42f38d0e8c7d (patch) | |
tree | 4af8f62061f19bd603d443ea5b711a8309aa6f65 /tools/perf/scripts/python | |
parent | btrfs: remove unused function btrfs_bio_fits_in_stripe() (diff) | |
download | wireguard-linux-b4ccace878f47fd5008de41d45ec42f38d0e8c7d.tar.xz wireguard-linux-b4ccace878f47fd5008de41d45ec42f38d0e8c7d.zip |
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 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions