aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/objlayout/objlayout.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2012-01-06 02:28:12 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-06 08:55:23 -0500
commit5c0b4129c07b902b27d3f3ebc087757f534a3abd (patch)
treee151131804faa70f79baf4ae35d550f638ee22c4 /fs/nfs/objlayout/objlayout.c
parent0aaaf5c424c7ffd6b0c4253251356558b16ef3a2 (diff)
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: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/objlayout/objlayout.c')
-rw-r--r--fs/nfs/objlayout/objlayout.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c
index 72074e3a04f9..b3c29039f5b8 100644
--- a/fs/nfs/objlayout/objlayout.c
+++ b/fs/nfs/objlayout/objlayout.c
@@ -254,6 +254,8 @@ objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
254 oir->status = rdata->task.tk_status = status; 254 oir->status = rdata->task.tk_status = status;
255 if (status >= 0) 255 if (status >= 0)
256 rdata->res.count = status; 256 rdata->res.count = status;
257 else
258 rdata->pnfs_error = status;
257 objlayout_iodone(oir); 259 objlayout_iodone(oir);
258 /* must not use oir after this point */ 260 /* must not use oir after this point */
259 261
@@ -334,6 +336,8 @@ objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
334 if (status >= 0) { 336 if (status >= 0) {
335 wdata->res.count = status; 337 wdata->res.count = status;
336 wdata->verf.committed = oir->committed; 338 wdata->verf.committed = oir->committed;
339 } else {
340 wdata->pnfs_error = status;
337 } 341 }
338 objlayout_iodone(oir); 342 objlayout_iodone(oir);
339 /* must not use oir after this point */ 343 /* must not use oir after this point */