diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-10-09 16:44:36 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:29 +0300 |
commit | daf3fe502a4c20be99579097cc351e91d27fc789 (patch) | |
tree | e96a6c0e8d925fd7aab4d225791400e6c39f93f3 /fs/bcachefs/fs-io.h | |
parent | 14989d547ee308033e080792239e640e076a4460 (diff) | |
download | linux-daf3fe502a4c20be99579097cc351e91d27fc789.tar.xz |
bcachefs: Check if extending inode differently
In bch2_extent_update(), we have to update the inode if i_size is
changing (the file is being extend) or if i_sectors is changing, but we
want to avoid touching the inode if it's not necessary.
Change sum_sector_overwrites() to also check if there's already data
above where we're writing to - this means we're definitely not extending
the file.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-io.h')
-rw-r--r-- | fs/bcachefs/fs-io.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fs-io.h b/fs/bcachefs/fs-io.h index 861ec25ab9ef..5e48d21bd2e4 100644 --- a/fs/bcachefs/fs-io.h +++ b/fs/bcachefs/fs-io.h @@ -19,7 +19,7 @@ int bch2_extent_update(struct btree_trans *, struct bkey_i *, u64, bool, bool, s64 *); int bch2_fpunch_at(struct btree_trans *, struct btree_iter *, - struct bpos, struct bch_inode_info *, u64); + struct bpos, struct bch_inode_info *); int __must_check bch2_write_inode_size(struct bch_fs *, struct bch_inode_info *, |