stale nfs file handle with exported loopback mounts
Subsystems (2)
so, you mean this is a problem of the client or some "fix it at the client = end" ?
that would be bad, since it would mean i need to touch all our linux system= s which want to access our next-generation :) cd-rom server.... =
anyway =
Quoted 1 line
Quoted 1 line
Quoted 1 line
after mounting for the first time on the client, i`m getting "Invalid=
argument" for each loopback-mounted dir, if i do an ls -la on /mnt.
Quoted 1 line
Quoted 1 line
Quoted 1 line
this only happens _once_ and seems to be a server problem, because i =
can reboot the client and remount , i never see that errors again.
wondering, why doesn`t it happen again, even if i reboot the client.....
regards
roland
Quoted 8 lines
-----Urspr=FCngliche Nachricht-----
Von: "J. Bruce Fields" <[email protected]>
Gesendet: 02.11.07 20:24:52
An: [email protected]
CC: Neil Brown <[email protected]>, [email protected]
Betreff: Re: [NFS] stale nfs file handle with exported loopback mounts
Quoted 8 lines
=
Quoted 5 lines · J. Bruce Fields
Quoted 4 lines · On Fri, Nov 02, 2007 at 08:06:58PM +0100, [email protected] wrote:
hi!
=it seems i was having weird mail problems with sending mails trough m=
y webmailer - at least two followups with attachments seem to be lost on se= nding and are not in my sent folder anymore....
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
=
anyway - here is a second try, but probably worse than what i have wr=
itten before :)
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
=
=
first off, thanks for the patch Neil, things look _much_ better now a=
nd exporting loopback mounts now basiscally works again.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
nice to see that my posting helped finding bugs.
=maybe i have two more bugs for you :)
=i have loopback mounts on the server and exported the parent dir with=
crossmnt option.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
=
after mounting for the first time on the client, i`m getting "Invalid=
argument" for each loopback-mounted dir, if i do an ls -la on /mnt.
Quoted 1 line
Quoted 1 line
Quoted 1 line
this only happens _once_ and seems to be a server problem, because i =
can reboot the client and remount , i never see that errors again.
Quoted 19 lines
Quoted 10 lines
=
Quoted 1 line
From a quick look at the trace (thanks)--there's some getacl calls that
return EINVAL, then a few milliseconds later a second reply returns with the original data. That looks suspiciously like a reply being sent when the request was also deferred pending the upcall to deal with the newly encountered filesystem. Sure enough, in fs/nfs/nfs3acl.c:nfsd3_proc_getacl(), there's
=Quoted 7 lines
if ((nfserr =3D fh_verify(rqstp, &resp->fh, 0, MAY_NOP))) RETURN_STATUS(nfserr_inval);=
Change that
nfserr_invalto an nfserr (here and in fs/nfs/nfs2acl.c:nfsd_proc_getacl()), and maybe the problem will go away.=
Quoted 7 lines
(I've been seeing some odd spurious replayed replies in the nfsv4 case as well, by the way--I suspect it's a similar problem, but haven't had the chance to track it down yet....)
=--b.
=
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=3D100071&distributionid=3D000000000066
-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 5 lines · On Fri, Nov 02, 2007 at 08:37:12PM +0100, [email protected] wrote:
so, you mean this is a problem of the client or some "fix it at the client end" ?
that would be bad, since it would mean i need to touch all our linux systems which want to access our next-generation :) cd-rom server....
No, it's definitely a server-side problem. Oh, I see, I miswrote the path; I meant fs/nfsd/nfs3acl.c, not fs/nfs/nfs3acl.c....
How about this?
--b.
Quoted 1 line
From
7fc982f90d404003329934ae3b786c5e4efb0c0aMon Sep 17 00:00:00 2001
From: J. Bruce Fields <[email protected]>
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 <[email protected]> for bug report and data collection.
--- fs/nfsd/nfs2acl.c | 2 +- fs/nfsd/nfs3acl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs2acl.c +1 -1
@@ -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);
fs/nfsd/nfs3acl.c +1 -1
@@ -40,7 +40,7 @@ static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp,RETURN_STATUS (nfserr_inval);if (argp->mask & ~(NFS_ACL |NFS_ACLCNT |NFS_DFACL |NFS_DFACLCNT )) -RETURN_STATUS (nfserr_inval); +RETURN_STATUS (nfserr); resp->mask = argp->mask;if (resp->mask & (NFS_ACL |NFS_ACLCNT )) {
Signature · 11 lines
1.5.3.4.208.gc990 ------------------------------------------------------------------------- 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 - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Oops--thanks to Roland for pointing out a mistake in the nfs3acl.c piece of the previous version of this patch.
--b.
Quoted 1 line
From
c5ac46d1b7022f726606f92033bebd9fdc6ae343Mon Sep 17 00:00:00 2001
From: J. Bruce Fields <[email protected]>
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 <[email protected]> for bug report and data collection.
--- fs/nfsd/nfs2acl.c | 2 +- fs/nfsd/nfs3acl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs2acl.c +1 -1
@@ -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);
fs/nfsd/nfs3acl.c +1 -1
@@ -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);
Signature · 11 lines
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 - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Thanks for the catch, Bruce.
Andreas
-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs