Re: [PATCH 09/11] block, nvme: Add error for reservation conflicts.

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

 



On 6/3/22 2:45 PM, Keith Busch wrote:
> On Fri, Jun 03, 2022 at 01:55:34AM -0500, Mike Christie wrote:
>> @@ -171,6 +171,7 @@ static const struct {
>>  	/* zone device specific errors */
>>  	[BLK_STS_ZONE_OPEN_RESOURCE]	= { -ETOOMANYREFS, "open zones exceeded" },
>>  	[BLK_STS_ZONE_ACTIVE_RESOURCE]	= { -EOVERFLOW, "active zones exceeded" },
>> +	[BLK_STS_RSV_CONFLICT]	= { -EBADE,	"resevation conflict" },
> 
> You misspelled "reservation". :)

Will fix.

> 
> And since you want a different error, why reuse EBADE for the errno? That is
> already used for BLK_STS_NEXUS that you're trying to differentiate from, right?
> At least for nvme, this error code is returned when the host lacks sufficient
> rights, so something like EACCESS might make sense.
>

Ah ok I might have misuderstood the reason/usage of the -Exyz error.

The patches in this set use the pr_ops in the kernel so I can see the BLK_STS
value. We do bio based IO so we get that value in the end io callback.

I thought the -Exyx error can get returned to userspace. Because scsi and nvme
currently return -EBADE for reservation conflicts I thought I had to keep doing
that. If that's not the case, then yeah -EACCESS is better and I'll definitely
use it.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux