All of lore.kernel.org
 help / color / mirror / Atom feed
* NFSv2/3 vs v4 error codes?
@ 2014-09-10 22:16 Christoph Hellwig
  2014-09-11 19:03 ` J. Bruce Fields
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2014-09-10 22:16 UTC (permalink / raw)
  To: linux-nfs

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NFSv2/3 vs v4 error codes?
  2014-09-10 22:16 NFSv2/3 vs v4 error codes? Christoph Hellwig
@ 2014-09-11 19:03 ` J. Bruce Fields
  2014-09-11 20:02   ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: J. Bruce Fields @ 2014-09-11 19:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-nfs

On Wed, Sep 10, 2014 at 03:16:50PM -0700, Christoph Hellwig wrote:
> 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 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.

> Is it time for a version specific errno mapping?

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

--b.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NFSv2/3 vs v4 error codes?
  2014-09-11 19:03 ` J. Bruce Fields
@ 2014-09-11 20:02   ` Christoph Hellwig
  2014-09-12 17:55     ` J. Bruce Fields
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2014-09-11 20:02 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Christoph Hellwig, linux-nfs

On Thu, Sep 11, 2014 at 03:03:45PM -0400, J. Bruce Fields wrote:
> On Wed, Sep 10, 2014 at 03:16:50PM -0700, Christoph Hellwig wrote:
> > 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.

> > 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.

> > 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..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NFSv2/3 vs v4 error codes?
  2014-09-11 20:02   ` Christoph Hellwig
@ 2014-09-12 17:55     ` J. Bruce Fields
  0 siblings, 0 replies; 4+ messages in thread
From: J. Bruce Fields @ 2014-09-12 17:55 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-nfs

On Thu, Sep 11, 2014 at 01:02:14PM -0700, Christoph Hellwig wrote:
> On Thu, Sep 11, 2014 at 03:03:45PM -0400, J. Bruce Fields wrote:
> > On Wed, Sep 10, 2014 at 03:16:50PM -0700, Christoph Hellwig wrote:
> > > 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.
> 
> > > 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.
> 
> > > 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-12 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10 22:16 NFSv2/3 vs v4 error codes? Christoph Hellwig
2014-09-11 19:03 ` J. Bruce Fields
2014-09-11 20:02   ` Christoph Hellwig
2014-09-12 17:55     ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.