> On 3 Dec 2019, at 16.18, Christoph Hellwig <hch@xxxxxx> wrote: > > On Tue, Dec 03, 2019 at 03:00:09PM +0100, Javier González wrote: >>> This change also allows to check for a power of two zone size in generic >>> code. >> >> I think however that this checks should remain at the driver level, or >> at least depend on a flag that signals that the zoned device is actually >> a power of two. > > The block layer requires a power of two zone size / chunk size, > including having a BUG_ON for that requirement blk_queue_chunk_sectors. > I'd much rather have a proper check in the zone code with proper > diagnostics than triggering a BUG_ON.. Agree on the BUG_ON part. But since you’re looking into this part now, would it make sense to do the check in the block layer only if the driver imposes a power of two? We can also do it down the road, but seems like double work.