[08/17] SQUASHME reset offset to mds_offset
diff mbox

Message ID 1297389170-26702-9-git-send-email-andros@netapp.com
State RFC, archived
Headers show

Commit Message

Andy Adamson Feb. 11, 2011, 1:52 a.m. UTC
None

Patch
diff mbox

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 64a0d4f..f396853 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3108,10 +3108,12 @@  static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message
 	msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ];
 }
 
-/* Reset the the nfs_read_data to send the read to another server. */
+/* Reset the the nfs_read_data to send the read to the MDS. */
 void nfs4_reset_read(struct rpc_task *task, struct nfs_read_data *data)
 {
 	dprintk("%s Reset task for i/o through \n", __func__);
+	/* offsets will differ in the dense stripe case */
+	data->args.offset = data->mds_offset;
 	data->ds_clp = NULL;
 	data->args.fh     = NFS_FH(data->inode);
 	data->read_done_cb = nfs4_read_done_cb;
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index cb0b239..896dc4e 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -393,6 +393,7 @@  static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data
 		return;
 
 	/* Yes, so retry the read at the end of the data */
+	data->mds_offset += resp->count;
 	argp->offset += resp->count;
 	argp->pgbase += resp->count;
 	argp->count -= resp->count;