From patchwork Wed Jun 15 21:43:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 883622 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5FLhnWx024659 for ; Wed, 15 Jun 2011 21:43:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752035Ab1FOVns (ORCPT ); Wed, 15 Jun 2011 17:43:48 -0400 Received: from daytona.panasas.com ([67.152.220.89]:1646 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752383Ab1FOVnr (ORCPT ); Wed, 15 Jun 2011 17:43:47 -0400 Received: from [172.17.33.134] ([172.17.33.134]) by daytona.panasas.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 15 Jun 2011 17:43:38 -0400 Message-ID: <4DF9278A.5010103@panasas.com> Date: Wed, 15 Jun 2011 17:43:38 -0400 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.38.b3pre.fc13 Thunderbird/3.1.9 MIME-Version: 1.0 To: Benny Halevy , NFS list Subject: [PATCH] FIXME: BUG wdata->mds_offset never gets set X-OriginalArrivalTime: 15 Jun 2011 21:43:38.0725 (UTC) FILETIME=[495BC150:01CC2BA5] 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]); Wed, 15 Jun 2011 21:43:49 +0000 (UTC) The fileslayout and blockslayout drivers had a set of wdata->mds_offset in their .write_pagelist member. The objects driver did not. Which breaks layout_commit. FIXME: Since all drivers set mds_offset in exactly the same place to the same value. And then never touch it. It calls for the generic layer to take care of it. (I'll send the fix tomorrow) Signed-off-by: Boaz Harrosh --- fs/nfs/objlayout/objlayout.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c index dc3956c..96dd474 100644 --- a/fs/nfs/objlayout/objlayout.c +++ b/fs/nfs/objlayout/objlayout.c @@ -430,6 +430,8 @@ objlayout_write_pagelist(struct nfs_write_data *wdata, status = objio_write_pagelist(state, how & FLUSH_STABLE); out: dprintk("%s: Return status %Zd\n", __func__, status); + /* pnfs_set_layoutcommit needs this */ + wdata->mds_offset = wdata->args.offset; wdata->pnfs_error = status; return PNFS_ATTEMPTED; }