linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 3/8] configure.ac: Add --with-statd-extension configure option
Date: Mon, 12 Sep 2011 18:06:23 -0400	[thread overview]
Message-ID: <20110912220623.10854.69881.stgit@matisse.1015granger.net> (raw)
In-Reply-To: <20110912220304.10854.20972.stgit@matisse.1015granger.net>

Currently some distributions patch nfs-utils to put NSM state in a
subdirectory of /var/lib/nfs.  Make this a configure option instead.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 configure.ac       |    8 ++++++++
 support/nsm/file.c |    9 +--------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 461a96a..ba704e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,6 +23,14 @@ AC_ARG_WITH(statedir,
 	statedir=$withval,
 	statedir=/var/lib/nfs)
 	AC_SUBST(statedir)
+AC_ARG_WITH(statd-extension,
+	[AC_HELP_STRING([--with-statd-extension=foo],
+                        [Put NSM state in subdir foo of statedir])],
+	statdext=$withval,
+	statdext="")
+	AC_SUBST(statdext)
+	AC_DEFINE_UNQUOTED(NSM_PATH_EXTENSION, "$statdext",
+			   [This defines the statedir subdirectory containing NSM state files.])
 AC_ARG_WITH(statduser,
 	[AC_HELP_STRING([--with-statduser=rpcuser],
                         [statd to run under @<:@rpcuser or nobody@:>@]
diff --git a/support/nsm/file.c b/support/nsm/file.c
index a12c753..b4a5af1 100644
--- a/support/nsm/file.c
+++ b/support/nsm/file.c
@@ -93,14 +93,7 @@
 #define LINELEN		(RPCARGSLEN + SM_PRIV_SIZE * 2 + 1)
 
 #define NSM_KERNEL_STATE_FILE	"/proc/sys/fs/nfs/nsm_local_state"
-
-/*
- * Some distributions place statd's files in a subdirectory
- */
-#define NSM_PATH_EXTENSION
-/* #define NSM_PATH_EXTENSION	"/statd" */
-
-#define NSM_DEFAULT_STATEDIR		NFS_STATEDIR NSM_PATH_EXTENSION
+#define NSM_DEFAULT_STATEDIR	NFS_STATEDIR "/" NSM_PATH_EXTENSION
 
 static char nsm_base_dirname[PATH_MAX] = NSM_DEFAULT_STATEDIR;
 


  parent reply	other threads:[~2011-09-12 22:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12 22:05 [PATCH 0/8] Fixes for nfs-utils-1.2.next Chuck Lever
2011-09-12 22:06 ` [PATCH 1/8] configure.ac: Fix help string for --with-statedir= option Chuck Lever
2011-09-12 22:06 ` [PATCH 2/8] configure.ac: Clean up help string for --enable-mount Chuck Lever
2011-09-12 22:06 ` Chuck Lever [this message]
2011-09-17 12:28   ` [PATCH 3/8] configure.ac: Add --with-statd-extension configure option Steve Dickson
2011-09-18 11:49     ` Jeff Layton
2011-09-19 10:46       ` Steve Dickson
2011-09-19 17:56       ` Steve Dickson
2011-09-19 18:13         ` Jeff Layton
2011-09-19 19:36         ` Chuck Lever
2011-09-20 11:53           ` Steve Dickson
2011-09-20 16:14     ` Chuck Lever
2011-09-12 22:06 ` [PATCH 4/8] nfsumount: Squelch compiler warning Chuck Lever
2011-09-12 22:06 ` [PATCH 5/8] sm-notify: Refactor insert_host() and recv_rpcbind_reply() Chuck Lever
2011-09-12 22:06 ` [PATCH 6/8] sm-notify: Use correct retransmit timeout when sending a fresh RPC Chuck Lever
2011-09-12 22:06 ` [PATCH 7/8] sm-notify: Avoid extra rpcbind queries Chuck Lever
2011-09-12 22:07 ` [PATCH 8/8] sm-notify: sm-notify leaves monitor records in sm.bak Chuck Lever
2011-09-20 11:36 ` [PATCH 0/8] Fixes for nfs-utils-1.2.next Steve Dickson

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=20110912220623.10854.69881.stgit@matisse.1015granger.net \
    --to=chuck.lever@oracle.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).