diff options
author | Peng Tao <bergwolf@gmail.com> | 2012-01-12 10:18:43 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-12 16:38:51 -0500 |
commit | 82b906d6550ee5fe0d5553359b3c9692dd0aed31 (patch) | |
tree | 781821e3635458fc88cba66e8d68f8e3d671d7aa /fs | |
parent | 39e567ae36fe03c2b446e1b83ee3d39bea08f90b (diff) |
pnfsblock: set read/write tk_status to pnfs_error
To pass the IO status to upper layer.
Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 281ae95932c9..06fe08021182 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c | |||
@@ -216,6 +216,7 @@ bl_end_par_io_read(void *data) | |||
216 | { | 216 | { |
217 | struct nfs_read_data *rdata = data; | 217 | struct nfs_read_data *rdata = data; |
218 | 218 | ||
219 | rdata->task.tk_status = rdata->pnfs_error; | ||
219 | INIT_WORK(&rdata->task.u.tk_work, bl_read_cleanup); | 220 | INIT_WORK(&rdata->task.u.tk_work, bl_read_cleanup); |
220 | schedule_work(&rdata->task.u.tk_work); | 221 | schedule_work(&rdata->task.u.tk_work); |
221 | } | 222 | } |
@@ -405,7 +406,7 @@ static void bl_end_par_io_write(void *data) | |||
405 | { | 406 | { |
406 | struct nfs_write_data *wdata = data; | 407 | struct nfs_write_data *wdata = data; |
407 | 408 | ||
408 | wdata->task.tk_status = 0; | 409 | wdata->task.tk_status = wdata->pnfs_error; |
409 | wdata->verf.committed = NFS_FILE_SYNC; | 410 | wdata->verf.committed = NFS_FILE_SYNC; |
410 | INIT_WORK(&wdata->task.u.tk_work, bl_write_cleanup); | 411 | INIT_WORK(&wdata->task.u.tk_work, bl_write_cleanup); |
411 | schedule_work(&wdata->task.u.tk_work); | 412 | schedule_work(&wdata->task.u.tk_work); |