btrfs: simplify the inline extent map creation
authorQu Wenruo <wqu@suse.com>
Tue, 2 Apr 2024 06:00:15 +0000 (16:30 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:08 +0000 (21:31 +0200)
commit4bdc558bf906ce4e3e33cb33a9368383a22e2151
treecb0dbf2d1a4bc0cea9c7d6524462a669538e9a23
parent319d91ee7265505d96f085c6bf5b781667b71090
btrfs: simplify the inline extent map creation

With the tree-checker ensuring all inline file extents starts at file
offset 0 and has a length no larger than sectorsize, we can simplify the
calculation to assigned those fixes values directly.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file-item.c