NFSv4: Ensure we do not reuse open owner names

The NFSv4 spec is ambiguous about whether or not it is permissible
to reuse open owner names, so play it safe. This patch adds a timestamp
to the state_owner structure, and combines that with the IDA based
uniquifier.
Fixes a regression whereby the Linux server returns NFS4ERR_BAD_SEQID.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust 2012-04-20 19:24:51 -04:00
commit 95b72eb0bd
5 changed files with 16 additions and 8 deletions

View file

@ -312,6 +312,11 @@ struct nfs4_layoutreturn {
int rpc_status;
};
struct stateowner_id {
__u64 create_time;
__u32 uniquifier;
};
/*
* Arguments to the open call.
*/
@ -321,7 +326,7 @@ struct nfs_openargs {
int open_flags;
fmode_t fmode;
__u64 clientid;
__u64 id;
struct stateowner_id id;
union {
struct {
struct iattr * attrs; /* UNCHECKED, GUARDED */