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>
This commit is contained in:
committed by
Trond Myklebust
parent
8ce160c5ef
commit
9b7eecdcfe
+11
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user