aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-01 09:22:20 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 13:46:43 -0400
commit19ddab06ed923d27339b8009d37b0ab3de93cadf (patch)
tree7a70f629c07780c3d539fcf896a10d488a4df8d3 /fs
parent69ab40c4c3b9622232e31e0ee145875a2853c113 (diff)
nfs41: close sequence setup/done support
Separate nfs4_close calls from nfs41: sequence setup/done support Call nfs4_sequence_done from respective rpc_call_done methods. Note that we need to pass a pointer to the nfs_server in calls data for passing on to nfs4_sequence_done. Signed-off-by: Andy Adamson<andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [pnfs: client data server write validate and release] Signed-off-by: Andy Adamson<andros@umich.edu> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: separate free slot from sequence done] [nfs41: sequence res use slotid] [nfs41: remove SEQ4_STATUS_USE_TK_STATUS] [nfs41: nfs4_sequence_free_slot use nfs_client for data server] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a8e0b3573594..a34fada51446 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1630,6 +1630,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
1630 struct nfs4_state *state = calldata->state; 1630 struct nfs4_state *state = calldata->state;
1631 struct nfs_server *server = NFS_SERVER(calldata->inode); 1631 struct nfs_server *server = NFS_SERVER(calldata->inode);
1632 1632
1633 nfs4_sequence_done(server, &calldata->res.seq_res, task->tk_status);
1633 if (RPC_ASSASSINATED(task)) 1634 if (RPC_ASSASSINATED(task))
1634 return; 1635 return;
1635 /* hmm. we are done with the inode, and in the process of freeing 1636 /* hmm. we are done with the inode, and in the process of freeing
@@ -1652,6 +1653,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
1652 return; 1653 return;
1653 } 1654 }
1654 } 1655 }
1656 nfs4_sequence_free_slot(server->nfs_client, &calldata->res.seq_res);
1655 nfs_refresh_inode(calldata->inode, calldata->res.fattr); 1657 nfs_refresh_inode(calldata->inode, calldata->res.fattr);
1656} 1658}
1657 1659
@@ -1692,6 +1694,10 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
1692 calldata->arg.fmode = FMODE_WRITE; 1694 calldata->arg.fmode = FMODE_WRITE;
1693 } 1695 }
1694 calldata->timestamp = jiffies; 1696 calldata->timestamp = jiffies;
1697 if (nfs4_setup_sequence((NFS_SERVER(calldata->inode))->nfs_client,
1698 &calldata->arg.seq_args, &calldata->res.seq_res,
1699 1, task))
1700 return;
1695 rpc_call_start(task); 1701 rpc_call_start(task);
1696} 1702}
1697 1703
@@ -1731,7 +1737,7 @@ int nfs4_do_close(struct path *path, struct nfs4_state *state, int wait)
1731 }; 1737 };
1732 int status = -ENOMEM; 1738 int status = -ENOMEM;
1733 1739
1734 calldata = kmalloc(sizeof(*calldata), GFP_KERNEL); 1740 calldata = kzalloc(sizeof(*calldata), GFP_KERNEL);
1735 if (calldata == NULL) 1741 if (calldata == NULL)
1736 goto out; 1742 goto out;
1737 calldata->inode = state->inode; 1743 calldata->inode = state->inode;