]> git.hungrycats.org Git - linux/commit
btrfs: remove btrfs_disk_cache_state
authorTal Zussman <tz2294@columbia.edu>
Thu, 15 Oct 2026 14:43:23 +0000 (10:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Fri, 16 Oct 2026 17:06:56 +0000 (19:06 +0200)
commit1e54cee8cfeeb43722eacd8d7955c18d6e0e5451
tree327835cf705a0b812b0c9c8766b681ee9ed1a8ad
parent7d6afdb6c1dca238dfa878350583d4e8be07eaae
btrfs: remove btrfs_disk_cache_state

With neither the writer nor the loader left, nothing acts on
disk_cache_state. Remove it, the need_clear handling when reading block
groups, and the enum. While at it, drop the unused cache_generation
field from struct btrfs_block_group.

lookup_free_space_inode() converted old style space inodes by clearing
disk_cache_state so the cache would be rewritten with the new inode
flags. Without that it only sets flags on the in-memory inode, which
every remaining caller truncates or deletes right after, so drop the
conversion too.

Assisted-by: LLM
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/block-group.h
fs/btrfs/disk-io.c
fs/btrfs/free-space-cache.c