Re: [PATCH 2/5] scsi_io_completion: add _nz_result helper

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

 



On Tue, Mar 06, 2018 at 10:21:31PM -0500, Douglas Gilbert wrote:
> ChangeLog:
>   - break out several interwined paths when cmd->result is non zero
>     and place them in scsi_io_completion_nz_result helper function
>   - after a review comment that proposed reducing the helper's
>     former 2 return values to a single return value, use
>     BLK_STS_NOTSUPP as a marker that the helper did not change
>     the blk_status. This is cleaned up just after its invocation
>     in scsi_io_completion.

Comment about changelog applies here as well.

[...]

> +	if (sense_valid && (sshdr.sense_key == RECOVERED_ERROR)) {
> +		/*
> +		 * if ATA PASS-THROUGH INFORMATION AVAILABLE skip
> +		 * print since caller wants ATA registers. Only occurs
> +		 * on SCSI ATA PASS_THROUGH commands when CK_COND=1
> +		 */
> +		if ((sshdr.asc == 0x0) && (sshdr.ascq == 0x1d))
> +			;
> +		else if (!(req->rq_flags & RQF_QUIET))
> +			scsi_print_sense(cmd);
> +		/* for passthrough, blk_stat may be set */
> +		blk_stat = BLK_STS_OK;

I see this is just copied over but it isn't really intuitive to the reader.
OTOH 
		if (!(sshdr.asc == 0x0 && sshdr.ascq == 0x1d)
			 && !(req->rq_flags & RQF_QUIET))
			    scsi_print_sense(cmd);
isn't either...

Maybe someone else has an idea

-- 
Johannes Thumshirn                                          Storage
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



[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