Re: [PATCH 13/20] NFS: Fix recovery from NFS4ERR_CLID_INUSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-04-26 at 12:24 -0400, Chuck Lever wrote:
> On Apr 23, 2012, at 4:55 PM, Chuck Lever wrote:
> 
> > For NFSv4 minor version 0, currently the cl_id_uniquifier allows the
> > Linux client to generate a unique nfs_client_id4 string whenever a
> > server replies with NFS4ERR_CLID_INUSE.
> > 
> > NFS4ERR_CLID_INUSE actually means that the client has presented this
> > nfs_client_id4 string with a different authentication flavor in the
> > past.  Retrying with a different nfs_client_id4 string means the
> > client orphans NFSv4 state on the server.  This state will take at
> > least a whole lease period to be purged.
> > 
> > Change recovery to try the identification operation again with a
> > different auth flavor until it works.  The retry loop is factored
> > out of nfs4_proc_setclientid() and into the state manager, so that
> > both mv0 and mv1 client ID establishment is covered by the same
> > CLID_INUSE recovery logic.
> > 
> > XXX: On further review, I'm not sure how it would be possible to
> > send an nfs_client_id4 with the wrong authentication flavor, since
> > the au_name is part of the string itself...
> 
> I'm having other doubts about this whole approach.
> 
> In the loop in nfs4_reclaim_lease(), the client will need to replace the RPC transport for each retried flavor, and then continue using the transport that worked.  New mounts clone their transport from the nfs_client, even if its authentication flavor does not match what might have been specified on the mount.  (I haven't checked this, is it true?)
> 
> What's more, there's no way a server can identify a re-used nfs_client_id4, since we currently plant the authentication flavor in the nfs_client_id4 string…
> 
> In fact, because we generate nfs_client_id4 strings with the flavor built in, won't each flavor used on a mount generate a separate lease on the server?

Then lets move the flavour out of the clientid string, and just settle
for handling CLID_INUSE by changing the flavour on the SETCLIENTID call.

Cheers
  Trond

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux