On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> +      * There is no write constraints on conventional zones. So any write
           ^^^^^^^^^^^
Should this have been "There are no"?

> -     if (sdkp->zones_wlock &&
> -         test_and_set_bit(zno, sdkp->zones_wlock))
> +     if (q->zoned.seq_zones && test_bit(zno, q->zoned.seq_zones))
> +             return BLKPREP_OK;
> +     if (sdkp->zones_wlock && test_and_set_bit(zno, sdkp->zones_wlock))
>               return BLKPREP_DEFER;

Please introduce helper functions in include/linux/blkdev.h or in a new
header file for verifying whether or not a zone is a sequential zone and also
for locking a zone for writes. I expect that that will make the above code
significantly easier to read.

Thanks,

Bart.

Reply via email to