diff options
author | Peng Tao <bergwolf@gmail.com> | 2011-09-22 21:50:15 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-10-18 12:08:14 -0400 |
commit | 9b7eecdcfeb943f130d86bbc249fde4994b6fe30 (patch) | |
tree | 8aacc21981ce4f482bb5bab7f4e5fc546b6b99ff /fs/nfs/read.c | |
parent | 8ce160c5ef06cc89c2b6b26bfa5ef7a5ce2c93e0 (diff) |
pnfs: recoalesce when ld read pagelist fails
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>
Cc: stable@kernel.org [3.0]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
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) | |||
541 | static void nfs_readpage_release_full(void *calldata) | 541 | static void nfs_readpage_release_full(void *calldata) |
542 | { | 542 | { |
543 | struct nfs_read_data *data = calldata; | 543 | struct nfs_read_data *data = calldata; |
544 | struct nfs_pageio_descriptor pgio; | ||
544 | 545 | ||
546 | if (data->pnfs_error) { | ||
547 | nfs_pageio_init_read_mds(&pgio, data->inode); | ||
548 | pgio.pg_recoalesce = 1; | ||
549 | } | ||
545 | while (!list_empty(&data->pages)) { | 550 | while (!list_empty(&data->pages)) { |
546 | struct nfs_page *req = nfs_list_entry(data->pages.next); | 551 | struct nfs_page *req = nfs_list_entry(data->pages.next); |
547 | 552 | ||
548 | nfs_list_remove_request(req); | 553 | nfs_list_remove_request(req); |
549 | nfs_readpage_release(req); | 554 | if (!data->pnfs_error) |
555 | nfs_readpage_release(req); | ||
556 | else | ||
557 | nfs_pageio_add_request(&pgio, req); | ||
550 | } | 558 | } |
559 | if (data->pnfs_error) | ||
560 | nfs_pageio_complete(&pgio); | ||
551 | nfs_readdata_release(calldata); | 561 | nfs_readdata_release(calldata); |
552 | } | 562 | } |
553 | 563 | ||