summaryrefslogtreecommitdiff
path: root/c_src/posix_to_bcachefs.c
diff options
context:
space:
mode:
authorAriel Miculas <ariel.miculas@gmail.com>2024-06-04 10:43:23 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-06-13 14:34:48 -0400
commit943005c68b2365c609b96ca40c02ee5c3f0a9a2d (patch)
tree16e8e738979080c459cec29049cad2a93bfeb418 /c_src/posix_to_bcachefs.c
parentd476d96c73895041f6d1c6ff4f8d17e4488e8a2b (diff)
Fix performance regression of update_inode
This kernel commit: 65bd442397274347e721a89c2c4882a392bae982 removes BTREE_ITER_cached from bch2_btree_insert_trans, which causes the update_inode function to take a long time (~20s). Add this flag back in the update_inode function. Signed-off-by: Ariel Miculas <ariel.miculas@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'c_src/posix_to_bcachefs.c')
-rw-r--r--c_src/posix_to_bcachefs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c_src/posix_to_bcachefs.c b/c_src/posix_to_bcachefs.c
index e1460e9b..63fab98f 100644
--- a/c_src/posix_to_bcachefs.c
+++ b/c_src/posix_to_bcachefs.c
@@ -19,7 +19,7 @@ void update_inode(struct bch_fs *c,
bch2_inode_pack(&packed, inode);
packed.inode.k.p.snapshot = U32_MAX;
ret = bch2_btree_insert(c, BTREE_ID_inodes, &packed.inode.k_i,
- NULL, 0, 0);
+ NULL, 0, BTREE_ITER_cached);
if (ret)
die("error updating inode: %s", bch2_err_str(ret));
}