* Re: [PATCH] NFS: Make NFS root work again
2007-06-07 16:40 [PATCH] NFS: Make NFS root work again David Howells
@ 2007-06-07 17:56 ` Peter Staubach
2007-06-07 19:53 ` Andrew Morton
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Peter Staubach @ 2007-06-07 17:56 UTC (permalink / raw)
To: David Howells
Cc: torvalds, akpm, trond.myklebust, linux-kernel, linux-fsdevel
David Howells wrote:
> Make NFS root work by creating a "/root" directory to satisfy the mount,
> otherwise the path lookup for the mount fails with ENOENT.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
>
> init/do_mounts.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 46fe407..967b852 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -270,7 +270,10 @@ static void __init get_fs_names(char *page)
>
> static int __init do_mount_root(char *name, char *fs, int flags, void *data)
> {
> - int err = sys_mount(name, "/root", fs, flags, data);
> + int err;
> +
> + sys_mkdir("/root", 0755);
> + err = sys_mount(name, "/root", fs, flags, data);
> if (err)
> return err;
It seems to me that if sys_mkdir() fails with anything other other
than EEXISTS, then sys_mount() will continue to fail. Is this
something that we care about?
ps
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] NFS: Make NFS root work again
2007-06-07 16:40 [PATCH] NFS: Make NFS root work again David Howells
2007-06-07 17:56 ` Peter Staubach
@ 2007-06-07 19:53 ` Andrew Morton
2007-06-16 16:15 ` Andrew Morton
2007-06-18 11:09 ` David Howells
3 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2007-06-07 19:53 UTC (permalink / raw)
To: David Howells; +Cc: torvalds, trond.myklebust, linux-kernel, linux-fsdevel
On Thu, 07 Jun 2007 17:40:03 +0100
David Howells <dhowells@redhat.com> wrote:
> Make NFS root work by creating a "/root" directory to satisfy the mount,
> otherwise the path lookup for the mount fails with ENOENT.
>
What did we do to make it stop working, and when did we do it??
>
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 46fe407..967b852 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -270,7 +270,10 @@ static void __init get_fs_names(char *page)
>
> static int __init do_mount_root(char *name, char *fs, int flags, void *data)
> {
> - int err = sys_mount(name, "/root", fs, flags, data);
> + int err;
> +
> + sys_mkdir("/root", 0755);
> + err = sys_mount(name, "/root", fs, flags, data);
> if (err)
> return err;
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] NFS: Make NFS root work again
2007-06-07 16:40 [PATCH] NFS: Make NFS root work again David Howells
2007-06-07 17:56 ` Peter Staubach
2007-06-07 19:53 ` Andrew Morton
@ 2007-06-16 16:15 ` Andrew Morton
2007-06-16 16:47 ` Trond Myklebust
` (2 more replies)
2007-06-18 11:09 ` David Howells
3 siblings, 3 replies; 8+ messages in thread
From: Andrew Morton @ 2007-06-16 16:15 UTC (permalink / raw)
To: David Howells; +Cc: torvalds, trond.myklebust, linux-kernel, linux-fsdevel
On Thu, 07 Jun 2007 17:40:03 +0100 David Howells <dhowells@redhat.com> wrote:
> Make NFS root work by creating a "/root" directory to satisfy the mount,
> otherwise the path lookup for the mount fails with ENOENT.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
>
> init/do_mounts.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 46fe407..967b852 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -270,7 +270,10 @@ static void __init get_fs_names(char *page)
>
> static int __init do_mount_root(char *name, char *fs, int flags, void *data)
> {
> - int err = sys_mount(name, "/root", fs, flags, data);
> + int err;
> +
> + sys_mkdir("/root", 0755);
> + err = sys_mount(name, "/root", fs, flags, data);
> if (err)
> return err;
Am still awaiting a proper description of this patch, please.
What is not working, and how does this patch fix it?
I am unaware of any open bug reports against NFS root.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] NFS: Make NFS root work again
2007-06-16 16:15 ` Andrew Morton
@ 2007-06-16 16:47 ` Trond Myklebust
2007-06-17 3:26 ` Paul Mundt
2007-06-17 18:44 ` Andi Kleen
2 siblings, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2007-06-16 16:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: David Howells, torvalds, linux-kernel, linux-fsdevel
On Sat, 2007-06-16 at 09:15 -0700, Andrew Morton wrote:
> On Thu, 07 Jun 2007 17:40:03 +0100 David Howells <dhowells@redhat.com> wrote:
>
> > Make NFS root work by creating a "/root" directory to satisfy the mount,
> > otherwise the path lookup for the mount fails with ENOENT.
> >
> > Signed-off-by: David Howells <dhowells@redhat.com>
> > ---
> >
> > init/do_mounts.c | 5 ++++-
> > 1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > diff --git a/init/do_mounts.c b/init/do_mounts.c
> > index 46fe407..967b852 100644
> > --- a/init/do_mounts.c
> > +++ b/init/do_mounts.c
> > @@ -270,7 +270,10 @@ static void __init get_fs_names(char *page)
> >
> > static int __init do_mount_root(char *name, char *fs, int flags, void *data)
> > {
> > - int err = sys_mount(name, "/root", fs, flags, data);
> > + int err;
> > +
> > + sys_mkdir("/root", 0755);
> > + err = sys_mount(name, "/root", fs, flags, data);
> > if (err)
> > return err;
>
> Am still awaiting a proper description of this patch, please.
>
> What is not working, and how does this patch fix it?
>
> I am unaware of any open bug reports against NFS root.
I'm confused too. We never used to require that the kernel create a
special /root directory. What changed, and when?
Trond
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] NFS: Make NFS root work again
2007-06-16 16:15 ` Andrew Morton
2007-06-16 16:47 ` Trond Myklebust
@ 2007-06-17 3:26 ` Paul Mundt
2007-06-17 18:44 ` Andi Kleen
2 siblings, 0 replies; 8+ messages in thread
From: Paul Mundt @ 2007-06-17 3:26 UTC (permalink / raw)
To: Andrew Morton
Cc: David Howells, torvalds, trond.myklebust, linux-kernel, linux-fsdevel
On Sat, Jun 16, 2007 at 09:15:14AM -0700, Andrew Morton wrote:
> On Thu, 07 Jun 2007 17:40:03 +0100 David Howells <dhowells@redhat.com> wrote:
> > Make NFS root work by creating a "/root" directory to satisfy the mount,
> > otherwise the path lookup for the mount fails with ENOENT.
> >
>
> Am still awaiting a proper description of this patch, please.
>
> What is not working, and how does this patch fix it?
>
> I am unaware of any open bug reports against NFS root.
I've not had any problems with it during any of the -rc periods, for what
it's worth.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] NFS: Make NFS root work again
2007-06-16 16:15 ` Andrew Morton
2007-06-16 16:47 ` Trond Myklebust
2007-06-17 3:26 ` Paul Mundt
@ 2007-06-17 18:44 ` Andi Kleen
2 siblings, 0 replies; 8+ messages in thread
From: Andi Kleen @ 2007-06-17 18:44 UTC (permalink / raw)
To: Andrew Morton
Cc: David Howells, torvalds, trond.myklebust, linux-kernel, linux-fsdevel
Andrew Morton <akpm@linux-foundation.org> writes:
>
> What is not working, and how does this patch fix it?
FWIW i use nfs root regularly for testing kernels and it works
for me.
-Andi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] NFS: Make NFS root work again
2007-06-07 16:40 [PATCH] NFS: Make NFS root work again David Howells
` (2 preceding siblings ...)
2007-06-16 16:15 ` Andrew Morton
@ 2007-06-18 11:09 ` David Howells
3 siblings, 0 replies; 8+ messages in thread
From: David Howells @ 2007-06-18 11:09 UTC (permalink / raw)
To: Andrew Morton; +Cc: torvalds, trond.myklebust, linux-kernel, linux-fsdevel
Andrew Morton <akpm@linux-foundation.org> wrote:
> What is not working, and how does this patch fix it?
It turns out that this patch is unnecessary. The problem had to do with the
initcalling of default_rootfs() (or lack of initcalling in this case). I
fixed vmlinux.lds.S and it works now.
David
^ permalink raw reply [flat|nested] 8+ messages in thread