]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nfs/read.c
Merge remote-tracking branch 'hid/for-next'
[karo-tx-linux.git] / fs / nfs / read.c
index 01b8cc8e8cfc436784052bf5e92a7c21a1230012..0a5e33f33b5c83c73e69f1bab538bbb254175c16 100644 (file)
@@ -246,6 +246,13 @@ static void nfs_readpage_retry(struct rpc_task *task,
                nfs_set_pgio_error(hdr, -EIO, argp->offset);
                return;
        }
+
+       /* For non rpc-based layout drivers, retry-through-MDS */
+       if (!task->tk_ops) {
+               hdr->pnfs_error = -EAGAIN;
+               return;
+       }
+
        /* Yes, so retry the read at the end of the hdr */
        hdr->mds_offset += resp->count;
        argp->offset += resp->count;
@@ -268,7 +275,7 @@ static void nfs_readpage_result(struct rpc_task *task,
                        hdr->good_bytes = bound - hdr->io_start;
                }
                spin_unlock(&hdr->lock);
-       } else if (hdr->res.count != hdr->args.count)
+       } else if (hdr->res.count < hdr->args.count)
                nfs_readpage_retry(task, hdr);
 }