Re: [PATCH v4 1/3] cxlflash: Base error recovery support

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

 



Hi Wendy,

Thanks for reviewing. Comments inline below.


-matt

> On Aug 11, 2015, at 11:15 PM, wenxiong@xxxxxxxxxxxxxxxxxx wrote:
> 
> 
> Quoting "Matthew R. Ochs" <mrochs@xxxxxxxxxxxxxxxxxx>:
> 
>> Introduce support for enhanced I/O error handling.
>> 
>> Signed-off-by: Matthew R. Ochs <mrochs@xxxxxxxxxxxxxxxxxx>
>> Signed-off-by: Manoj N. Kumar <manoj@xxxxxxxxxxxxxxxxxx>
>> ---
>> drivers/scsi/cxlflash/Kconfig  |   2 +-
>> drivers/scsi/cxlflash/common.h |  11 ++-
>> drivers/scsi/cxlflash/main.c   | 166 ++++++++++++++++++++++++++++++++++++++---
>> drivers/scsi/cxlflash/main.h   |   4 +
>> 4 files changed, 170 insertions(+), 13 deletions(-)
>> 
>> diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
>> index 76a7286..18359d4 100644
>> --- a/drivers/scsi/cxlflash/main.c
>> +++ b/drivers/scsi/cxlflash/main.c
>> @@ -380,6 +380,18 @@ static int cxlflash_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scp)
>> 	}
>> 	spin_unlock_irqrestore(&cfg->tmf_waitq.lock, lock_flags);
>> 
>> +	switch (cfg->state) {
>> +	case STATE_LIMBO:
>> +		pr_debug_ratelimited("%s: device in limbo!\n", __func__);
>> +		rc = SCSI_MLQUEUE_HOST_BUSY;
>> +		goto out;
> 
> remove “goto out", return SCSI_MLQUEUE_HOST_BUSY;

I’d like to keep this as goto out as we have a common exit point strategy
already in place for this routine (and pretty much everywhere else in the
driver for that matter). It would seem odd to just have this one place perform
a direct return.

Additionally, not included in this patch but one of the bug fixes/enhancements
(to be sent out as a separate patch series) we’ve made to this routine is to add
a ‘devel’ trace point in the common exit to help with debug.
 
> 
>> +	case STATE_FAILTERM:
>> +		pr_debug_ratelimited("%s: device has failed!\n", __func__);
>> +		goto error;
>> +	default:
>> +		break;
>> +	}
>> +
>> 	cmd = cxlflash_cmd_checkout(afu);
>> 	if (unlikely(!cmd)) {
>> 		pr_err("%s: could not get a free command\n", __func__);
>> @@ -428,6 +440,10 @@ static int cxlflash_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scp)
>> 
>> out:
>> 	return rc;
>> +error:
>> +	scp->result = (DID_NO_CONNECT << 16);
>> +	scp->scsi_done(scp);
>> +	return 0;
>> }
>> 
> I have reviewed most of part in v2.

Thanks again for your previous comments.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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