diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-20 19:24:51 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-20 23:14:28 -0400 |
commit | 95b72eb0bdef6476b7e73061f0382adf46c5495a (patch) | |
tree | db1cbb01793ac5f744defb73e869373fefb7d0ce /include/linux/nfs_xdr.h | |
parent | 98a2139f4f4d7b5fcc3a54c7fddbe88612abed20 (diff) |
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>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r-- | include/linux/nfs_xdr.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index bfd0d1bf6707..7ba3551a0414 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -312,6 +312,11 @@ struct nfs4_layoutreturn { | |||
312 | int rpc_status; | 312 | int rpc_status; |
313 | }; | 313 | }; |
314 | 314 | ||
315 | struct stateowner_id { | ||
316 | __u64 create_time; | ||
317 | __u32 uniquifier; | ||
318 | }; | ||
319 | |||
315 | /* | 320 | /* |
316 | * Arguments to the open call. | 321 | * Arguments to the open call. |
317 | */ | 322 | */ |
@@ -321,7 +326,7 @@ struct nfs_openargs { | |||
321 | int open_flags; | 326 | int open_flags; |
322 | fmode_t fmode; | 327 | fmode_t fmode; |
323 | __u64 clientid; | 328 | __u64 clientid; |
324 | __u64 id; | 329 | struct stateowner_id id; |
325 | union { | 330 | union { |
326 | struct { | 331 | struct { |
327 | struct iattr * attrs; /* UNCHECKED, GUARDED */ | 332 | struct iattr * attrs; /* UNCHECKED, GUARDED */ |