• L
    Btrfs: Make free space cache code generic · 34d52cb6
    Li Zefan 提交于
    So we can re-use the code to cache free inode numbers.
    
    The change is quite straightforward. Two new structures are introduced.
    
    - struct btrfs_free_space_ctl
    
      We move those variables that are used for caching free space from
      struct btrfs_block_group_cache to this new struct.
    
    - struct btrfs_free_space_op
    
      We do block group specific work (e.g. calculation of extents threshold)
      through functions registered in this struct.
    
    And then we can remove references to struct btrfs_block_group_cache.
    Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
    34d52cb6
free-space-cache.h 3.4 KB