Re: [RFC] btrfs: Speedup btrfs_read_block_groups()

2018-02-22 Thread Qu Wenruo
On 2018年02月23日 09:12, Holger Hoffstätte wrote: > On 02/22/18 05:52, Qu Wenruo wrote: >> btrfs_read_block_groups() is used to build up the block group cache for >> all block groups, so it will iterate all block group items in extent >> tree. >> >> For large filesystem (TB level), it will search fo

Re: [RFC] btrfs: Speedup btrfs_read_block_groups()

2018-02-22 Thread Holger Hoffstätte
On 02/22/18 05:52, Qu Wenruo wrote: > btrfs_read_block_groups() is used to build up the block group cache for > all block groups, so it will iterate all block group items in extent > tree. > > For large filesystem (TB level), it will search for BLOCK_GROUP_ITEM > thousands times, which is the most

Re: [RFC] btrfs: Speedup btrfs_read_block_groups()

2018-02-22 Thread Holger Hoffstätte
On 02/22/18 05:52, Qu Wenruo wrote: > btrfs_read_block_groups() is used to build up the block group cache for > all block groups, so it will iterate all block group items in extent > tree. > > For large filesystem (TB level), it will search for BLOCK_GROUP_ITEM > thousands times, which is the most