diff options
author | Andy Adamson <andros@netapp.com> | 2009-04-01 09:22:05 -0400 |
---|---|---|
committer | Benny Halevy <bhalevy@panasas.com> | 2009-06-17 13:46:30 -0400 |
commit | 5f7dbd5c752d88310d8fe1feedefd5c6496eff48 (patch) | |
tree | 870e270d87cf112494500b655f08980539ffa291 | |
parent | f3752975caa716709c5ea0b0820b86111d921df4 (diff) |
nfs41: set up seq_res.sr_slotid
Initialize nfs4_sequence_res sr_slotid to NFS4_MAX_SLOT_TABLE.
[was nfs41: sequence res use slotid]
Signed-off-by: Andy Adamson <andros@netapp.com>
[pulled definition of struct nfs4_sequence_res.sr_slotid to here]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 | ||||
-rw-r--r-- | fs/nfs/read.c | 1 | ||||
-rw-r--r-- | fs/nfs/unlink.c | 1 | ||||
-rw-r--r-- | fs/nfs/write.c | 2 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 1 |
5 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 49cf969417c..5878930b4c3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -371,6 +371,7 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct path *path, | |||
371 | p->o_arg.server = server; | 371 | p->o_arg.server = server; |
372 | p->o_arg.bitmask = server->attr_bitmask; | 372 | p->o_arg.bitmask = server->attr_bitmask; |
373 | p->o_arg.claim = NFS4_OPEN_CLAIM_NULL; | 373 | p->o_arg.claim = NFS4_OPEN_CLAIM_NULL; |
374 | p->o_res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
374 | if (flags & O_EXCL) { | 375 | if (flags & O_EXCL) { |
375 | u32 *s = (u32 *) p->o_arg.u.verifier.data; | 376 | u32 *s = (u32 *) p->o_arg.u.verifier.data; |
376 | s[0] = jiffies; | 377 | s[0] = jiffies; |
@@ -1463,6 +1464,7 @@ int nfs4_do_close(struct path *path, struct nfs4_state *state, int wait) | |||
1463 | calldata->res.fattr = &calldata->fattr; | 1464 | calldata->res.fattr = &calldata->fattr; |
1464 | calldata->res.seqid = calldata->arg.seqid; | 1465 | calldata->res.seqid = calldata->arg.seqid; |
1465 | calldata->res.server = server; | 1466 | calldata->res.server = server; |
1467 | calldata->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
1466 | calldata->path.mnt = mntget(path->mnt); | 1468 | calldata->path.mnt = mntget(path->mnt); |
1467 | calldata->path.dentry = dget(path->dentry); | 1469 | calldata->path.dentry = dget(path->dentry); |
1468 | 1470 | ||
@@ -3088,6 +3090,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, co | |||
3088 | memcpy(&data->stateid, stateid, sizeof(data->stateid)); | 3090 | memcpy(&data->stateid, stateid, sizeof(data->stateid)); |
3089 | data->res.fattr = &data->fattr; | 3091 | data->res.fattr = &data->fattr; |
3090 | data->res.server = server; | 3092 | data->res.server = server; |
3093 | data->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
3091 | nfs_fattr_init(data->res.fattr); | 3094 | nfs_fattr_init(data->res.fattr); |
3092 | data->timestamp = jiffies; | 3095 | data->timestamp = jiffies; |
3093 | data->rpc_status = 0; | 3096 | data->rpc_status = 0; |
@@ -3240,6 +3243,7 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl, | |||
3240 | p->arg.fl = &p->fl; | 3243 | p->arg.fl = &p->fl; |
3241 | p->arg.seqid = seqid; | 3244 | p->arg.seqid = seqid; |
3242 | p->res.seqid = seqid; | 3245 | p->res.seqid = seqid; |
3246 | p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
3243 | p->arg.stateid = &lsp->ls_stateid; | 3247 | p->arg.stateid = &lsp->ls_stateid; |
3244 | p->lsp = lsp; | 3248 | p->lsp = lsp; |
3245 | atomic_inc(&lsp->ls_count); | 3249 | atomic_inc(&lsp->ls_count); |
@@ -3412,6 +3416,7 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl, | |||
3412 | p->arg.lock_owner.clientid = server->nfs_client->cl_clientid; | 3416 | p->arg.lock_owner.clientid = server->nfs_client->cl_clientid; |
3413 | p->arg.lock_owner.id = lsp->ls_id.id; | 3417 | p->arg.lock_owner.id = lsp->ls_id.id; |
3414 | p->res.lock_seqid = p->arg.lock_seqid; | 3418 | p->res.lock_seqid = p->arg.lock_seqid; |
3419 | p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
3415 | p->lsp = lsp; | 3420 | p->lsp = lsp; |
3416 | atomic_inc(&lsp->ls_count); | 3421 | atomic_inc(&lsp->ls_count); |
3417 | p->ctx = get_nfs_open_context(ctx); | 3422 | p->ctx = get_nfs_open_context(ctx); |
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 4ace3c50a8e..70ba2b4cb9a 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -46,6 +46,7 @@ struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) | |||
46 | memset(p, 0, sizeof(*p)); | 46 | memset(p, 0, sizeof(*p)); |
47 | INIT_LIST_HEAD(&p->pages); | 47 | INIT_LIST_HEAD(&p->pages); |
48 | p->npages = pagecount; | 48 | p->npages = pagecount; |
49 | p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
49 | if (pagecount <= ARRAY_SIZE(p->page_array)) | 50 | if (pagecount <= ARRAY_SIZE(p->page_array)) |
50 | p->pagevec = p->page_array; | 51 | p->pagevec = p->page_array; |
51 | else { | 52 | else { |
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index ecc29534777..83d0ce2600a 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c | |||
@@ -241,6 +241,7 @@ nfs_async_unlink(struct inode *dir, struct dentry *dentry) | |||
241 | status = PTR_ERR(data->cred); | 241 | status = PTR_ERR(data->cred); |
242 | goto out_free; | 242 | goto out_free; |
243 | } | 243 | } |
244 | data->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
244 | 245 | ||
245 | status = -EBUSY; | 246 | status = -EBUSY; |
246 | spin_lock(&dentry->d_lock); | 247 | spin_lock(&dentry->d_lock); |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index e560a78995a..035e6fb9f57 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -52,6 +52,7 @@ struct nfs_write_data *nfs_commitdata_alloc(void) | |||
52 | if (p) { | 52 | if (p) { |
53 | memset(p, 0, sizeof(*p)); | 53 | memset(p, 0, sizeof(*p)); |
54 | INIT_LIST_HEAD(&p->pages); | 54 | INIT_LIST_HEAD(&p->pages); |
55 | p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
55 | } | 56 | } |
56 | return p; | 57 | return p; |
57 | } | 58 | } |
@@ -71,6 +72,7 @@ struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) | |||
71 | memset(p, 0, sizeof(*p)); | 72 | memset(p, 0, sizeof(*p)); |
72 | INIT_LIST_HEAD(&p->pages); | 73 | INIT_LIST_HEAD(&p->pages); |
73 | p->npages = pagecount; | 74 | p->npages = pagecount; |
75 | p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; | ||
74 | if (pagecount <= ARRAY_SIZE(p->page_array)) | 76 | if (pagecount <= ARRAY_SIZE(p->page_array)) |
75 | p->pagevec = p->page_array; | 77 | p->pagevec = p->page_array; |
76 | else { | 78 | else { |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index f5675063f95..db0d1236aae 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -167,6 +167,7 @@ struct nfs4_sequence_args { | |||
167 | 167 | ||
168 | struct nfs4_sequence_res { | 168 | struct nfs4_sequence_res { |
169 | struct nfs4_session *sr_session; | 169 | struct nfs4_session *sr_session; |
170 | u8 sr_slotid; /* slot used to send request */ | ||
170 | }; | 171 | }; |
171 | 172 | ||
172 | /* | 173 | /* |