Qu Wenruo 203f44c519 btrfs: inode: refactor the parameters of insert_reserved_file_extent()
Function insert_reserved_file_extent() takes a long list of parameters,
which are all for btrfs_file_extent_item, even including two reserved
members, encryption and other_encoding.

This makes the parameter list unnecessary long for a function which only
gets called twice.

This patch will refactor the parameter list, by using
btrfs_file_extent_item as parameter directly to hugely reduce the number
of parameters.

Also, since there are only two callers, one in btrfs_finish_ordered_io()
which inserts file extent for ordered extent, and one
__btrfs_prealloc_file_range().

These two call sites have completely different context, where ordered
extent can be compressed, but will always be regular extent, while the
preallocated one is never going to be compressed and always has PREALLOC
type.

So use two small wrapper for these two different call sites to improve
readability.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-07-27 12:55:23 +02:00
..
2020-03-23 17:02:00 +01:00
2020-07-07 14:10:33 -07:00
2020-05-25 11:25:36 +02:00
2020-05-25 11:25:37 +02:00
2020-07-24 14:11:43 -07:00
2019-11-18 23:43:44 +01:00
2020-03-23 17:01:43 +01:00
2020-01-20 16:40:55 +01:00
2020-05-25 11:25:37 +02:00
2019-11-18 17:51:51 +01:00
2020-05-25 11:25:36 +02:00
2020-06-02 19:59:25 -07:00
2020-05-25 11:25:36 +02:00