提交 5c0b4129 编写于 作者: B Boaz Harrosh 提交者: Trond Myklebust

pnfs-obj: pNFS errors are communicated on iodata->pnfs_error

Some time along the way pNFS IO errors were switched to
communicate with a special iodata->pnfs_error member instead
of the regular RPC members. But objlayout was not switched
over.

Fix that!
Without this fix any IO error is hanged, because IO is not
switched to MDS and pages are never cleared or read.

[Applies to 3.2.0. Same bug different patch for 3.1/0 Kernels]
CC: Stable Tree <stable@kernel.org>
Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 0aaaf5c4
...@@ -254,6 +254,8 @@ objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync) ...@@ -254,6 +254,8 @@ objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
oir->status = rdata->task.tk_status = status; oir->status = rdata->task.tk_status = status;
if (status >= 0) if (status >= 0)
rdata->res.count = status; rdata->res.count = status;
else
rdata->pnfs_error = status;
objlayout_iodone(oir); objlayout_iodone(oir);
/* must not use oir after this point */ /* must not use oir after this point */
...@@ -334,6 +336,8 @@ objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync) ...@@ -334,6 +336,8 @@ objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
if (status >= 0) { if (status >= 0) {
wdata->res.count = status; wdata->res.count = status;
wdata->verf.committed = oir->committed; wdata->verf.committed = oir->committed;
} else {
wdata->pnfs_error = status;
} }
objlayout_iodone(oir); objlayout_iodone(oir);
/* must not use oir after this point */ /* must not use oir after this point */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册