ext4: Allocate mapping_metadata_bhs struct on demand

Currently every ext4 inode gets mapping_metadata_bhs struct although it
is only needed when running without a journal and only for inodes where
any metadata was dirtied. Allocate mapping_metadata_bhs struct on demand
when dirtying the first metadata buffer for the inode.

Acked-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260727104923.3828017-24-jack@suse.cz
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Jan Kara 2026-07-27 12:49:22 +02:00 • committed by Christian Brauner
commit daca0f43a9
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2
5 changed files with 55 additions and 16 deletions