aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/inode.h
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@gmail.com> 2020-10-27 18:56:21 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:08:45 -0400
commit45e4dcba79401dd17e0c32ff26f83e240c27ca5c (patch)
tree1675af28b1fed367d9331c336ceb81ce94dbe67e /fs/bcachefs/inode.h
parentbcachefs: Improve check for when bios are physically contiguous (diff)
downloadlinux-45e4dcba79401dd17e0c32ff26f83e240c27ca5c.tar.gz
linux-45e4dcba79401dd17e0c32ff26f83e240c27ca5c.tar.bz2
linux-45e4dcba79401dd17e0c32ff26f83e240c27ca5c.zip
bcachefs: Inode create optimization
On workloads that do a lot of multithreaded creates all at once, lock contention on the inodes btree turns out to still be an issue. This patch adds a small buffer of inode numbers that are known to be free, so that we can avoid touching the btree on every create. Also, this changes inode creates to update via the btree key cache for the initial create. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.h')
-rw-r--r--fs/bcachefs/inode.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h
index bb759a46dc41..5743be2307f3 100644
--- a/fs/bcachefs/inode.h
+++ b/fs/bcachefs/inode.h
@@ -60,9 +60,7 @@ void bch2_inode_init(struct bch_fs *, struct bch_inode_unpacked *,
uid_t, gid_t, umode_t, dev_t,
struct bch_inode_unpacked *);
-int bch2_inode_create(struct btree_trans *,
- struct bch_inode_unpacked *,
- u64, u64, u64 *);
+int bch2_inode_create(struct btree_trans *, struct bch_inode_unpacked *);
int bch2_inode_rm(struct bch_fs *, u64);