From patchwork Mon Nov 26 09:26:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 1801211 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 18D853FC23 for ; Mon, 26 Nov 2012 09:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754548Ab2KZJ0U (ORCPT ); Mon, 26 Nov 2012 04:26:20 -0500 Received: from mail-ea0-f174.google.com ([209.85.215.174]:52987 "EHLO mail-ea0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754489Ab2KZJ0T (ORCPT ); Mon, 26 Nov 2012 04:26:19 -0500 Received: by mail-ea0-f174.google.com with SMTP id e13so4312730eaa.19 for ; Mon, 26 Nov 2012 01:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer; bh=aoaLDdMkRR06AbLQGOCHN2WIixYXmtuFUDNCVZ8OMIA=; b=VxYSerk1DuPPN9QCSi/4J194sUgD2YMdJBVENQ7py7v8ZU4Db5jfNDrJLNpeKBkX1i 2ZI5o1549eYiEM/aD44TcgBMw9wjacU5epEeXW8vV2PBYe/iKjLpMWb9FdWc7mnCyk74 E0fJFcCMMwBq7Hv72Sw5HHG473LEgrB2Yx2yu01P1L8Ap05mfR5VTkiN83vzfJlv/zgn DHkIHszk5ngjDDt+vdKhy8fNW/xBBrq2DWTjXDtN+b495EoLGgViYibr7Sm8vVHqECMO qSWcMyJLKrIdfxo/3khPUnuDb8pzJefdkMUMGpTIzI0OeHitD3uFp6NsyW3KVmOa6PMw X2xg== Received: by 10.14.215.194 with SMTP id e42mr10771047eep.32.1353921978479; Mon, 26 Nov 2012 01:26:18 -0800 (PST) Received: from bhalevy-lt.il.tonian.com ([46.120.7.251]) by mx.google.com with ESMTPS id y44sm33027519eel.14.2012.11.26.01.26.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 01:26:17 -0800 (PST) From: Benny Halevy To: linux-nfs@vger.kernel.org Subject: [PATCH] pnfsd-lexp: CONFIG_PNFSD_LEXP_COMMIT_THRU_MDS Date: Mon, 26 Nov 2012 11:26:14 +0200 Message-Id: <1353921974-19637-1-git-send-email-bhalevy@tonian.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Benny Halevy --- fs/nfsd/Kconfig | 7 +++++++ fs/nfsd/pnfsd_lexp.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig index d5ceec0..54b828e 100644 --- a/fs/nfsd/Kconfig +++ b/fs/nfsd/Kconfig @@ -139,3 +139,10 @@ config PNFSD_LEXP_RETURN_ON_CLOSE default y help Set return_on_close response flag. + +config PNFSD_LEXP_COMMIT_THRU_MDS + bool "Reply to LAYOUTGET with commit_thru_mds set to true" + depends on PNFSD_LOCAL_EXPORT + default n + help + Set commit_thru_mds nfl_util response flag. diff --git a/fs/nfsd/pnfsd_lexp.c b/fs/nfsd/pnfsd_lexp.c index 33a724c..bcdb80f 100644 --- a/fs/nfsd/pnfsd_lexp.c +++ b/fs/nfsd/pnfsd_lexp.c @@ -168,7 +168,11 @@ static int get_stripe_unit(int blocksize) /* Set file layout response args */ layout->lg_layout_type = LAYOUT_NFSV4_1_FILES; layout->lg_stripe_type = STRIPE_SPARSE; +#ifdef CONFIG_PNFSD_LEXP_COMMIT_THRU_MDS layout->lg_commit_through_mds = true; +#else + layout->lg_commit_through_mds = false; +#endif layout->lg_stripe_unit = get_stripe_unit(inode->i_sb->s_blocksize); layout->lg_fh_length = 1; layout->device_id.sbid = arg->lg_sbid;