]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: embed delayed root to struct btrfs_fs_info
authorDavid Sterba <dsterba@suse.com>
Fri, 9 Jan 2026 17:17:40 +0000 (18:17 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:56:20 +0000 (07:56 +0100)
commitc8bafc8d6a78bdc484749816668d6f415d008fe8
tree9af5c453f0e40e9b878ebd513df415c2101502c5
parent71e545d4e33f97258bf7416c132b10a6c1234255
btrfs: embed delayed root to struct btrfs_fs_info

The fs_info::delayed_root is allocated dynamically but there's only one
instance per filesystem so we can embed it into the fs_info itself.
The two object have the same lifetime and delayed roots are always
present so we don't need to allocate it on demand from slab.

There's still some space left in fs_info until the 4K so there won't be
an spill over to next page on release config (size grows from 3880 to
3952). In case we want to shrink fs_info there are still holes to fill
or we can separate other non-core or optional structures if needed.

Link: https://lore.kernel.org/all/cover.1767979013.git.dsterba@suse.com/
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c
fs/btrfs/delayed-inode.h
fs/btrfs/disk-io.c
fs/btrfs/fs.h