diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-07 13:20:54 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-19 16:53:15 -0400 |
commit | c1d519312dcdf11532fed9f99a8ecc3547ffd9d6 (patch) | |
tree | f91e0d8df3fc424aaa6eddbc54aaf55bdbfb245b /include | |
parent | 35d05778e25ee16dbddb60331be0bc1309efba19 (diff) |
NFSv4: Only increment the sequence id if the server saw it
It is quite possible that the OPEN, CLOSE, LOCK, LOCKU,... compounds fail
before the actual stateful operation has been executed (for instance in the
PUTFH call). There is no way to tell from the overall status result which
operations were executed from the COMPOUND.
The fix is to move incrementing of the sequence id into the XDR layer,
so that we do it as we process the results from the stateful operation.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_xdr.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index f301d0b8babc..24263bb8e0be 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -140,6 +140,7 @@ struct nfs_openres { | |||
140 | __u32 rflags; | 140 | __u32 rflags; |
141 | struct nfs_fattr * f_attr; | 141 | struct nfs_fattr * f_attr; |
142 | struct nfs_fattr * dir_attr; | 142 | struct nfs_fattr * dir_attr; |
143 | struct nfs_seqid * seqid; | ||
143 | const struct nfs_server *server; | 144 | const struct nfs_server *server; |
144 | int delegation_type; | 145 | int delegation_type; |
145 | nfs4_stateid delegation; | 146 | nfs4_stateid delegation; |
@@ -159,6 +160,7 @@ struct nfs_open_confirmargs { | |||
159 | 160 | ||
160 | struct nfs_open_confirmres { | 161 | struct nfs_open_confirmres { |
161 | nfs4_stateid stateid; | 162 | nfs4_stateid stateid; |
163 | struct nfs_seqid * seqid; | ||
162 | }; | 164 | }; |
163 | 165 | ||
164 | /* | 166 | /* |
@@ -175,6 +177,7 @@ struct nfs_closeargs { | |||
175 | struct nfs_closeres { | 177 | struct nfs_closeres { |
176 | nfs4_stateid stateid; | 178 | nfs4_stateid stateid; |
177 | struct nfs_fattr * fattr; | 179 | struct nfs_fattr * fattr; |
180 | struct nfs_seqid * seqid; | ||
178 | const struct nfs_server *server; | 181 | const struct nfs_server *server; |
179 | }; | 182 | }; |
180 | /* | 183 | /* |
@@ -199,7 +202,9 @@ struct nfs_lock_args { | |||
199 | }; | 202 | }; |
200 | 203 | ||
201 | struct nfs_lock_res { | 204 | struct nfs_lock_res { |
202 | nfs4_stateid stateid; | 205 | nfs4_stateid stateid; |
206 | struct nfs_seqid * lock_seqid; | ||
207 | struct nfs_seqid * open_seqid; | ||
203 | }; | 208 | }; |
204 | 209 | ||
205 | struct nfs_locku_args { | 210 | struct nfs_locku_args { |
@@ -210,7 +215,8 @@ struct nfs_locku_args { | |||
210 | }; | 215 | }; |
211 | 216 | ||
212 | struct nfs_locku_res { | 217 | struct nfs_locku_res { |
213 | nfs4_stateid stateid; | 218 | nfs4_stateid stateid; |
219 | struct nfs_seqid * seqid; | ||
214 | }; | 220 | }; |
215 | 221 | ||
216 | struct nfs_lockt_args { | 222 | struct nfs_lockt_args { |