public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Malahal Naineni <malahal@us.ibm.com>
To: linux-nfs@vger.kernel.org
Subject: Re: [PATCH/RFC 5/7] Added VFH FHEXPIRED recovery functions.
Date: Fri, 11 Nov 2011 19:45:34 -0800	[thread overview]
Message-ID: <20111112034534.GB15724@us.ibm.com> (raw)
In-Reply-To: <1321057673.8733.13.camel@lade.trondhjem.org>

Trond Myklebust [Trond.Myklebust@netapp.com] wrote:
> On Fri, 2011-11-11 at 18:04 -0500, Matthew Treinish wrote: 
> > +static int nfs4_proc_vfh_lookup(struct rpc_clnt *clnt, struct inode *dir,
> > +	struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
> > +{
> > +	struct nfs4_exception exception = { };
> > +	int err;
> > +	do {
> > +		int status;
> > +
> > +		status = _nfs4_proc_lookup(clnt, dir, name, fhandle, fattr);
> > +		switch (status) {
> > +		case -NFS4ERR_BADNAME:
> > +			return -ENOENT;
> > +		case -NFS4ERR_MOVED:
> > +			err = nfs4_get_referral(dir, name, fattr, fhandle);
> > +			break;
> > +		case -NFS4ERR_FHEXPIRED:
> > +			return -NFS4ERR_FHEXPIRED;
> > +		case -NFS4ERR_WRONGSEC:
> > +			nfs_fixup_secinfo_attributes(fattr, fhandle);
> 
> case -NFS4ERR_ACCESS:
>                  ???????
> 
> > +		}
> > +		err = nfs4_handle_exception(NFS_SERVER(dir),
> > +					status, &exception);
> > +	} while (exception.retry);
> > +	return err;
> > +}
> > +
> 
> What execution context is this function going to be running under and
> what guarantees that it actually has the right file access credentials
> to allow it to perform a lookup?

I imagine, it is in the context of the process that received FHEXPIRED
error. It may not have credentials to perform a lookup on parent
directories. If it doesn't, that would end up with ESTALE with Matt's
patches, right Matt?

--Malahal.


  reply	other threads:[~2011-11-12  3:45 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 23:04 [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 1/7] New mount option for volatile filehandle recovery Matthew Treinish
2011-11-12  0:19   ` Trond Myklebust
2011-11-12  3:35     ` Malahal Naineni
2011-11-11 23:04 ` [PATCH/RFC 2/7] Added support for FH_EXPIRE_TYPE attribute Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 3/7] Add VFS objects from nfs4_proc calls into nfs4_exception Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 4/7] Save root file handle in nfs_server Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 5/7] Added VFH FHEXPIRED recovery functions Matthew Treinish
2011-11-12  0:27   ` Trond Myklebust
2011-11-12  3:45     ` Malahal Naineni [this message]
2011-11-12 17:16       ` Trond Myklebust
2011-11-14 21:12         ` Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 6/7] Perform recovery on both inodes for rename Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 7/7] Added error handling for NFS4ERR_FHEXPIRED Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC] Hard code testing on server <ONLY FOR TESTING> Matthew Treinish
2011-11-12  0:13 ` [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Trond Myklebust
2011-11-12 14:49   ` Christoph Hellwig
2011-11-13  3:54     ` NeilBrown
2011-11-13 13:45       ` Tigran Mkrtchyan
2011-11-13 16:36         ` J. Bruce Fields
2011-11-13 21:07           ` NeilBrown
2011-11-14  0:42             ` J. Bruce Fields
2011-11-14  1:26               ` NeilBrown
2011-11-14 17:27             ` Trond Myklebust
2011-11-15  6:33             ` Trond Myklebust
2012-01-13 17:09               ` Malahal Naineni
2012-01-14  1:38                 ` J. Bruce Fields
2012-01-16 16:52                   ` Malahal Naineni
2012-01-17 15:18                     ` J. Bruce Fields
2012-01-17 17:22                       ` Malahal Naineni
2012-01-17 18:47                         ` J. Bruce Fields
2012-01-17 19:43                           ` Malahal Naineni
2011-11-14 16:29         ` Trond Myklebust
2011-11-13 16:42       ` J. Bruce Fields
2011-11-13 16:45         ` J. Bruce Fields
2011-11-13 18:25           ` Matthew Treinish
2011-11-13 18:06       ` Matthew Treinish
2011-11-14  9:09         ` Tigran Mkrtchyan
2011-11-14 21:47           ` Matthew Treinish
2011-11-15  6:49         ` Trond Myklebust
2011-11-15 22:38           ` Matthew Treinish

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=20111112034534.GB15724@us.ibm.com \
    --to=malahal@us.ibm.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox