From: Ariel Miculas <ariel.miculas@gmail.com>
To: linux-bcachefs@vger.kernel.org
Cc: Ariel Miculas <ariel.miculas@gmail.com>
Subject: [PATCH v2 2/4] Fix performance regression of update_inode
Date: Fri, 14 Jun 2024 21:46:51 +0300 [thread overview]
Message-ID: <20240614184653.276043-2-ariel.miculas@gmail.com> (raw)
In-Reply-To: <20240614184653.276043-1-ariel.miculas@gmail.com>
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>
---
c_src/posix_to_bcachefs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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));
}
--
2.34.1
next prev parent reply other threads:[~2024-06-14 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 18:46 [PATCH v2 1/4] bcachefs: allow initializing a bcachefs filesystem from a source directory Ariel Miculas
2024-06-14 18:46 ` Ariel Miculas [this message]
2024-06-14 18:46 ` [PATCH v2 3/4] Fix incomplete file copy due to copy_data misuse Ariel Miculas
2024-06-14 18:46 ` [PATCH v2 4/4] Preserve directory {a,m,c} times by calling copy_times() after the recursion Ariel Miculas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240614184653.276043-2-ariel.miculas@gmail.com \
--to=ariel.miculas@gmail.com \
--cc=linux-bcachefs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox