aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorPeng Tao <bergwolf@gmail.com>2011-09-22 21:50:15 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-10-18 12:08:14 -0400
commit9b7eecdcfeb943f130d86bbc249fde4994b6fe30 (patch)
tree8aacc21981ce4f482bb5bab7f4e5fc546b6b99ff /fs/nfs/pnfs.c
parent8ce160c5ef06cc89c2b6b26bfa5ef7a5ce2c93e0 (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/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index a205c8e2c731..ee73d9a4f700 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1262,23 +1262,17 @@ EXPORT_SYMBOL_GPL(pnfs_generic_pg_writepages);
1262/* 1262/*
1263 * Called by non rpc-based layout drivers 1263 * Called by non rpc-based layout drivers
1264 */ 1264 */
1265int 1265void pnfs_ld_read_done(struct nfs_read_data *data)
1266pnfs_ld_read_done(struct nfs_read_data *data)
1267{ 1266{
1268 int status; 1267 if (likely(!data->pnfs_error)) {
1269
1270 if (!data->pnfs_error) {
1271 __nfs4_read_done_cb(data); 1268 __nfs4_read_done_cb(data);
1272 data->mds_ops->rpc_call_done(&data->task, data); 1269 data->mds_ops->rpc_call_done(&data->task, data);
1273 data->mds_ops->rpc_release(data); 1270 } else {
1274 return 0; 1271 put_lseg(data->lseg);
1272 data->lseg = NULL;
1273 dprintk("pnfs write error = %d\n", data->pnfs_error);
1275 } 1274 }
1276 1275 data->mds_ops->rpc_release(data);
1277 dprintk("%s: pnfs_error=%d, retry via MDS\n", __func__,
1278 data->pnfs_error);
1279 status = nfs_initiate_read(data, NFS_CLIENT(data->inode),
1280 data->mds_ops);
1281 return status ? : -EAGAIN;
1282} 1276}
1283EXPORT_SYMBOL_GPL(pnfs_ld_read_done); 1277EXPORT_SYMBOL_GPL(pnfs_ld_read_done);
1284 1278