]> git.ipfire.org Git - thirdparty/linux.git/commit
fs: Move metadata bhs tracking to a separate struct
authorJan Kara <jack@suse.cz>
Thu, 26 Mar 2026 09:54:24 +0000 (10:54 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 26 Mar 2026 14:03:31 +0000 (15:03 +0100)
commit521bea7cec8a79684402d555caab408ed43171d5
tree2e56ba0ca6752141e25f24af7935aa995b0636cf
parent8fed8176312ba4cdb8169caf96bc552d4c1435d2
fs: Move metadata bhs tracking to a separate struct

Instead of tracking metadata bhs for a mapping using i_private_list and
i_private_lock create a dedicated mapping_metadata_bhs struct for it.
So far this struct is embedded in address_space but that will be
switched for per-fs private inode parts later in the series. This also
changes the locking from bdev mapping's i_private_lock to a new lock
embedded in mapping_metadata_bhs to untangle the i_private_lock locking
for maintaining lists of metadata bhs and the locking for looking up /
reclaiming bdev's buffer heads. The locking in remove_assoc_map() gets
more complex due to this but overall this looks like a reasonable
tradeoff.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260326095354.16340-72-jack@suse.cz
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/buffer.c
fs/inode.c
include/linux/fs.h