From patchwork Thu May 19 19:10:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaliy Gusev X-Patchwork-Id: 799562 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4JJB9Qm008102 for ; Thu, 19 May 2011 19:11:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933792Ab1ESTLI (ORCPT ); Thu, 19 May 2011 15:11:08 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:48156 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933727Ab1ESTLH (ORCPT ); Thu, 19 May 2011 15:11:07 -0400 Received: by fxm17 with SMTP id 17so2213417fxm.19 for ; Thu, 19 May 2011 12:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=K16MaLhA0Kcxmxv11uIlriZJoLnHZxNCkJ2byAJZM8Q=; b=k84D0qFaRONUykBasrprAOREaZ6v1ZprEbdEgbMFZBRWTUjGoQ9qrYPrSjjyj9v9wL FdYy6V6qoVPtn+mfzr4Ho8z8rt5QxyMSxx2xYHiEMd2jHwcAPl0lB8KVraRml1pnn3rt 51E2mhAWSUqeX7AWniqr+5/TCZroeWJfuUSxk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=u5qjQ/+Feqo7kX2kd7fROdstGUl1iIAdhjGwkyLsir6ZiXOzXzDqOO1pRiF5WR+GzW jUpGDHplNvDeQ3ekoisFY4WWW+5FB+OIxy+wKQ3kxFvKyPyb0PTOQqrAp5Wj1Yo3zYMM DX2C1uURemQRQCtnjcqChU2yVu+NvakbCyh94= Received: by 10.223.99.85 with SMTP id t21mr4216395fan.102.1305832265929; Thu, 19 May 2011 12:11:05 -0700 (PDT) Received: from vT510.golden.ru ([2.93.207.146]) by mx.google.com with ESMTPS id d18sm1175725fak.22.2011.05.19.12.11.04 (version=SSLv3 cipher=OTHER); Thu, 19 May 2011 12:11:05 -0700 (PDT) From: Vitaliy Gusev To: Trond.Myklebust@netapp.com Cc: andros@netapp.com, linux-nfs@vger.kernel.org, Vitaliy Gusev Subject: [PATCH] nfs41: Correct offset for LAYOUTCOMMIT Date: Thu, 19 May 2011 23:10:45 +0400 Message-Id: <1305832245-17318-1-git-send-email-gusev.vitaliy@nexenta.com> X-Mailer: git-send-email 1.7.4.1 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 (demeter2.kernel.org [140.211.167.43]); Thu, 19 May 2011 19:11:09 +0000 (UTC) A client sends offset to MDS as it was seen by DS. As result, file size after copy is only half of original file size in case of 2 DS. Signed-off-by: Vitaliy Gusev --- fs/nfs/nfs4filelayout.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index be79dc9..790eb1d 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -167,6 +167,7 @@ filelayout_set_layoutcommit(struct nfs_write_data *wdata) wdata->res.verf->committed == NFS_FILE_SYNC) return; + wdata->args.offset = wdata->mds_offset; pnfs_set_layoutcommit(wdata); dprintk("%s ionde %lu pls_end_pos %lu\n", __func__, wdata->inode->i_ino, (unsigned long) wdata->lseg->pls_end_pos);