Re: [PATCH 1/2] btrfs: Consider system chunk array size for new SYSTEM chunks

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

 




On 28.08.19 г. 5:33 ч., Qu Wenruo wrote:
> For SYSTEM chunks, despite the regular chunk item size limit, there is
> another limit due to system chunk array size.
> 
> The extra limit is removed in a refactor, so just add it back.
> 
> Fixes: e3ecdb3fdecf ("btrfs: factor out devs_max setting in __btrfs_alloc_chunk")
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>

Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>

> ---
>  fs/btrfs/volumes.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index a447d3ec48d5..8b72d03738d9 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4966,6 +4966,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
>  	} else if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
>  		max_stripe_size = SZ_32M;
>  		max_chunk_size = 2 * max_stripe_size;
> +		devs_max = min_t(int, devs_max, BTRFS_MAX_DEVS_SYS_CHUNK);
>  	} else {
>  		btrfs_err(info, "invalid chunk type 0x%llx requested",
>  		       type);
> 



[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