diff options
author | Ariel Miculas <ariel.miculas@gmail.com> | 2024-06-14 21:46:51 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-16 14:08:59 -0400 |
commit | ed675b8d641b70aef97e7e6cc996b98af075f3bf (patch) | |
tree | bdfd538d2859481103990f95bcaf1d68b2686f05 /c_src | |
parent | d750b2b98b492479eb71875499220608b6f19dcc (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')
-rw-r--r-- | c_src/posix_to_bcachefs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/c_src/posix_to_bcachefs.c b/c_src/posix_to_bcachefs.c index ee0e300f..131913d1 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)); } |