projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74163da
)
bcachefs: Inode updates should generally be BTREE_INSERT_NOFAIL
author
Kent Overstreet
<kent.overstreet@gmail.com>
Tue, 9 Nov 2021 22:20:06 +0000
(17:20 -0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:16 +0000
(17:09 -0400)
This fixes a bug where i_size may become inconsistent between the VFS
cache and the btree, when the filesystem is nearly full.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/reflink.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/reflink.c
b/fs/bcachefs/reflink.c
index d003f4088dfc3fb49e33ee621c349121a294419f..22230f82b8b9811f1f3960e03d200f389cd30ad2 100644
(file)
--- a/
fs/bcachefs/reflink.c
+++ b/
fs/bcachefs/reflink.c
@@
-347,7
+347,8
@@
s64 bch2_remap_range(struct bch_fs *c,
inode_u.bi_size < new_i_size) {
inode_u.bi_size = new_i_size;
ret2 = bch2_inode_write(&trans, &inode_iter, &inode_u) ?:
- bch2_trans_commit(&trans, NULL, NULL, 0);
+ bch2_trans_commit(&trans, NULL, NULL,
+ BTREE_INSERT_NOFAIL);
}
bch2_trans_iter_exit(&trans, &inode_iter);