linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@tonian.com>
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	[thread overview]
Message-ID: <1353921974-19637-1-git-send-email-bhalevy@tonian.com> (raw)

Signed-off-by: Benny Halevy <bhalevy@tonian.com>
---
 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;
-- 
1.7.11.7


                 reply	other threads:[~2012-11-26  9:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353921974-19637-1-git-send-email-bhalevy@tonian.com \
    --to=bhalevy@tonian.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).