Re: [PATCH V3 10/12] scsi: sd_zbc: Limit zone write locking to sequential zones

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

 



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.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux