Skip to contentSkip to conversation

NFSv2/3 vs v4 error codes?

DISCUSSION Christoph Hellwig 2 participants 4 messages Sep 10, 2014 – Sep 12, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

As a followup to the fallocate discussion I checked what we map ENODEV to in nfsd. Turns out we map it to NFSERR_NODEV, which doesn't exist in eiter NFSv4.0 nor NFSv4.1 despite the comment in include/uapi/linux/nfs.h claiming otherwise. I also just ran into another issue where nfserrno translates a large lits of errors into NFSERR_JUKEBOX, but for v4 we'd really want NFSERR_DELAY instead for most of them.

Is it time for a version specific errno mapping?

#1 lore raw
Quoted 4 lines · Christoph Hellwig

As a followup to the fallocate discussion I checked what we map ENODEV to in nfsd. Turns out we map it to NFSERR_NODEV, which doesn't exist in eiter NFSv4.0 nor NFSv4.1 despite the comment in include/uapi/linux/nfs.h claiming otherwise.

That's interesting. Is there a reasonable alternative, or is this a protocol bug?

Quoted 3 lines

I also just ran into another issue where nfserrno translates a large lits of errors into NFSERR_JUKEBOX, but for v4 we'd really want NFSERR_DELAY instead for most of them.

The distinction is academic as they're both 10008.

Quoted 1 line

Is it time for a version specific errno mapping?

I'm certainly not opposed if it turns out to be necessary.

--b.

#2 lore raw
Quoted 8 lines · J. Bruce Fields
Quoted 4 lines · Christoph Hellwig

As a followup to the fallocate discussion I checked what we map ENODEV to in nfsd. Turns out we map it to NFSERR_NODEV, which doesn't exist in eiter NFSv4.0 nor NFSv4.1 despite the comment in include/uapi/linux/nfs.h claiming otherwise.

That's interesting. Is there a reasonable alternative, or is this a protocol bug?

I still haven't figured this out. RFC1813 mentions NFS3ERR_NODEV, but doesn't actually reference it anywhere.

In general it seems to me like the use of ENODEV in fallocate is the bug, as we don't really return it from any other filesystem operation.

Quoted 5 lines
Quoted 3 lines

I also just ran into another issue where nfserrno translates a large lits of errors into NFSERR_JUKEBOX, but for v4 we'd really want NFSERR_DELAY instead for most of them.

The distinction is academic as they're both 10008.

Oh, right. I missed to spot that.

Quoted 3 lines
Quoted 1 line

Is it time for a version specific errno mapping?

I'm certainly not opposed if it turns out to be necessary.

A start might be to move nfserrno out of the NFSv2-specific nfsproc file..

#3 lore raw
Quoted 22 lines · Christoph Hellwig
Quoted 8 lines · J. Bruce Fields
Quoted 4 lines · Christoph Hellwig

As a followup to the fallocate discussion I checked what we map ENODEV to in nfsd. Turns out we map it to NFSERR_NODEV, which doesn't exist in eiter NFSv4.0 nor NFSv4.1 despite the comment in include/uapi/linux/nfs.h claiming otherwise.

That's interesting. Is there a reasonable alternative, or is this a protocol bug?

I still haven't figured this out. RFC1813 mentions NFS3ERR_NODEV, but doesn't actually reference it anywhere.

In general it seems to me like the use of ENODEV in fallocate is the bug, as we don't really return it from any other filesystem operation.

Quoted 5 lines
Quoted 3 lines

I also just ran into another issue where nfserrno translates a large lits of errors into NFSERR_JUKEBOX, but for v4 we'd really want NFSERR_DELAY instead for most of them.

The distinction is academic as they're both 10008.

Quoted 8 lines

Oh, right. I missed to spot that.

Quoted 3 lines
Quoted 1 line

Is it time for a version specific errno mapping?

I'm certainly not opposed if it turns out to be necessary.

A start might be to move nfserrno out of the NFSv2-specific nfsproc file..

The current location's a little confusing. But I don't have strong
feelings about it.

--b.