aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 01b8cc8e8cfc..0a5e33f33b5c 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -246,6 +246,13 @@ static void nfs_readpage_retry(struct rpc_task *task,
246 nfs_set_pgio_error(hdr, -EIO, argp->offset); 246 nfs_set_pgio_error(hdr, -EIO, argp->offset);
247 return; 247 return;
248 } 248 }
249
250 /* For non rpc-based layout drivers, retry-through-MDS */
251 if (!task->tk_ops) {
252 hdr->pnfs_error = -EAGAIN;
253 return;
254 }
255
249 /* Yes, so retry the read at the end of the hdr */ 256 /* Yes, so retry the read at the end of the hdr */
250 hdr->mds_offset += resp->count; 257 hdr->mds_offset += resp->count;
251 argp->offset += resp->count; 258 argp->offset += resp->count;
@@ -268,7 +275,7 @@ static void nfs_readpage_result(struct rpc_task *task,
268 hdr->good_bytes = bound - hdr->io_start; 275 hdr->good_bytes = bound - hdr->io_start;
269 } 276 }
270 spin_unlock(&hdr->lock); 277 spin_unlock(&hdr->lock);
271 } else if (hdr->res.count != hdr->args.count) 278 } else if (hdr->res.count < hdr->args.count)
272 nfs_readpage_retry(task, hdr); 279 nfs_readpage_retry(task, hdr);
273} 280}
274 281