[dm-devel] [PATCH v7 02/13] block: allow blk-zoned devices to have non-power-of-2 zone size

Luis Chamberlain mcgrof at kernel.org
Thu Jun 16 09:04:48 PDT 2022


On Thu, Jun 16, 2022 at 12:09:35PM +0200, Pankaj Raghav wrote:
> On 2022-06-15 22:28, Bart Van Assche wrote:
> >> +        if (!is_power_of_2(zone->len) && zone->capacity < zone->len) {
> >> +            pr_warn("%s: Invalid zone capacity for non power of 2
> >> zone size",
> >> +                disk->disk_name);
> >>               return -ENODEV;
> >>           }
> > 
> > The above check seems wrong to me. I don't see why devices that report a
> > capacity that is less than the zone size should be rejected.
> > 
> This was brought up by Damien during previous reviews. The argument was
> that the reason to allow non power-of-2 zoned device is to remove the
> gaps between zone size and zone capacity. Allowing a npo2 zone size with
> a different capacity, even though it is technically possible, it does
> not make any practical sense. That is why this check was introduced.
> Does that answer your question?

Perhaps just add a comment because unless you are involved in the prior
reviews this might not be clear.

  Luis



More information about the Linux-nvme mailing list