@@ -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.
@@ -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;
Signed-off-by: Benny Halevy <bhalevy@tonian.com> --- fs/nfsd/Kconfig | 7 +++++++ fs/nfsd/pnfsd_lexp.c | 4 ++++ 2 files changed, 11 insertions(+)