diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2013-10-17 14:12:50 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-10-28 15:24:00 -0400 |
commit | b03d735b4ca2375d2251195cd848713bc55e7d79 (patch) | |
tree | 5c351a0fbdc47022c74c7db5a9f80235f9105f6a /include/linux/nfs_xdr.h | |
parent | 9e6ee76dfb7cd747fac5679542a9b45930173eec (diff) | |
download | linux-stable-b03d735b4ca2375d2251195cd848713bc55e7d79.tar.gz linux-stable-b03d735b4ca2375d2251195cd848713bc55e7d79.tar.bz2 linux-stable-b03d735b4ca2375d2251195cd848713bc55e7d79.zip |
NFS: Add method to retrieve fs_locations during migration recovery
The nfs4_proc_fs_locations() function is invoked during referral
processing to perform a GETATTR(fs_locations) on an object's parent
directory in order to discover the target of the referral. It
performs a LOOKUP in the compound, so the client needs to know the
parent's file handle a priori.
Unfortunately this function is not adequate for handling migration
recovery. We need to probe fs_locations information on an FSID, but
there's no parent directory available for many operations that
can return NFS4ERR_MOVED.
Another subtlety: recovering from NFS4ERR_LEASE_MOVED is a process
of walking over a list of known FSIDs that reside on the server, and
probing whether they have migrated. Once the server has detected
that the client has probed all migrated file systems, it stops
returning NFS4ERR_LEASE_MOVED.
A minor version zero server needs to know what client ID is
requesting fs_locations information so it can clear the flag that
forces it to continue returning NFS4ERR_LEASE_MOVED. This flag is
set per client ID and per FSID. However, the client ID is not an
argument of either the PUTFH or GETATTR operations. Later minor
versions have client ID information embedded in the compound's
SEQUENCE operation.
Therefore, by convention, minor version zero clients send a RENEW
operation in the same compound as the GETATTR(fs_locations), since
RENEW's one argument is a clientid4. This allows a minor version
zero server to identify correctly the client that is probing for a
migration.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r-- | include/linux/nfs_xdr.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 49f52c8f4422..405dfadcbc3b 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -1053,14 +1053,18 @@ struct nfs4_fs_locations { struct nfs4_fs_locations_arg { struct nfs4_sequence_args seq_args; const struct nfs_fh *dir_fh; + const struct nfs_fh *fh; const struct qstr *name; struct page *page; const u32 *bitmask; + clientid4 clientid; + unsigned char migration:1, renew:1; }; struct nfs4_fs_locations_res { struct nfs4_sequence_res seq_res; struct nfs4_fs_locations *fs_locations; + unsigned char migration:1, renew:1; }; struct nfs4_secinfo4 { |