All of lore.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN
@ 2011-03-30 19:32 Eric Paris
  2011-03-30 21:12 ` Bryan Schumaker
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Paris @ 2011-03-30 19:32 UTC (permalink / raw)
  To: linux-nfs; +Cc: bjschuma, Trond.Myklebust

$ git bisect good
8f70e95f9f4159184f557a1db60c909d7c1bd2e3 is the first bad commit
commit 8f70e95f9f4159184f557a1db60c909d7c1bd2e3
Author: Bryan Schumaker <bjschuma@netapp.com>
Date:   Thu Mar 24 17:12:31 2011 +0000

    NFS: Determine initial mount security
    
    When sec=<something> is not presented as a mount option,
    we should attempt to determine what security flavor the
    server is using.
    
    Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

Using a linux-next kernel for the last 2 days I have been unable to
mount exports from my RHEL6 server.  mount(2) returned EAGAIN.  Turned
up debugging (thanks jlayton) and got:

        [ 1732.795056] NFS: nfs mount opts='tcp,vers=4,addr=10.11.231.241,clientaddr=10.11.231.191'
        [ 1732.798079] NFS:   parsing nfs mount option 'tcp'
        [ 1732.800210] NFS:   parsing nfs mount option 'vers=4'
        [ 1732.802324] NFS:   parsing nfs mount option 'addr=10.11.231.241'
        [ 1732.804477] NFS:   parsing nfs mount option 'clientaddr=10.11.231.191'
        [ 1732.805790] NFS: MNTPATH: '/export/'
        [ 1732.806663] --> nfs4_try_mount()
        [ 1732.807459] --> nfs4_create_server()
        [ 1732.808301] --> nfs4_init_server()
        [ 1732.809136] --> nfs4_set_client()
        [ 1732.809898] --> nfs_get_client(paris.rdu.redhat.com,v4)
        [ 1732.811122] NFS: get client cookie (0xffff880039cfd9e8/0xffff88003b889000)
        [ 1732.813771] NFS: Callback listener port = 36700 (af 2)
        [ 1732.814931] NFS: Callback listener port = 60202 (af 10)
        [ 1732.816199] --> nfs_get_client() = ffff880039cfd9e8 [new]
        [ 1732.817356] <-- nfs4_set_client() = 0 [new ffff880039cfd9e8]
        [ 1732.818587] <-- nfs4_init_server() = 0
        [ 1732.819476] --> nfs4_get_rootfh()
        [ 1732.820282] encode_compound: tag=
        [ 1732.822070] encode_compound: tag=
        [ 1732.822937] nfs4_get_rootfh: getroot error = 11
        [ 1732.823982] <-- nfs4_get_rootfh() = -11
        [ 1732.824880] --> nfs_free_server()
        [ 1732.846219] --> nfs_put_client({1})
        [ 1732.847888] --> nfs_free_client(4)
        [ 1732.850236] NFS: releasing client cookie (0xffff880039cfd9e8/0xffff88003b889000)
        [ 1732.853726] <-- nfs_free_client()
        [ 1732.854505] <-- nfs_free_server()
        [ 1732.855274] <-- nfs4_create_server() = error -11
        [ 1732.856187] <-- nfs4_try_mount() = -11 [error]

Bisected and got the commit listed above.


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

* Re: [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN
  2011-03-30 19:32 [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN Eric Paris
@ 2011-03-30 21:12 ` Bryan Schumaker
  2011-03-30 21:33   ` Eric Paris
  0 siblings, 1 reply; 7+ messages in thread
From: Bryan Schumaker @ 2011-03-30 21:12 UTC (permalink / raw)
  To: Eric Paris; +Cc: linux-nfs, Trond.Myklebust

On 03/30/2011 03:32 PM, Eric Paris wrote:
> $ git bisect good
> 8f70e95f9f4159184f557a1db60c909d7c1bd2e3 is the first bad commit
> commit 8f70e95f9f4159184f557a1db60c909d7c1bd2e3
> Author: Bryan Schumaker <bjschuma@netapp.com>
> Date:   Thu Mar 24 17:12:31 2011 +0000
> 
>     NFS: Determine initial mount security
>     
>     When sec=<something> is not presented as a mount option,
>     we should attempt to determine what security flavor the
>     server is using.
>     
>     Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
>     Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> 
> Using a linux-next kernel for the last 2 days I have been unable to
> mount exports from my RHEL6 server.  mount(2) returned EAGAIN.  Turned

Thanks for letting me know.  What does your exports file look like?

Bryan

> up debugging (thanks jlayton) and got:
> 
>         [ 1732.795056] NFS: nfs mount opts='tcp,vers=4,addr=10.11.231.241,clientaddr=10.11.231.191'
>         [ 1732.798079] NFS:   parsing nfs mount option 'tcp'
>         [ 1732.800210] NFS:   parsing nfs mount option 'vers=4'
>         [ 1732.802324] NFS:   parsing nfs mount option 'addr=10.11.231.241'
>         [ 1732.804477] NFS:   parsing nfs mount option 'clientaddr=10.11.231.191'
>         [ 1732.805790] NFS: MNTPATH: '/export/'
>         [ 1732.806663] --> nfs4_try_mount()
>         [ 1732.807459] --> nfs4_create_server()
>         [ 1732.808301] --> nfs4_init_server()
>         [ 1732.809136] --> nfs4_set_client()
>         [ 1732.809898] --> nfs_get_client(paris.rdu.redhat.com,v4)
>         [ 1732.811122] NFS: get client cookie (0xffff880039cfd9e8/0xffff88003b889000)
>         [ 1732.813771] NFS: Callback listener port = 36700 (af 2)
>         [ 1732.814931] NFS: Callback listener port = 60202 (af 10)
>         [ 1732.816199] --> nfs_get_client() = ffff880039cfd9e8 [new]
>         [ 1732.817356] <-- nfs4_set_client() = 0 [new ffff880039cfd9e8]
>         [ 1732.818587] <-- nfs4_init_server() = 0
>         [ 1732.819476] --> nfs4_get_rootfh()
>         [ 1732.820282] encode_compound: tag=
>         [ 1732.822070] encode_compound: tag=
>         [ 1732.822937] nfs4_get_rootfh: getroot error = 11
>         [ 1732.823982] <-- nfs4_get_rootfh() = -11
>         [ 1732.824880] --> nfs_free_server()
>         [ 1732.846219] --> nfs_put_client({1})
>         [ 1732.847888] --> nfs_free_client(4)
>         [ 1732.850236] NFS: releasing client cookie (0xffff880039cfd9e8/0xffff88003b889000)
>         [ 1732.853726] <-- nfs_free_client()
>         [ 1732.854505] <-- nfs_free_server()
>         [ 1732.855274] <-- nfs4_create_server() = error -11
>         [ 1732.856187] <-- nfs4_try_mount() = -11 [error]
> 
> Bisected and got the commit listed above.
> 


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

* Re: [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN
  2011-03-30 21:12 ` Bryan Schumaker
@ 2011-03-30 21:33   ` Eric Paris
  2011-03-31  1:31     ` Eric Paris
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Paris @ 2011-03-30 21:33 UTC (permalink / raw)
  To: Bryan Schumaker; +Cc: linux-nfs, Trond.Myklebust

On Wed, 2011-03-30 at 17:12 -0400, Bryan Schumaker wrote:
> On 03/30/2011 03:32 PM, Eric Paris wrote:
> > $ git bisect good
> > 8f70e95f9f4159184f557a1db60c909d7c1bd2e3 is the first bad commit
> > commit 8f70e95f9f4159184f557a1db60c909d7c1bd2e3
> > Author: Bryan Schumaker <bjschuma@netapp.com>
> > Date:   Thu Mar 24 17:12:31 2011 +0000
> > 
> >     NFS: Determine initial mount security
> >     
> >     When sec=<something> is not presented as a mount option,
> >     we should attempt to determine what security flavor the
> >     server is using.
> >     
> >     Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
> >     Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> > 
> > Using a linux-next kernel for the last 2 days I have been unable to
> > mount exports from my RHEL6 server.  mount(2) returned EAGAIN.  Turned
> 
> Thanks for letting me know.  What does your exports file look like?

# cat /etc/exports
/		127.0.0.1(fsid=0)
/export		*(rw,fsid=1,all_squash,anonuid=500,anongid=500)

The client fstab looks like:
paris.rdu.redhat.com:/export/ /storage nfs tcp,noatime,nodiratime,noauto,users,exec,suid 0 0

> 
> Bryan
> 
> > up debugging (thanks jlayton) and got:
> > 
> >         [ 1732.795056] NFS: nfs mount opts='tcp,vers=4,addr=10.11.231.241,clientaddr=10.11.231.191'
> >         [ 1732.798079] NFS:   parsing nfs mount option 'tcp'
> >         [ 1732.800210] NFS:   parsing nfs mount option 'vers=4'
> >         [ 1732.802324] NFS:   parsing nfs mount option 'addr=10.11.231.241'
> >         [ 1732.804477] NFS:   parsing nfs mount option 'clientaddr=10.11.231.191'
> >         [ 1732.805790] NFS: MNTPATH: '/export/'
> >         [ 1732.806663] --> nfs4_try_mount()
> >         [ 1732.807459] --> nfs4_create_server()
> >         [ 1732.808301] --> nfs4_init_server()
> >         [ 1732.809136] --> nfs4_set_client()
> >         [ 1732.809898] --> nfs_get_client(paris.rdu.redhat.com,v4)
> >         [ 1732.811122] NFS: get client cookie (0xffff880039cfd9e8/0xffff88003b889000)
> >         [ 1732.813771] NFS: Callback listener port = 36700 (af 2)
> >         [ 1732.814931] NFS: Callback listener port = 60202 (af 10)
> >         [ 1732.816199] --> nfs_get_client() = ffff880039cfd9e8 [new]
> >         [ 1732.817356] <-- nfs4_set_client() = 0 [new ffff880039cfd9e8]
> >         [ 1732.818587] <-- nfs4_init_server() = 0
> >         [ 1732.819476] --> nfs4_get_rootfh()
> >         [ 1732.820282] encode_compound: tag=
> >         [ 1732.822070] encode_compound: tag=
> >         [ 1732.822937] nfs4_get_rootfh: getroot error = 11
> >         [ 1732.823982] <-- nfs4_get_rootfh() = -11
> >         [ 1732.824880] --> nfs_free_server()
> >         [ 1732.846219] --> nfs_put_client({1})
> >         [ 1732.847888] --> nfs_free_client(4)
> >         [ 1732.850236] NFS: releasing client cookie (0xffff880039cfd9e8/0xffff88003b889000)
> >         [ 1732.853726] <-- nfs_free_client()
> >         [ 1732.854505] <-- nfs_free_server()
> >         [ 1732.855274] <-- nfs4_create_server() = error -11
> >         [ 1732.856187] <-- nfs4_try_mount() = -11 [error]
> > 
> > Bisected and got the commit listed above.
> > 
> 



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

* Re: [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN
  2011-03-30 21:33   ` Eric Paris
@ 2011-03-31  1:31     ` Eric Paris
  2011-03-31 17:17       ` Bryan Schumaker
  2011-04-02 19:01       ` J. Bruce Fields
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Paris @ 2011-03-31  1:31 UTC (permalink / raw)
  To: Bryan Schumaker; +Cc: linux-nfs, Trond.Myklebust

On Wed, 2011-03-30 at 17:33 -0400, Eric Paris wrote:
> On Wed, 2011-03-30 at 17:12 -0400, Bryan Schumaker wrote:
> > On 03/30/2011 03:32 PM, Eric Paris wrote:
> > > $ git bisect good
> > > 8f70e95f9f4159184f557a1db60c909d7c1bd2e3 is the first bad commit
> > > commit 8f70e95f9f4159184f557a1db60c909d7c1bd2e3
> > > Author: Bryan Schumaker <bjschuma@netapp.com>
> > > Date:   Thu Mar 24 17:12:31 2011 +0000
> > > 
> > >     NFS: Determine initial mount security
> > >     
> > >     When sec=<something> is not presented as a mount option,
> > >     we should attempt to determine what security flavor the
> > >     server is using.
> > >     
> > >     Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
> > >     Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> > > 
> > > Using a linux-next kernel for the last 2 days I have been unable to
> > > mount exports from my RHEL6 server.  mount(2) returned EAGAIN.  Turned
> > 
> > Thanks for letting me know.  What does your exports file look like?
> 
> # cat /etc/exports
> /		127.0.0.1(fsid=0)
> /export		*(rw,fsid=1,all_squash,anonuid=500,anongid=500)

At jlayton's suggestion I changed /exports to not include the /
127.0.0.1 and removed both explicit fsid= and it works.  So this patch
broke my setup, but I have a workaround.   (I'm pretty sure the
previous / 127 entry was a workaround for a problem when all my clients
broke during Fedora's switch to use NFSv4 default.  Funny one workaround
comes back to bit me again  :))

Thanks! 


> The client fstab looks like:
> paris.rdu.redhat.com:/export/ /storage nfs tcp,noatime,nodiratime,noauto,users,exec,suid 0 0
> 
> > 
> > Bryan
> > 
> > > up debugging (thanks jlayton) and got:
> > > 
> > >         [ 1732.795056] NFS: nfs mount opts='tcp,vers=4,addr=10.11.231.241,clientaddr=10.11.231.191'
> > >         [ 1732.798079] NFS:   parsing nfs mount option 'tcp'
> > >         [ 1732.800210] NFS:   parsing nfs mount option 'vers=4'
> > >         [ 1732.802324] NFS:   parsing nfs mount option 'addr=10.11.231.241'
> > >         [ 1732.804477] NFS:   parsing nfs mount option 'clientaddr=10.11.231.191'
> > >         [ 1732.805790] NFS: MNTPATH: '/export/'
> > >         [ 1732.806663] --> nfs4_try_mount()
> > >         [ 1732.807459] --> nfs4_create_server()
> > >         [ 1732.808301] --> nfs4_init_server()
> > >         [ 1732.809136] --> nfs4_set_client()
> > >         [ 1732.809898] --> nfs_get_client(paris.rdu.redhat.com,v4)
> > >         [ 1732.811122] NFS: get client cookie (0xffff880039cfd9e8/0xffff88003b889000)
> > >         [ 1732.813771] NFS: Callback listener port = 36700 (af 2)
> > >         [ 1732.814931] NFS: Callback listener port = 60202 (af 10)
> > >         [ 1732.816199] --> nfs_get_client() = ffff880039cfd9e8 [new]
> > >         [ 1732.817356] <-- nfs4_set_client() = 0 [new ffff880039cfd9e8]
> > >         [ 1732.818587] <-- nfs4_init_server() = 0
> > >         [ 1732.819476] --> nfs4_get_rootfh()
> > >         [ 1732.820282] encode_compound: tag=
> > >         [ 1732.822070] encode_compound: tag=
> > >         [ 1732.822937] nfs4_get_rootfh: getroot error = 11
> > >         [ 1732.823982] <-- nfs4_get_rootfh() = -11
> > >         [ 1732.824880] --> nfs_free_server()
> > >         [ 1732.846219] --> nfs_put_client({1})
> > >         [ 1732.847888] --> nfs_free_client(4)
> > >         [ 1732.850236] NFS: releasing client cookie (0xffff880039cfd9e8/0xffff88003b889000)
> > >         [ 1732.853726] <-- nfs_free_client()
> > >         [ 1732.854505] <-- nfs_free_server()
> > >         [ 1732.855274] <-- nfs4_create_server() = error -11
> > >         [ 1732.856187] <-- nfs4_try_mount() = -11 [error]
> > > 
> > > Bisected and got the commit listed above.
> > > 
> > 
> 



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

