Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308624
b: refs/heads/master
c: 0ad2f37
h: refs/heads/master
v: v3
  • Loading branch information
Andy Adamson authored and Trond Myklebust committed May 19, 2012
1 parent fac95a4 commit 664831c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a033a09189c0125d56f2ac17ffb4bec5a3d3323b
refs/heads/master: 0ad2f378e1af7996d6f8355c02181ff3cc7ab260
20 changes: 20 additions & 0 deletions trunk/fs/nfs/nfs4filelayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,14 @@ filelayout_set_layoutcommit(struct nfs_write_data *wdata)
static void filelayout_read_prepare(struct rpc_task *task, void *data)
{
struct nfs_read_data *rdata = data;
struct pnfs_layout_segment *lseg = rdata->header->lseg;

if (filelayout_test_devid_invalid(FILELAYOUT_DEVID_NODE(lseg))) {
dprintk("%s task %u reset io to MDS\n", __func__, task->tk_pid);
filelayout_reset_read(rdata);
rpc_exit(task, 0);
return;
}
rdata->read_done_cb = filelayout_read_done_cb;

if (nfs41_setup_sequence(rdata->ds_clp->cl_session,
Expand All @@ -269,6 +276,9 @@ static void filelayout_read_call_done(struct rpc_task *task, void *data)

dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status);

if (test_bit(NFS_IOHDR_REDO, &rdata->header->flags))
return;

/* Note this may cause RPC to be resent */
rdata->header->mds_ops->rpc_call_done(task, data);
}
Expand Down Expand Up @@ -343,7 +353,14 @@ static int filelayout_commit_done_cb(struct rpc_task *task,
static void filelayout_write_prepare(struct rpc_task *task, void *data)
{
struct nfs_write_data *wdata = data;
struct pnfs_layout_segment *lseg = wdata->header->lseg;

if (filelayout_test_devid_invalid(FILELAYOUT_DEVID_NODE(lseg))) {
dprintk("%s task %u reset io to MDS\n", __func__, task->tk_pid);
filelayout_reset_write(wdata);
rpc_exit(task, 0);
return;
}
if (nfs41_setup_sequence(wdata->ds_clp->cl_session,
&wdata->args.seq_args, &wdata->res.seq_res,
task))
Expand All @@ -356,6 +373,9 @@ static void filelayout_write_call_done(struct rpc_task *task, void *data)
{
struct nfs_write_data *wdata = data;

if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags))
return;

/* Note this may cause RPC to be resent */
wdata->header->mds_ops->rpc_call_done(task, data);
}
Expand Down

0 comments on commit 664831c

Please sign in to comment.