All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NFS: Fix kbuild errors due to missing symbols
@ 2013-11-15 22:30 Anna Schumaker
  2013-11-15 23:16 ` Trond Myklebust
  0 siblings, 1 reply; 7+ messages in thread
From: Anna Schumaker @ 2013-11-15 22:30 UTC (permalink / raw)
  To: Trond.Myklebust, linux-nfs

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.

Signed-off-by: Anna Schumaker <bjschuma@netapp.com>
---
 fs/nfs/nfs4_fs.h | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index e916e86..dc1c915 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -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;
 
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] NFS: Fix kbuild errors due to missing symbols
  2013-11-15 22:30 [PATCH] NFS: Fix kbuild errors due to missing symbols Anna Schumaker
@ 2013-11-15 23:16 ` Trond Myklebust
  2013-11-15 23:25   ` Trond Myklebust
  2013-11-18 17:50   ` Anna Schumaker
  0 siblings, 2 replies; 7+ messages in thread
From: Trond Myklebust @ 2013-11-15 23:16 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: linux-nfs

On Fri, 2013-11-15 at 17:30 -0500, Anna Schumaker wrote:
> 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?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] NFS: Fix kbuild errors due to missing symbols
  2013-11-15 23:16 ` Trond Myklebust
@ 2013-11-15 23:25   ` Trond Myklebust
  2013-11-18 17:50   ` Anna Schumaker
  1 sibling, 0 replies; 7+ messages in thread
From: Trond Myklebust @ 2013-11-15 23:25 UTC (permalink / raw)
  To: Anna Schumaker; +Cc: Linux NFS Mailing List


On Nov 15, 2013, at 18:16, Trond Myklebust <trondmy@gmail.com> wrote:

> On Fri, 2013-11-15 at 17:30 -0500, Anna Schumaker wrote:
>> 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?

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] NFS: Fix kbuild errors due to missing symbols
  2013-11-15 23:16 ` Trond Myklebust
  2013-11-15 23:25   ` Trond Myklebust
@ 2013-11-18 17:50   ` Anna Schumaker
  2013-11-18 18:37     ` Myklebust, Trond
  1 sibling, 1 reply; 7+ messages in thread
From: Anna Schumaker @ 2013-11-18 17:50 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs

On 11/15/2013 06:16 PM, Trond Myklebust wrote:
> On Fri, 2013-11-15 at 17:30 -0500, Anna Schumaker wrote:
>> 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?
> 

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] NFS: Fix kbuild errors due to missing symbols
  2013-11-18 17:50   ` Anna Schumaker
@ 2013-11-18 18:37     ` Myklebust, Trond
  2013-11-18 18:41       ` Anna Schumaker
  0 siblings, 1 reply; 7+ messages in thread
From: Myklebust, Trond @ 2013-11-18 18:37 UTC (permalink / raw)
  To: Schumaker, Bryan; +Cc: Linux NFS Mailing List


On Nov 18, 2013, at 12:50, Anna Schumaker <bjschuma@netapp.com> wrote:
> 
> 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
Trond.Myklebust@netapp.com
www.netapp.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] NFS: Fix kbuild errors due to missing symbols
  2013-11-18 18:37     ` Myklebust, Trond
@ 2013-11-18 18:41       ` Anna Schumaker
  2013-11-18 18:48         ` Myklebust, Trond
  0 siblings, 1 reply; 7+ messages in thread
From: Anna Schumaker @ 2013-11-18 18:41 UTC (permalink / raw)
  To: Myklebust, Trond, Schumaker, Bryan; +Cc: Linux NFS Mailing List

On 11/18/2013 01:37 PM, Myklebust, Trond wrote:
> 
> On Nov 18, 2013, at 12:50, Anna Schumaker <bjschuma@netapp.com> wrote:
>>
>> 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

> 
> 
> --
> Trond Myklebust
> Linux NFS client maintainer
> 
> NetApp
> Trond.Myklebust@netapp.com
> www.netapp.com
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] NFS: Fix kbuild errors due to missing symbols
  2013-11-18 18:41       ` Anna Schumaker
@ 2013-11-18 18:48         ` Myklebust, Trond
  0 siblings, 0 replies; 7+ messages in thread
From: Myklebust, Trond @ 2013-11-18 18:48 UTC (permalink / raw)
  To: Schumaker, Bryan; +Cc: Schumaker, Bryan, Linux NFS Mailing List


On Nov 18, 2013, at 13:41, Anna Schumaker <bjschuma@netapp.com> wrote:

> On 11/18/2013 01:37 PM, Myklebust, Trond wrote:
>> 
>> On Nov 18, 2013, at 12:50, Anna Schumaker <bjschuma@netapp.com> wrote:
>>> 
>>> 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.

> 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
Trond.Myklebust@netapp.com
www.netapp.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-18 18:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-15 22:30 [PATCH] NFS: Fix kbuild errors due to missing symbols Anna Schumaker
2013-11-15 23:16 ` Trond Myklebust
2013-11-15 23:25   ` Trond Myklebust
2013-11-18 17:50   ` Anna Schumaker
2013-11-18 18:37     ` Myklebust, Trond
2013-11-18 18:41       ` Anna Schumaker
2013-11-18 18:48         ` Myklebust, Trond

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.