Re: [PATCH 3/3] nvme: Convert NVMe errors to PT_STS errors

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

 



On 11/15/22 3:14 AM, Christoph Hellwig wrote:
> On Wed, Nov 09, 2022 at 11:20:07AM -0600, Mike Christie wrote:
>>>> +	case NVME_SC_BAD_ATTRIBUTES:
>>>> +	case NVME_SC_INVALID_OPCODE:
>>>> +	case NVME_SC_INVALID_FIELD:
>>>> +	case NVME_SC_INVALID_NS:
>>>> +		sts = PR_STS_OP_INVALID;
>>>> +		break;
>>>
>>> Second thoughts on these: shouldn't we just return negative Linux
>>> errnos here?
>>
>> I wasn't sure. I might have over thought it.
>>
>> I added the PR_STS error codes for those cases so a user could
>> distinguish if the command was sent to the device and it
>> reported it didn't support the command or the device determined it
>> had an invalid field set.
> 
> But does it matter if the device or the kernel doesn't support
> them?  The result for the users is very much the same.

Yeah, makes sense.



[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