Re: [PATCH v3 2/2] block: better deal with the delayed not supported case in blk_cloned_rq_check_limits

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

 



Ritika,

> +		/*
> +		 * At least SCSI device does not have a good way to return if
> +		 * Write Same/Zero is actually supported. To detect this, first
> +		 * try to issue one and if it fails clear the max sectors value.
> +		 * If this occurs on the lower device, the right error code
> +		 * needs to be propagated to upper layers.
> +		 */
> +		if (max_sectors == 0)
> +			return BLK_STS_NOTSUPP;

Maybe we should make it more explicit in the comment that there is a
window of error where this condition can occur? Something like:

    If a device rejects a non-read/write command (discard, write same,
    etc.) the low-level device driver will set the relevant queue limit
    to 0 to prevent blk-lib from issuing more of the offending
    operations. Commands queued prior to the queue limit being reset
    need to be completed with BLK_STS_NOTSUPP to avoid I/O errors being
    propagated to upper layers.

Otherwise looks good.

Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

-- 
Martin K. Petersen	Oracle Linux Engineering



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux