]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: optionally extend i_size in cow_file_range_inline()
authorOmar Sandoval <osandov@fb.com>
Thu, 7 Nov 2019 23:19:16 +0000 (15:19 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:51 +0000 (13:13 +0100)
commitd45bf10475d72058a4ce7ce36ffdec701016dfa3
tree6d4da497a1e24e12e5c6a507da99ba329405bf52
parent66f4d211ddc10b2e1f6ca8def946dcc3227a1eb7
btrfs: optionally extend i_size in cow_file_range_inline()

Currently, an inline extent is always created after i_size is extended
from btrfs_dirty_pages(). However, for encoded writes, we only want to
update i_size after we successfully created the inline extent. Add an
update_i_size parameter to cow_file_range_inline() and
insert_inline_extent() and pass in the size of the extent rather than
determining it from i_size.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ reformat comment ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c