Re: [PATCH 2/5] block: fix max_zone_append_sectors inheritance in blk_stack_limits

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

 



On 7/20/22 23:24, Christoph Hellwig wrote:
> As we start out with a default of 0, this needs a min_not_zero to
> actually work.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  block/blk-settings.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/blk-settings.c b/block/blk-settings.c
> index 8bb9eef5310eb..9f6e271ca67f4 100644
> --- a/block/blk-settings.c
> +++ b/block/blk-settings.c
> @@ -554,7 +554,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
>  	t->max_dev_sectors = min_not_zero(t->max_dev_sectors, b->max_dev_sectors);
>  	t->max_write_zeroes_sectors = min(t->max_write_zeroes_sectors,
>  					b->max_write_zeroes_sectors);
> -	t->max_zone_append_sectors = min(t->max_zone_append_sectors,
> +	t->max_zone_append_sectors = min_not_zero(t->max_zone_append_sectors,
>  					b->max_zone_append_sectors);

Hmmm... Given that max_zone_append_sectors should never be zero for any
zoned block device, that is OK. However, DM targets combining zoned and
non-zoned devices to create a non zoned logical drive, e.g. dm-zoned with
a regular ssd for metadata, should not have a non-zero
max_zone_append_sectors. So I am not confident this change leads to
correct limits in all cases.

>  	t->bounce = max(t->bounce, b->bounce);
>  


-- 
Damien Le Moal
Western Digital Research



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux