diff options
author | Qu Wenruo <wqu@suse.com> | 2022-09-16 15:28:38 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:48 +0100 |
commit | 280f15cb96a61e4122bb28cdc316343ff4918b7d (patch) | |
tree | c810207bda1679687401644eb1776527916917a2 /fs/btrfs/defrag.c | |
parent | a196a8944f77b7b762795a0862d8aa4a005625a4 (diff) |
btrfs: remove new_inline argument from btrfs_extent_item_to_extent_map()
The argument @new_inline changes the following members of extent_map:
- em->compress_type
- EXTENT_FLAG_COMPRESSED of em->flags
However neither members makes a difference for inline extents:
- Inline extent read never use above em members
As inside btrfs_get_extent() we directly use the file extent item to
do the read.
- Inline extents are never to be split
Thus code really needs em->compress_type or that flag will never be
executed on inlined extents.
(btrfs_drop_extent_cache() would be one example)
- Fiemap no longer relies on extent maps
Recent fiemap optimization makes fiemap to search subvolume tree
directly, without using any extent map at all.
Thus those members make no difference for inline extents any more.
Furthermore such exception without much explanation is really a source
of confusion.
Thus this patch will completely remove the argument, and always set the
involved members, unifying the behavior.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/defrag.c')
-rw-r--r-- | fs/btrfs/defrag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c index 48a9460d49c7..919dfe0f7e50 100644 --- a/fs/btrfs/defrag.c +++ b/fs/btrfs/defrag.c @@ -582,7 +582,7 @@ iterate: goto next; /* Now this extent covers @start, convert it to em */ - btrfs_extent_item_to_extent_map(inode, &path, fi, false, em); + btrfs_extent_item_to_extent_map(inode, &path, fi, em); break; next: ret = btrfs_next_item(root, &path); |