Skip to contentSkip to conversation

NFS: Fix kbuild errors due to missing symbols

PATCH Superseded Anna Schumaker 3 participants 7 messages Nov 15, 2013 – Nov 18, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Fix kbuild errors due to missing symbols

My recent patch 644aa303: "NFS: Enabling v4.2 should not recompile nfsd and lockd" caused build errors when CONFIG_NFS_USE_LEGACY_DNS=y and when CONFIG_NFS_V4=n. This patch fixes those errors.

---
 fs/nfs/nfs4_fs.h | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
fs/nfs/nfs4_fs.h +9 -10
index e916e86..dc1c915 100644
@@ -9,21 +9,20 @@
 #ifndef __LINUX_FS_NFS_NFS4_FS_H
 #define __LINUX_FS_NFS_NFS4_FS_H
 
-#if IS_ENABLED(CONFIG_NFS_V4)
-
-#define NFS4_MAX_LOOP_ON_RECOVER (10)
-
-#include <linux/seqlock.h>
-
 #if defined(CONFIG_NFS_V4_2)
 #define NFS4_MAX_MINOR_VERSION 2
-#else
-#if defined(CONFIG_NFS_V4_1)
+#elif defined(CONFIG_NFS_V4_1)
 #define NFS4_MAX_MINOR_VERSION 1
 #else
 #define NFS4_MAX_MINOR_VERSION 0
-#endif /* CONFIG_NFS_V4_1 */
-#endif /* CONFIG_NFS_V4_2 */
+#endif
+
+#if IS_ENABLED(CONFIG_NFS_V4)
+
+#define NFS4_MAX_LOOP_ON_RECOVER (10)
+
+#include <linux/seqlock.h>
+#include <linux/nfs_fs.h>
 
 struct idmap;
 
Signature · 1 line
1.8.4.2
#1 lore raw
Quoted 4 lines · Anna Schumaker

My recent patch 644aa303: "NFS: Enabling v4.2 should not recompile nfsd and lockd"caused build errors when CONFIG_NFS_USE_LEGACY_DNS=y and when CONFIG_NFS_V4=n. This patch fixes those errors.

Wait...

config NFS_USE_LEGACY_DNS
bool "Use the legacy NFS DNS resolver" depends on NFS_V4
help
The kernel now provides a method for translating a host name into an IP address. Select Y here if you would rather use your own DNS resolver script.

If unsure, say N

config NFS_USE_KERNEL_DNS
bool
depends on NFS_V4 &&!NFS_USE_LEGACY_DNS select DNS_RESOLVER
default y

How can that result in NFS_V4=n &&NFS_USE_LEGACY_DNS=y?

#2 lore raw
Quoted 18 lines · Trond Myklebust
Quoted 4 lines · Anna Schumaker

My recent patch 644aa303: "NFS: Enabling v4.2 should not recompile nfsd and lockd" caused build errors when CONFIG_NFS_USE_LEGACY_DNS=y and when CONFIG_NFS_V4=n. This patch fixes those errors.

Wait...

config NFS_USE_LEGACY_DNS
bool "Use the legacy NFS DNS resolver"
depends on NFS_V4
help
The kernel now provides a method for translating a host name into an IP address. Select Y here if you would rather use your own DNS resolver script.

If unsure, say N

Quoted 7 lines

config NFS_USE_KERNEL_DNS
bool
depends on NFS_V4 && !NFS_USE_LEGACY_DNS select DNS_RESOLVER
default y

How can that result in NFS_V4=n && NFS_USE_LEGACY_DNS=y?

OK. The problem is resolved using an include of nfs_fs.h in the right spot. Will fix…

#3 lore raw
In reply to Trond Myklebust
Quoted 18 lines · Trond Myklebust
Quoted 4 lines · Anna Schumaker

My recent patch 644aa303: "NFS: Enabling v4.2 should not recompile nfsd and lockd" caused build errors when CONFIG_NFS_USE_LEGACY_DNS=y and when CONFIG_NFS_V4=n. This patch fixes those errors.

Wait...

config NFS_USE_LEGACY_DNS
bool "Use the legacy NFS DNS resolver"
depends on NFS_V4
help
The kernel now provides a method for translating a host name into an IP address. Select Y here if you would rather use your own DNS resolver script.

If unsure, say N

Quoted 8 lines

config NFS_USE_KERNEL_DNS
bool
depends on NFS_V4 && !NFS_USE_LEGACY_DNS select DNS_RESOLVER
default y

How can that result in NFS_V4=n && NFS_USE_LEGACY_DNS=y?

It's a poorly phrased commit message, actually. I meant that just setting CONFIG_NFS_USE_LEGACY_DNS=y causes build problems, and then setting CONFIG_NFS_V4=n causes a different set of errors.

#4 lore raw
Quoted 2 lines · Anna Schumaker

It's a poorly phrased commit message, actually. I meant that just setting CONFIG_NFS_USE_LEGACY_DNS=y causes build problems, and then setting CONFIG_NFS_V4=n causes a different set of errors.

Ah. OK, now I see why you need it. The code in fs/nfs/super.c relies on it when !defined CONFIG_NFS_V4.

You also need to move the CONFIG_NFS_V4_SECURITY_LABEL section outside the CONFIG_NFS_V4, since fs/nfs/dir.c and others need the dummy nfs4_label_alloc and nfs4_label_free inline functions (see Stephen Rothwell ’s email).

--
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com

#5 lore raw
Quoted 9 lines · Trond
Quoted 2 lines · Anna Schumaker

It's a poorly phrased commit message, actually. I meant that just setting CONFIG_NFS_USE_LEGACY_DNS=y causes build problems, and then setting CONFIG_NFS_V4=n causes a different set of errors.

Ah. OK, now I see why you need it. The code in fs/nfs/super.c relies on it when !defined CONFIG_NFS_V4.

You also need to move the CONFIG_NFS_V4_SECURITY_LABEL section outside the CONFIG_NFS_V4, since fs/nfs/dir.c and others need the dummy nfs4_label_alloc and nfs4_label_free inline functions (see Stephen Rothwell ’s email).

Right. I have a patch that moves them to internal.h instead to get around the whole-file #ifdef that's in nfs4_fs.h. Would you prefer me to submit that independently or as a v2 to this patch?

As a bonus, I've used Jenkins to compile as many combinations as possible without an error (I probably should have done that the first time, though...)

Anna

Quoted 10 lines

--
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com

#6 lore raw
Quoted 4 lines · Anna Schumaker
Quoted 3 lines · Trond
Quoted 1 line · Anna Schumaker
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

It's a poorly phrased commit message, actually. I meant that just setting CONFIG_NFS_USE_LEGACY_DNS=y causes build problems, and then setting CONFIG_NFS_V4=n causes a different set of errors.

Ah. OK, now I see why you need it. The code in fs/nfs/super.c relies on it when !defined CONFIG_NFS_V4.

You also need to move the CONFIG_NFS_V4_SECURITY_LABEL section outside the CONFIG_NFS_V4, since fs/nfs/dir.c and others need the dummy nfs4_label_alloc and nfs4_label_free inline functions (see Stephen Rothwell ’s email).

Right. I have a patch that moves them to internal.h instead to get around the whole-file #ifdef that's in nfs4_fs.h. Would you prefer me to submit that independently or as a v2 to this patch?

Please do it as a v2.

Quoted 1 line

As a bonus, I've used Jenkins to compile as many combinations as possible without an error (I probably should have done that the first time, though...)

--
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com