Re: [PATCH RFC 07/39] btrfs: relocation: Make reloc root search specific for relocation backref cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/17/20 4:10 AM, Qu Wenruo wrote:
find_reloc_root() searches reloc_control::reloc_root_tree to find the
reloc root.
This behavior is only useful for relocation backref cache.

For the incoming more generic purposed backref cache, we don't care
about who owns the reloc root, but only care if it's a reloc root.

So this patch makes the following modifications to make the reloc root
search more specific to relocation backref:
- Add backref_node::is_reloc_root
   This will be an extra indicator for generic purposed backref cache.
   User doesn't need to read root key from backref_node::root to
   determine if it's a reloc root.
   Also for reloc tree root, it's useless and will be queued to useless
   list.

- Add backref_cache::is_reloc
   This will allow backref cache code to do different behavior for
   generic purposed backref cache and relocation backref cache.

- Make find_reloc_root() to accept fs_info
   Just a personal taste.

- Export find_reloc_root()
   So backref.c can utilize this function.

Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>

Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx>

Thanks,

Josef



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux