Skip to contentSkip to conversation

NLM: LOCKD fails to load if CONFIG_SYSCTL is not set

PATCH Applied Chuck Lever 2 participants 2 messages Feb 11, 2008 – Feb 12, 2008 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 6/11 NLM: LOCKD fails to load if CONFIG_SYSCTL is not set

Bruce Fields says:
"By the way, we've got another config-related nit here:

	http://bugzilla.linux-nfs.org/show_bug.cgi?id=156

You can build lockd without CONFIG_SYSCTL set, but then the module will fail to load."

It looks like sysctl is needed for passing nsm_local_state between the user space and the kernel. If that's not available, NSM notification from user space appears not to work.

It's not a fatal error if the nsm_local_state file doesn't exist, however I've chosen to ensure CONFIG_SYSCTL is selected if LOCKD is selected. The other choice is for nlm_init() to ignore the return code from the sysctl root registration call, but I think administrators would be surprised that NSM isn't working in this case.

---

 fs/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/Kconfig +1 -0
index 6c4e17b..0c8f85d 100644
@@ -1737,6 +1737,7 @@ config NFSD_V4
 
 config LOCKD
 	tristate
+	select SYSCTL
 
 config LOCKD_V4
 	bool

A message that is not in the archive (sent off-list or not yet received): 20080211221209.1047.39544.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org

#2 lore raw
Quoted 12 lines · Chuck Lever

Bruce Fields says:
"By the way, we've got another config-related nit here:

	http://bugzilla.linux-nfs.org/show_bug.cgi?id=156

You can build lockd without CONFIG_SYSCTL set, but then the module will fail to load."

It looks like sysctl is needed for passing nsm_local_state between the user space and the kernel. If that's not available, NSM notification from user space appears not to work.

Quoted 5 lines

It's not a fatal error if the nsm_local_state file doesn't exist, however I've chosen to ensure CONFIG_SYSCTL is selected if LOCKD is selected. The other choice is for nlm_init() to ignore the return code from the sysctl root registration call, but I think administrators would be surprised that NSM isn't working in this case.

OK.

So does anyone understand why the nfs-utils code tries to use nsm_local_state, but then silently ignores any failure to find it?

--b.

Quoted 20 lines

---

 fs/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/Kconfig +1 -0
index 6c4e17b..0c8f85d 100644
@@ -1737,6 +1737,7 @@ config NFSD_V4
 
 config LOCKD
 	tristate
+	select SYSCTL
 
 config LOCKD_V4
 	bool