From: Chuck Lever <chuck.lever@oracle.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 5/5] NFS: Save FSID's root FH in nfs_server
Date: Tue, 25 Jun 2013 17:51:21 -0400 [thread overview]
Message-ID: <2EFD4576-C5AA-4295-9DB2-A5E6BAD5061B@oracle.com> (raw)
In-Reply-To: <1372194900.17600.6.camel@leira.trondhjem.org>
On Jun 25, 2013, at 5:15 PM, "Myklebust, Trond" <Trond.Myklebust@netapp.com> wrote:
> On Tue, 2013-06-25 at 13:22 -0700, Chuck Lever wrote:
>> On Jun 25, 2013, at 12:37 PM, "Myklebust, Trond" <Trond.Myklebust@netapp.com> wrote:
>>
>>> On Tue, 2013-06-25 at 12:24 -0400, Chuck Lever wrote:
>>>> Save each FSID's root file handle in the FSID's nfs_server structure
>>>> on the client. This is needed for NFSv4 migration recovery.
>>>
>>> Please just use sb->s_root.
>>
>> The migration recovery procedures do not take an inode or dentry argument. All we have is an nfs_server. I see
>>
>> struct nfs_server *server = NFS_SB(sb);
>>
>> but what is the preferred method for going the other way? A naive approach would be to plant a super_block back-pointer in each nfs_server.
>
> Why do you not have an inode or dentry?
That's the way the APIs happen to be architected. I wasn't certain that exception->inode in nfs4_handle_exception(), and state->inode in nfs4_async_handle_error(), would always be non-NULL when I needed an inode pointer.
> Surely the migration must have
> been triggered either by an operation involving a filehandle, in which
> case you have an inode, or by a LEASE_MOVED, in which case there is open
> state on the target filesystem.
It's quite convenient to always use the FSID's root FH, but I agree, it's not required by the protocol.
Re: LEASE_MOVED, I'm not confident the client stops sending RENEW operations when it has no more open state.
> I'm not opposed to putting a backpointer to the super_block in the
> nfs_server, but I do want to understand why it is needed.
Alternately, we could save a pointer to the FSID's root dentry or inode.
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
next prev parent reply other threads:[~2013-06-25 21:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 16:23 [PATCH 0/5] For 3.11 Chuck Lever
2013-06-25 16:23 ` [PATCH 1/5] NFS: Set NFS_CS_MIGRATION for NFSv4 mounts Chuck Lever
2013-06-28 20:03 ` Myklebust, Trond
2013-06-25 16:23 ` [PATCH 2/5] NFS: Use root's credential for lease management when keytab is missing Chuck Lever
2013-06-28 20:11 ` Myklebust, Trond
2013-06-28 20:16 ` Chuck Lever
2013-06-25 16:23 ` [PATCH 3/5] NFS: Never use user credentials for lease renewal Chuck Lever
2013-06-28 20:02 ` Myklebust, Trond
2013-06-28 20:03 ` Chuck Lever
2013-06-28 20:06 ` Myklebust, Trond
2013-06-25 16:23 ` [PATCH 4/5] NFS: Export _nfs_display_fhandle() Chuck Lever
2013-06-25 16:24 ` [PATCH 5/5] NFS: Save FSID's root FH in nfs_server Chuck Lever
2013-06-25 16:37 ` Myklebust, Trond
2013-06-25 20:22 ` Chuck Lever
2013-06-25 21:15 ` Myklebust, Trond
2013-06-25 21:51 ` Chuck Lever [this message]
2013-06-25 22:10 ` Myklebust, Trond
2013-06-26 0:15 ` Chuck Lever
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=2EFD4576-C5AA-4295-9DB2-A5E6BAD5061B@oracle.com \
--to=chuck.lever@oracle.com \
--cc=Trond.Myklebust@netapp.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;
as well as URLs for NNTP newsgroup(s).