Re: [PATCH 00/15] btrfs-progs: simplify chunk allocation a bit

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

 




On 2020/6/10 下午8:32, Johannes Thumshirn wrote:
> While playing a bit with the RAID code, I've come up with some cleanups for
> the chunk allocatin in progs. It's not aligned to what we're doing in the
> kernel, but the code has diverged so much it is a daunting task to converge it
> again.

The refactor looks pretty good, and passes all existing self tests.

But comparing with kernel code, there are still too many if branches for
different profiles, unlike kernel fully utilizing btrfs_raid_attr.

With that fixed, it would be perfect to be merged.

Thanks,
Qu
> 
> Johannes Thumshirn (15):
>   btrfs-progs: simplify minimal stripe number checking
>   btrfs-progs: simplify assignment of number of RAID stripes
>   btrfs-progs: introduce alloc_chunk_ctl structure
>   btrfs-progs: cache number of devices for chunk allocation
>   btrfs-progs: pass alloc_chunk_ctl to chunk_bytes_by_type
>   btrfs-progs: introduce raid profile table for chunk allocation
>   btrfs-progs: consolidate assignment of minimal stripe number
>   btrfs-progs: consolidate assignment of sub_stripes
>   btrfs-progs: consolidate setting of RAID1 stripes
>   btrfs-progs: do table lookup for simple RAID profiles' num_stripes
>   btrfs-progs: consolidate num_stripes sanity check
>   btrfs-progs: compactify num_stripe setting in btrfs_alloc_chunk
>   btrfs-progs: introduce init_alloc_chunk_ctl
>   btrfs-progs: don't pretend RAID56 has a different stripe length
>   btrfs-progs: consolidate num_stripes setting for striping RAID levels
> 
>  volumes.c | 261 +++++++++++++++++++++++++++++++-----------------------
>  1 file changed, 148 insertions(+), 113 deletions(-)
> 

Attachment: signature.asc
Description: OpenPGP digital signature


[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