From patchwork Fri Feb 11 01:52:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 550161 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1BI0iW3025866 for ; Fri, 11 Feb 2011 18:00:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757882Ab1BKSAq (ORCPT ); Fri, 11 Feb 2011 13:00:46 -0500 Received: from mx2.netapp.com ([216.240.18.37]:51331 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757832Ab1BKSAo (ORCPT ); Fri, 11 Feb 2011 13:00:44 -0500 X-IronPort-AV: E=Sophos;i="4.60,456,1291622400"; d="scan'208";a="517277548" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 11 Feb 2011 10:00:36 -0800 Received: from localhost.localdomain (lacsina2-lxp.hq.netapp.com [10.58.58.196] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p1BI0PWC026041; Fri, 11 Feb 2011 10:00:35 -0800 (PST) From: andros@netapp.com To: bhalevy@panasas.com Cc: linux-nfs@vger.kernel.org, Andy Adamson Subject: [PATCH 08/17] SQUASHME reset offset to mds_offset Date: Thu, 10 Feb 2011 20:52:41 -0500 Message-Id: <1297389170-26702-9-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.6.6 In-Reply-To: <1297389170-26702-8-git-send-email-andros@netapp.com> References: <1297389170-26702-1-git-send-email-andros@netapp.com> <1297389170-26702-2-git-send-email-andros@netapp.com> <1297389170-26702-3-git-send-email-andros@netapp.com> <1297389170-26702-4-git-send-email-andros@netapp.com> <1297389170-26702-5-git-send-email-andros@netapp.com> <1297389170-26702-6-git-send-email-andros@netapp.com> <1297389170-26702-7-git-send-email-andros@netapp.com> <1297389170-26702-8-git-send-email-andros@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 11 Feb 2011 18:00:48 +0000 (UTC) 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;