All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [NFSD] Typo in nfsd_vers()
@ 2008-01-17 12:16 Steve Dickson
       [not found] ` <478F472F.9050800-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Dickson @ 2008-01-17 12:16 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

During my travels I found a small typo in nfsd_vers() (the routine
used by rpc.nfsd to set the protocol version(s) in NFS server)

When testing to see which versions are available, nfsd_vers() should
use nfsd_versions[] not nfsd_version[]. The reason this typo is
not noticeable is due to the fact this availability info is used in
a reply that rpc.nfsd ignores.

steved.


Author: Steve Dickson <steved@redhat.com>
Date:   Thu Jan 17 06:50:57 2008 -0500

    In nfsd_vers() the NFSD_AVAIL command should be using nfsd_versions[]
    not nfsd_version[]

    Signed-off-by: Steve Dickson <steved@redhat.com>

diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 1190aea..f0c66e0 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -134,7 +134,7 @@ int nfsd_vers(int vers, enum vers_op change)
    case NFSD_TEST:
        return nfsd_versions[vers] != NULL;
    case NFSD_AVAIL:
-       return nfsd_version[vers] != NULL;
+       return nfsd_versions[vers] != NULL;
    }
    return 0;
 }

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

* Re: [PATCH] [NFSD] Typo in nfsd_vers()
       [not found] ` <478F472F.9050800-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
@ 2008-01-17 14:33   ` J. Bruce Fields
  2008-01-17 23:10   ` Jeff Layton
  1 sibling, 0 replies; 5+ messages in thread
From: J. Bruce Fields @ 2008-01-17 14:33 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-nfs

On Thu, Jan 17, 2008 at 07:16:47AM -0500, Steve Dickson wrote:
> During my travels I found a small typo in nfsd_vers() (the routine
> used by rpc.nfsd to set the protocol version(s) in NFS server)
> 
> When testing to see which versions are available, nfsd_vers() should
> use nfsd_versions[] not nfsd_version[]. The reason this typo is
> not noticeable is due to the fact this availability info is used in
> a reply that rpc.nfsd ignores.

Thanks, applied!

Your mailer's messing up the whitespace, though--might want to fix that
for next time.

--b.

> 
> steved.
> 
> 
> Author: Steve Dickson <steved@redhat.com>
> Date:   Thu Jan 17 06:50:57 2008 -0500
> 
>     In nfsd_vers() the NFSD_AVAIL command should be using nfsd_versions[]
>     not nfsd_version[]
> 
>     Signed-off-by: Steve Dickson <steved@redhat.com>
> 
> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> index 1190aea..f0c66e0 100644
> --- a/fs/nfsd/nfssvc.c
> +++ b/fs/nfsd/nfssvc.c
> @@ -134,7 +134,7 @@ int nfsd_vers(int vers, enum vers_op change)
>     case NFSD_TEST:
>         return nfsd_versions[vers] != NULL;
>     case NFSD_AVAIL:
> -       return nfsd_version[vers] != NULL;
> +       return nfsd_versions[vers] != NULL;
>     }
>     return 0;
>  }

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

* Re: [PATCH] [NFSD] Typo in nfsd_vers()
       [not found] ` <478F472F.9050800-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
  2008-01-17 14:33   ` J. Bruce Fields
@ 2008-01-17 23:10   ` Jeff Layton
       [not found]     ` <20080117181055.2bd53d7d-PC62bkCOHzGdMjc06nkz3ljfA9RmPOcC@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff Layton @ 2008-01-17 23:10 UTC (permalink / raw)
  To: Steve Dickson; +Cc: J. Bruce Fields, linux-nfs

On Thu, 17 Jan 2008 07:16:47 -0500
Steve Dickson <SteveD@redhat.com> wrote:

> During my travels I found a small typo in nfsd_vers() (the routine
> used by rpc.nfsd to set the protocol version(s) in NFS server)
> 
> When testing to see which versions are available, nfsd_vers() should
> use nfsd_versions[] not nfsd_version[]. The reason this typo is
> not noticeable is due to the fact this availability info is used in
> a reply that rpc.nfsd ignores.
> 
> steved.
> 
> 
> Author: Steve Dickson <steved@redhat.com>
> Date:   Thu Jan 17 06:50:57 2008 -0500
> 
>     In nfsd_vers() the NFSD_AVAIL command should be using nfsd_versions[]
>     not nfsd_version[]
> 
>     Signed-off-by: Steve Dickson <steved@redhat.com>
> 
> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> index 1190aea..f0c66e0 100644
> --- a/fs/nfsd/nfssvc.c
> +++ b/fs/nfsd/nfssvc.c
> @@ -134,7 +134,7 @@ int nfsd_vers(int vers, enum vers_op change)
>     case NFSD_TEST:
>         return nfsd_versions[vers] != NULL;
>     case NFSD_AVAIL:
> -       return nfsd_version[vers] != NULL;
> +       return nfsd_versions[vers] != NULL;
>     }
>     return 0;
>  }

This doesn't look right to me. With this, NFSD_TEST and NFSD_AVAIL do
exactly the same thing. Why do we need both?

It also changes the output of /proc/fs/nfsd/versions. It should show a
number for every version compiled into the kernel, with a corresponding
+ or - depending on whether that version is enabled. With this patch,
it'll only ever show versions that are enabled, never ones that are
compiled in and disabled.

-- 
Jeff Layton <jlayton@redhat.com>

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

* Re: [PATCH] [NFSD] Typo in nfsd_vers()
       [not found]     ` <20080117181055.2bd53d7d-PC62bkCOHzGdMjc06nkz3ljfA9RmPOcC@public.gmane.org>
@ 2008-01-18 22:06       ` J. Bruce Fields
  2008-01-18 22:10         ` Jeff Layton
  0 siblings, 1 reply; 5+ messages in thread
From: J. Bruce Fields @ 2008-01-18 22:06 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Steve Dickson, linux-nfs

On Thu, Jan 17, 2008 at 06:10:55PM -0500, Jeff Layton wrote:
> On Thu, 17 Jan 2008 07:16:47 -0500
> Steve Dickson <SteveD@redhat.com> wrote:
> 
> > During my travels I found a small typo in nfsd_vers() (the routine
> > used by rpc.nfsd to set the protocol version(s) in NFS server)
> > 
> > When testing to see which versions are available, nfsd_vers() should
> > use nfsd_versions[] not nfsd_version[]. The reason this typo is
> > not noticeable is due to the fact this availability info is used in
> > a reply that rpc.nfsd ignores.
> > 
> > steved.
> > 
> > 
> > Author: Steve Dickson <steved@redhat.com>
> > Date:   Thu Jan 17 06:50:57 2008 -0500
> > 
> >     In nfsd_vers() the NFSD_AVAIL command should be using nfsd_versions[]
> >     not nfsd_version[]
> > 
> >     Signed-off-by: Steve Dickson <steved@redhat.com>
> > 
> > diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> > index 1190aea..f0c66e0 100644
> > --- a/fs/nfsd/nfssvc.c
> > +++ b/fs/nfsd/nfssvc.c
> > @@ -134,7 +134,7 @@ int nfsd_vers(int vers, enum vers_op change)
> >     case NFSD_TEST:
> >         return nfsd_versions[vers] != NULL;
> >     case NFSD_AVAIL:
> > -       return nfsd_version[vers] != NULL;
> > +       return nfsd_versions[vers] != NULL;
> >     }
> >     return 0;
> >  }
> 
> This doesn't look right to me. With this, NFSD_TEST and NFSD_AVAIL do
> exactly the same thing. Why do we need both?
> 
> It also changes the output of /proc/fs/nfsd/versions. It should show a
> number for every version compiled into the kernel, with a corresponding
> + or - depending on whether that version is enabled. With this patch,
> it'll only ever show versions that are enabled, never ones that are
> compiled in and disabled.

Oops, looks to me like you're correct--so nfsd_version[] is the versions
which this kernel was built to support, and nfsd_versions[] is the
subset of those that the server is currently accepting?

We could maybe give those two arrays names that were more helpful....

--b.

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

* Re: [PATCH] [NFSD] Typo in nfsd_vers()
  2008-01-18 22:06       ` J. Bruce Fields
@ 2008-01-18 22:10         ` Jeff Layton
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2008-01-18 22:10 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Steve Dickson, linux-nfs

On Fri, 18 Jan 2008 17:06:41 -0500
"J. Bruce Fields" <bfields@fieldses.org> wrote:
> 
> We could maybe give those two arrays names that were more helpful....
> 

That would be a definite improvement :-)

-- 
Jeff Layton <jlayton@redhat.com>

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

end of thread, other threads:[~2008-01-18 22:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17 12:16 [PATCH] [NFSD] Typo in nfsd_vers() Steve Dickson
     [not found] ` <478F472F.9050800-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-01-17 14:33   ` J. Bruce Fields
2008-01-17 23:10   ` Jeff Layton
     [not found]     ` <20080117181055.2bd53d7d-PC62bkCOHzGdMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2008-01-18 22:06       ` J. Bruce Fields
2008-01-18 22:10         ` Jeff Layton

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.