On 3/26/24 16:08, Christoph Hellwig wrote: >> + /* >> + * For devices using a BIO-based driver, we need zone resources only >> + * if zone append emulation is required. >> + */ >> + if (!queue_is_mq(disk->queue) && >> + !queue_emulates_zone_append(disk->queue)) >> + return 0; >> + > > This code and the comment is duplicated in two places. It also fails > to capture why bio drivers don't need zoned resources - that is that > we can't enforce QD=1 per zone for them. Maybe add a little helper > to encapsulate this check and expand the comment a little? That is not the reason. Because we can actually enforce QD=1 write per zone for DM devices with zone write plugging. E.g. dm-crypt requires that. The reason is more that most DM devices don't need to have that enforcement as they are responsible for handling the sequential writing of zones themselves. So no hash table and no conv bitmap needed for them, unless like dm-crypt, they request zone append emulation, in which case, zone write plugging is turned on for the DM device. But I agree about the helper. Will make that change. > > Otherwise looks good: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > -- Damien Le Moal Western Digital Research