* Re: [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN
  2011-03-31  1:31     ` Eric Paris
@ 2011-03-31 17:17       ` Bryan Schumaker
  2011-04-02 19:01       ` J. Bruce Fields
  1 sibling, 0 replies; 7+ messages in thread
From: Bryan Schumaker @ 2011-03-31 17:17 UTC (permalink / raw)
  To: Eric Paris; +Cc: linux-nfs, Trond.Myklebust

On 03/30/2011 09:31 PM, Eric Paris wrote:
> On Wed, 2011-03-30 at 17:33 -0400, Eric Paris wrote:
>> On Wed, 2011-03-30 at 17:12 -0400, Bryan Schumaker wrote:
>>> On 03/30/2011 03:32 PM, Eric Paris wrote:
>>>> $ git bisect good
>>>> 8f70e95f9f4159184f557a1db60c909d7c1bd2e3 is the first bad commit
>>>> commit 8f70e95f9f4159184f557a1db60c909d7c1bd2e3
>>>> Author: Bryan Schumaker <bjschuma@netapp.com>
>>>> Date:   Thu Mar 24 17:12:31 2011 +0000
>>>>
>>>>     NFS: Determine initial mount security
>>>>     
>>>>     When sec=<something> is not presented as a mount option,
>>>>     we should attempt to determine what security flavor the
>>>>     server is using.
>>>>     
>>>>     Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
>>>>     Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
>>>>
>>>> Using a linux-next kernel for the last 2 days I have been unable to
>>>> mount exports from my RHEL6 server.  mount(2) returned EAGAIN.  Turned
>>>
>>> Thanks for letting me know.  What does your exports file look like?
>>
>> # cat /etc/exports
>> /		127.0.0.1(fsid=0)
>> /export		*(rw,fsid=1,all_squash,anonuid=500,anongid=500)
> 
> At jlayton's suggestion I changed /exports to not include the /
> 127.0.0.1 and removed both explicit fsid= and it works.  So this patch
> broke my setup, but I have a workaround.   (I'm pretty sure the
> previous / 127 entry was a workaround for a problem when all my clients
> broke during Fedora's switch to use NFSv4 default.  Funny one workaround
> comes back to bit me again  :))
> 
> Thanks! 

Thanks for letting me know.

Bryan

> 
> 
>> The client fstab looks like:
>> paris.rdu.redhat.com:/export/ /storage nfs tcp,noatime,nodiratime,noauto,users,exec,suid 0 0
>>
>>>
>>> Bryan
>>>
>>>> up debugging (thanks jlayton) and got:
>>>>
>>>>         [ 1732.795056] NFS: nfs mount opts='tcp,vers=4,addr=10.11.231.241,clientaddr=10.11.231.191'
>>>>         [ 1732.798079] NFS:   parsing nfs mount option 'tcp'
>>>>         [ 1732.800210] NFS:   parsing nfs mount option 'vers=4'
>>>>         [ 1732.802324] NFS:   parsing nfs mount option 'addr=10.11.231.241'
>>>>         [ 1732.804477] NFS:   parsing nfs mount option 'clientaddr=10.11.231.191'
>>>>         [ 1732.805790] NFS: MNTPATH: '/export/'
>>>>         [ 1732.806663] --> nfs4_try_mount()
>>>>         [ 1732.807459] --> nfs4_create_server()
>>>>         [ 1732.808301] --> nfs4_init_server()
>>>>         [ 1732.809136] --> nfs4_set_client()
>>>>         [ 1732.809898] --> nfs_get_client(paris.rdu.redhat.com,v4)
>>>>         [ 1732.811122] NFS: get client cookie (0xffff880039cfd9e8/0xffff88003b889000)
>>>>         [ 1732.813771] NFS: Callback listener port = 36700 (af 2)
>>>>         [ 1732.814931] NFS: Callback listener port = 60202 (af 10)
>>>>         [ 1732.816199] --> nfs_get_client() = ffff880039cfd9e8 [new]
>>>>         [ 1732.817356] <-- nfs4_set_client() = 0 [new ffff880039cfd9e8]
>>>>         [ 1732.818587] <-- nfs4_init_server() = 0
>>>>         [ 1732.819476] --> nfs4_get_rootfh()
>>>>         [ 1732.820282] encode_compound: tag=
>>>>         [ 1732.822070] encode_compound: tag=
>>>>         [ 1732.822937] nfs4_get_rootfh: getroot error = 11
>>>>         [ 1732.823982] <-- nfs4_get_rootfh() = -11
>>>>         [ 1732.824880] --> nfs_free_server()
>>>>         [ 1732.846219] --> nfs_put_client({1})
>>>>         [ 1732.847888] --> nfs_free_client(4)
>>>>         [ 1732.850236] NFS: releasing client cookie (0xffff880039cfd9e8/0xffff88003b889000)
>>>>         [ 1732.853726] <-- nfs_free_client()
>>>>         [ 1732.854505] <-- nfs_free_server()
>>>>         [ 1732.855274] <-- nfs4_create_server() = error -11
>>>>         [ 1732.856187] <-- nfs4_try_mount() = -11 [error]
>>>>
>>>> Bisected and got the commit listed above.
>>>>
>>>
>>
> 
> 


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

* Re: [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN
  2011-03-31  1:31     ` Eric Paris
  2011-03-31 17:17       ` Bryan Schumaker
@ 2011-04-02 19:01       ` J. Bruce Fields
  2011-04-04 12:48         ` Bryan Schumaker
  1 sibling, 1 reply; 7+ messages in thread
From: J. Bruce Fields @ 2011-04-02 19:01 UTC (permalink / raw)
  To: Eric Paris; +Cc: Bryan Schumaker, linux-nfs, Trond.Myklebust

On Wed, Mar 30, 2011 at 09:31:57PM -0400, Eric Paris wrote:
> On Wed, 2011-03-30 at 17:33 -0400, Eric Paris wrote:
> > On Wed, 2011-03-30 at 17:12 -0400, Bryan Schumaker wrote:
> > > On 03/30/2011 03:32 PM, Eric Paris wrote:
> > > > $ git bisect good
> > > > 8f70e95f9f4159184f557a1db60c909d7c1bd2e3 is the first bad commit
> > > > commit 8f70e95f9f4159184f557a1db60c909d7c1bd2e3
> > > > Author: Bryan Schumaker <bjschuma@netapp.com>
> > > > Date:   Thu Mar 24 17:12:31 2011 +0000
> > > > 
> > > >     NFS: Determine initial mount security
> > > >     
> > > >     When sec=<something> is not presented as a mount option,
> > > >     we should attempt to determine what security flavor the
> > > >     server is using.
> > > >     
> > > >     Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
> > > >     Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> > > > 
> > > > Using a linux-next kernel for the last 2 days I have been unable to
> > > > mount exports from my RHEL6 server.  mount(2) returned EAGAIN.  Turned
> > > 
> > > Thanks for letting me know.  What does your exports file look like?
> > 
> > # cat /etc/exports
> > /		127.0.0.1(fsid=0)
> > /export		*(rw,fsid=1,all_squash,anonuid=500,anongid=500)
> 
> At jlayton's suggestion I changed /exports to not include the /
> 127.0.0.1 and removed both explicit fsid= and it works.  So this patch
> broke my setup, but I have a workaround.

OK, but I'm a little confused why that would make any difference to
client security negotiation code.

Do we understand why your setup broke after that client change?

--b

> (I'm pretty sure the
> previous / 127 entry was a workaround for a problem when all my clients
> broke during Fedora's switch to use NFSv4 default.  Funny one workaround
> comes back to bit me again  :))
> 
> Thanks! 
> 
> 
> > The client fstab looks like:
> > paris.rdu.redhat.com:/export/ /storage nfs tcp,noatime,nodiratime,noauto,users,exec,suid 0 0
> > 
> > > 
> > > Bryan
> > > 
> > > > up debugging (thanks jlayton) and got:
> > > > 
> > > >         [ 1732.795056] NFS: nfs mount opts='tcp,vers=4,addr=10.11.231.241,clientaddr=10.11.231.191'
> > > >         [ 1732.798079] NFS:   parsing nfs mount option 'tcp'
> > > >         [ 1732.800210] NFS:   parsing nfs mount option 'vers=4'
> > > >         [ 1732.802324] NFS:   parsing nfs mount option 'addr=10.11.231.241'
> > > >         [ 1732.804477] NFS:   parsing nfs mount option 'clientaddr=10.11.231.191'
> > > >         [ 1732.805790] NFS: MNTPATH: '/export/'
> > > >         [ 1732.806663] --> nfs4_try_mount()
> > > >         [ 1732.807459] --> nfs4_create_server()
> > > >         [ 1732.808301] --> nfs4_init_server()
> > > >         [ 1732.809136] --> nfs4_set_client()
> > > >         [ 1732.809898] --> nfs_get_client(paris.rdu.redhat.com,v4)
> > > >         [ 1732.811122] NFS: get client cookie (0xffff880039cfd9e8/0xffff88003b889000)
> > > >         [ 1732.813771] NFS: Callback listener port = 36700 (af 2)
> > > >         [ 1732.814931] NFS: Callback listener port = 60202 (af 10)
> > > >         [ 1732.816199] --> nfs_get_client() = ffff880039cfd9e8 [new]
> > > >         [ 1732.817356] <-- nfs4_set_client() = 0 [new ffff880039cfd9e8]
> > > >         [ 1732.818587] <-- nfs4_init_server() = 0
> > > >         [ 1732.819476] --> nfs4_get_rootfh()
> > > >         [ 1732.820282] encode_compound: tag=
> > > >         [ 1732.822070] encode_compound: tag=
> > > >         [ 1732.822937] nfs4_get_rootfh: getroot error = 11
> > > >         [ 1732.823982] <-- nfs4_get_rootfh() = -11
> > > >         [ 1732.824880] --> nfs_free_server()
> > > >         [ 1732.846219] --> nfs_put_client({1})
> > > >         [ 1732.847888] --> nfs_free_client(4)
> > > >         [ 1732.850236] NFS: releasing client cookie (0xffff880039cfd9e8/0xffff88003b889000)
> > > >         [ 1732.853726] <-- nfs_free_client()
> > > >         [ 1732.854505] <-- nfs_free_server()
> > > >         [ 1732.855274] <-- nfs4_create_server() = error -11
> > > >         [ 1732.856187] <-- nfs4_try_mount() = -11 [error]
> > > > 
> > > > Bisected and got the commit listed above.
> > > > 
> > > 
> > 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN
  2011-04-02 19:01       ` J. Bruce Fields
@ 2011-04-04 12:48         ` Bryan Schumaker
  0 siblings, 0 replies; 7+ messages in thread
From: Bryan Schumaker @ 2011-04-04 12:48 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Eric Paris, linux-nfs, Trond.Myklebust

On 04/02/2011 03:01 PM, J. Bruce Fields wrote:
> On Wed, Mar 30, 2011 at 09:31:57PM -0400, Eric Paris wrote:
>> On Wed, 2011-03-30 at 17:33 -0400, Eric Paris wrote:
>>> On Wed, 2011-03-30 at 17:12 -0400, Bryan Schumaker wrote:
>>>> On 03/30/2011 03:32 PM, Eric Paris wrote:
>>>>> $ git bisect good
>>>>> 8f70e95f9f4159184f557a1db60c909d7c1bd2e3 is the first bad commit
>>>>> commit 8f70e95f9f4159184f557a1db60c909d7c1bd2e3
>>>>> Author: Bryan Schumaker <bjschuma@netapp.com>
>>>>> Date:   Thu Mar 24 17:12:31 2011 +0000
>>>>>
>>>>>     NFS: Determine initial mount security
>>>>>     
>>>>>     When sec=<something> is not presented as a mount option,
>>>>>     we should attempt to determine what security flavor the
>>>>>     server is using.
>>>>>     
>>>>>     Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
>>>>>     Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
>>>>>
>>>>> Using a linux-next kernel for the last 2 days I have been unable to
>>>>> mount exports from my RHEL6 server.  mount(2) returned EAGAIN.  Turned
>>>>
>>>> Thanks for letting me know.  What does your exports file look like?
>>>
>>> # cat /etc/exports
>>> /		127.0.0.1(fsid=0)
>>> /export		*(rw,fsid=1,all_squash,anonuid=500,anongid=500)
>>
>> At jlayton's suggestion I changed /exports to not include the /
>> 127.0.0.1 and removed both explicit fsid= and it works.  So this patch
>> broke my setup, but I have a workaround.
> 
> OK, but I'm a little confused why that would make any difference to
> client security negotiation code.
> 
> Do we understand why your setup broke after that client change?

There is some error code returned to the mount program that tells it to fall back to v3 for mounting.  My change stopped returning this error, and instead returned a different code that told mount to give up.  I think this patch fixes it.

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index dfd1e6d..9bf41ea 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2204,8 +2204,6 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl
 		goto out;
 	}
 	ret = nfs4_lookup_root(server, fhandle, info);
-	if (ret < 0)
-		ret = -EAGAIN;
 out:
 	return ret;
 }
@@ -2226,7 +2224,7 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
 
 	for (i = 0; i < len; i++) {
 		status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]);
-		if (status == 0)
+		if (status != -EPERM)
 			break;
 	}
 	if (status == 0)




> 
> --b
> 
>> (I'm pretty sure the
>> previous / 127 entry was a workaround for a problem when all my clients
>> broke during Fedora's switch to use NFSv4 default.  Funny one workaround
>> comes back to bit me again  :))
>>
>> Thanks! 
>>
>>
>>> The client fstab looks like:
>>> paris.rdu.redhat.com:/export/ /storage nfs tcp,noatime,nodiratime,noauto,users,exec,suid 0 0
>>>
>>>>
>>>> Bryan
>>>>
>>>>> up debugging (thanks jlayton) and got:
>>>>>
>>>>>         [ 1732.795056] NFS: nfs mount opts='tcp,vers=4,addr=10.11.231.241,clientaddr=10.11.231.191'
>>>>>         [ 1732.798079] NFS:   parsing nfs mount option 'tcp'
>>>>>         [ 1732.800210] NFS:   parsing nfs mount option 'vers=4'
>>>>>         [ 1732.802324] NFS:   parsing nfs mount option 'addr=10.11.231.241'
>>>>>         [ 1732.804477] NFS:   parsing nfs mount option 'clientaddr=10.11.231.191'
>>>>>         [ 1732.805790] NFS: MNTPATH: '/export/'
>>>>>         [ 1732.806663] --> nfs4_try_mount()
>>>>>         [ 1732.807459] --> nfs4_create_server()
>>>>>         [ 1732.808301] --> nfs4_init_server()
>>>>>         [ 1732.809136] --> nfs4_set_client()
>>>>>         [ 1732.809898] --> nfs_get_client(paris.rdu.redhat.com,v4)
>>>>>         [ 1732.811122] NFS: get client cookie (0xffff880039cfd9e8/0xffff88003b889000)
>>>>>         [ 1732.813771] NFS: Callback listener port = 36700 (af 2)
>>>>>         [ 1732.814931] NFS: Callback listener port = 60202 (af 10)
>>>>>         [ 1732.816199] --> nfs_get_client() = ffff880039cfd9e8 [new]
>>>>>         [ 1732.817356] <-- nfs4_set_client() = 0 [new ffff880039cfd9e8]
>>>>>         [ 1732.818587] <-- nfs4_init_server() = 0
>>>>>         [ 1732.819476] --> nfs4_get_rootfh()
>>>>>         [ 1732.820282] encode_compound: tag=
>>>>>         [ 1732.822070] encode_compound: tag=
>>>>>         [ 1732.822937] nfs4_get_rootfh: getroot error = 11
>>>>>         [ 1732.823982] <-- nfs4_get_rootfh() = -11
>>>>>         [ 1732.824880] --> nfs_free_server()
>>>>>         [ 1732.846219] --> nfs_put_client({1})
>>>>>         [ 1732.847888] --> nfs_free_client(4)
>>>>>         [ 1732.850236] NFS: releasing client cookie (0xffff880039cfd9e8/0xffff88003b889000)
>>>>>         [ 1732.853726] <-- nfs_free_client()
>>>>>         [ 1732.854505] <-- nfs_free_server()
>>>>>         [ 1732.855274] <-- nfs4_create_server() = error -11
>>>>>         [ 1732.856187] <-- nfs4_try_mount() = -11 [error]
>>>>>
>>>>> Bisected and got the commit listed above.
>>>>>
>>>>
>>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2011-04-04 12:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 19:32 [REGRESSION] 8f70e95f9f4159184f557 causes mount failure with EGAIN Eric Paris
2011-03-30 21:12 ` Bryan Schumaker
2011-03-30 21:33   ` Eric Paris
2011-03-31  1:31     ` Eric Paris
2011-03-31 17:17       ` Bryan Schumaker
2011-04-02 19:01       ` J. Bruce Fields
2011-04-04 12:48         ` Bryan Schumaker

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.