From 943005c68b2365c609b96ca40c02ee5c3f0a9a2d Mon Sep 17 00:00:00 2001 From: Ariel Miculas Date: Tue, 4 Jun 2024 10:43:23 +0300 Subject: 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 Signed-off-by: Kent Overstreet --- c_src/posix_to_bcachefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c_src') 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)); } -- cgit v1.2.3