From: "J. Bruce Fields" <bfields@fieldses.org>
To: devzero@web.de
Cc: Neil Brown <neilb@suse.de>,
NFS@lists.sourceforge.net, Andreas Gruenbacher <agruen@suse.de>
Subject: Re: stale nfs file handle with exported loopback mounts
Date: Sun, 4 Nov 2007 15:30:53 -0500 [thread overview]
Message-ID: <20071104203053.GA22762@fieldses.org> (raw)
In-Reply-To: <20071102194225.GH15595@fieldses.org>
Oops--thanks to Roland for pointing out a mistake in the nfs3acl.c piece
of the previous version of this patch.
--b.
>From c5ac46d1b7022f726606f92033bebd9fdc6ae343 Mon Sep 17 00:00:00 2001
From: J. Bruce Fields <bfields@citi.umich.edu>
Date: Fri, 2 Nov 2007 15:36:08 -0400
Subject: [PATCH] knfsd: fix spurious EINVAL errors on first access of new filesystem
The v2/v3 acl code in nfsd is translating any return from fh_verify() to
nfserr_inval. This is particularly unfortunate in the case of an
nfserr_dropit return, which is an internal error meant to indicate to
callers that this request has been deferred and should just be dropped
pending the results of an upcall to mountd.
Thanks to Roland <devzero@web.de> for bug report and data collection.
Cc: Roland <devzero@web.de>
Cc: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
fs/nfsd/nfs2acl.c | 2 +-
fs/nfsd/nfs3acl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c
index bb3e188..d5fca59 100644
--- a/fs/nfsd/nfs2acl.c
+++ b/fs/nfsd/nfs2acl.c
@@ -41,7 +41,7 @@ static __be32 nfsacld_proc_getacl(struct svc_rqst * rqstp,
fh = fh_copy(&resp->fh, &argp->fh);
if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP)))
- RETURN_STATUS(nfserr_inval);
+ RETURN_STATUS(nfserr);
if (argp->mask & ~(NFS_ACL|NFS_ACLCNT|NFS_DFACL|NFS_DFACLCNT))
RETURN_STATUS(nfserr_inval);
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
index 3e3f2de..b647f2f 100644
--- a/fs/nfsd/nfs3acl.c
+++ b/fs/nfsd/nfs3acl.c
@@ -37,7 +37,7 @@ static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp,
fh = fh_copy(&resp->fh, &argp->fh);
if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP)))
- RETURN_STATUS(nfserr_inval);
+ RETURN_STATUS(nfserr);
if (argp->mask & ~(NFS_ACL|NFS_ACLCNT|NFS_DFACL|NFS_DFACLCNT))
RETURN_STATUS(nfserr_inval);
--
1.5.3.5.475.g477d-dirty
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-11-04 20:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 19:37 stale nfs file handle with exported loopback mounts devzero
2007-11-02 19:42 ` J. Bruce Fields
2007-11-04 20:30 ` J. Bruce Fields [this message]
2007-11-05 9:59 ` Andreas Gruenbacher
-- strict thread matches above, loose matches on Subject: below --
2007-11-10 15:14 devzero
2007-11-02 19:06 devzero
2007-11-02 19:23 ` J. Bruce Fields
2007-11-02 19:24 ` J. Bruce Fields
2007-10-31 22:50 devzero
2007-11-01 4:26 ` Neil Brown
2007-10-31 22:19 devzero
2007-10-31 22:39 ` J. Bruce Fields
2007-10-31 20:46 devzero
2007-10-31 20:57 ` J. Bruce Fields
2007-10-30 20:05 devzero
2007-10-27 16:13 devzero
2007-10-30 5:14 ` Neil Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071104203053.GA22762@fieldses.org \
--to=bfields@fieldses.org \
--cc=NFS@lists.sourceforge.net \
--cc=agruen@suse.de \
--cc=devzero@web.de \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.