diff options
author | Peng Tao <bergwolf@gmail.com> | 2011-09-22 21:50:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:42:58 -0800 |
commit | 01e4e1d23615e3b970480c63f7d9b0eeb4daa276 (patch) | |
tree | 8f782d0dc918f853d78411e133701e36f862547d /fs/nfs/read.c | |
parent | 626a6d5541e87d0812a5246f46462a83f89ce683 (diff) |
pnfs: recoalesce when ld read pagelist fails
commit 9b7eecdcfeb943f130d86bbc249fde4994b6fe30 upstream.
For pnfs pagelist read failure, we need to pg_recoalesce and resend IO to
mds.
Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Jim Rees <rees@umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r-- | fs/nfs/read.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 2171c043ab08..bfc20b160243 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -541,13 +541,23 @@ static void nfs_readpage_result_full(struct rpc_task *task, void *calldata) static void nfs_readpage_release_full(void *calldata) { struct nfs_read_data *data = calldata; + struct nfs_pageio_descriptor pgio; + if (data->pnfs_error) { + nfs_pageio_init_read_mds(&pgio, data->inode); + pgio.pg_recoalesce = 1; + } while (!list_empty(&data->pages)) { struct nfs_page *req = nfs_list_entry(data->pages.next); nfs_list_remove_request(req); - nfs_readpage_release(req); + if (!data->pnfs_error) + nfs_readpage_release(req); + else + nfs_pageio_add_request(&pgio, req); } + if (data->pnfs_error) + nfs_pageio_complete(&pgio); nfs_readdata_release(calldata); } |