public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL][PATCH]:/proc/fs/nfsd/
@ 2004-03-05  9:09 Raj
  2004-03-05 10:08 ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Raj @ 2004-03-05  9:09 UTC (permalink / raw)
  To: Linux Kernel; +Cc: okir

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

Hi,

Kernel Version: 2.6.3
Even if NFSD is not selected, the proc entry /proc/fs/nfsd is getting 
created.

The following patch fixes it.

Pls apply.

/Raj

[-- Attachment #2: nfsd-proc.patch --]
[-- Type: text/plain, Size: 575 bytes --]

--- linux-2.6.3/fs/proc/root.c	2004-02-19 09:52:32.000000000 +0530
+++ linux-2.6.3-fixed/fs/proc/root.c	2004-03-05 13:48:28.448516568 +0530
@@ -65,7 +65,11 @@ void __init proc_root_init(void)
 #endif
 	proc_root_fs = proc_mkdir("fs", 0);
 	proc_root_driver = proc_mkdir("driver", 0);
+
+#if defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)
 	proc_mkdir("fs/nfsd", 0); /* somewhere for the nfsd filesystem to be mounted */
+#endif
+
 #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
 	/* just give it a mountpoint */
 	proc_mkdir("openprom", 0);

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

* Re: [TRIVIAL][PATCH]:/proc/fs/nfsd/
@ 2004-03-05  9:47 Petr Vandrovec
  2004-03-05 11:28 ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vandrovec @ 2004-03-05  9:47 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux Kernel, okir, obelix123

On  5 Mar 04 at 21:08, Neil Brown wrote:
> > The following patch fixes it.
> 
> Does it need fixing??
> 
> If you remove this, then people who compile a kernel without nfsd
> support, and then later decide to compile an nfsd module and load it,
> will not be able to mount the nfsd filesystem at the right place.

> I think it is a very small cost, and a measurable gain, to leave it
> there.

Maybe I'm stupid, but why cannot knfsd module create fs/nfsd
directory at module load? That way you can do insmod/modprobe followed 
by mount() to do that. And if you'll fiddle with do_mount a bit
(so that get_fs_type() is invoked before walking mount path)
you can do it even without modprobing knfsd in advance, by just
doing 'mount none /proc/fs/nfsd -t nfsd'.
                                                Petr Vandrovec


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

* Re: [TRIVIAL][PATCH]:/proc/fs/nfsd/
  2004-03-05  9:09 [TRIVIAL][PATCH]:/proc/fs/nfsd/ Raj
@ 2004-03-05 10:08 ` Neil Brown
  2004-03-05 10:35   ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Brown @ 2004-03-05 10:08 UTC (permalink / raw)
  To: Raj; +Cc: Linux Kernel, okir

On Friday March 5, obelix123@toughguy.net wrote:
> Hi,
> 
> Kernel Version: 2.6.3
> Even if NFSD is not selected, the proc entry /proc/fs/nfsd is getting 
> created.

Is it a problem??

> 
> The following patch fixes it.

Does it need fixing??

If you remove this, then people who compile a kernel without nfsd
support, and then later decide to compile an nfsd module and load it,
will not be able to mount the nfsd filesystem at the right place.

You might say "that won't happen", but it does, and has.
You might say "they shouldn't do that", and maybe they shouldn't.  But
it still causes a support burden on the mailing list.

I think it is a very small cost, and a measurable gain, to leave it
there.

Do you really think otherwise?

NeilBRown


> 
> Pls apply.
> 
> /Raj
> --- linux-2.6.3/fs/proc/root.c	2004-02-19 09:52:32.000000000 +0530
> +++ linux-2.6.3-fixed/fs/proc/root.c	2004-03-05 13:48:28.448516568 +0530
> @@ -65,7 +65,11 @@ void __init proc_root_init(void)
>  #endif
>  	proc_root_fs = proc_mkdir("fs", 0);
>  	proc_root_driver = proc_mkdir("driver", 0);
> +
> +#if defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)
>  	proc_mkdir("fs/nfsd", 0); /* somewhere for the nfsd filesystem to be mounted */
> +#endif
> +
>  #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
>  	/* just give it a mountpoint */
>  	proc_mkdir("openprom", 0);

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

* Re: [TRIVIAL][PATCH]:/proc/fs/nfsd/
  2004-03-05 10:08 ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Neil Brown
@ 2004-03-05 10:35   ` Raj
  2004-03-13 17:26     ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: Raj @ 2004-03-05 10:35 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux Kernel, okir

Neil Brown wrote:

>On Friday March 5, obelix123@toughguy.net wrote:
>  
>
>>Hi,
>>
>>Kernel Version: 2.6.3
>>Even if NFSD is not selected, the proc entry /proc/fs/nfsd is getting 
>>created.
>>    
>>
>
>Is it a problem??
>  
>
Theoritically no, but behavior wise , yes.

>  
>
>>The following patch fixes it.
>>    
>>
>
>Does it need fixing??
>
>If you remove this, then people who compile a kernel without nfsd
>support, and then later decide to compile an nfsd module and load it,
>will not be able to mount the nfsd filesystem at the right place.
>  
>

I guess choosing nfsd either builtin or as a module will cause a rebuild 
of some components of the main kernel and hence a
reboot is anyway need. Pls correct me if i am wrong.

>
>  
>
>>Pls apply.
>>
>>/Raj
>>--- linux-2.6.3/fs/proc/root.c	2004-02-19 09:52:32.000000000 +0530
>>+++ linux-2.6.3-fixed/fs/proc/root.c	2004-03-05 13:48:28.448516568 +0530
>>@@ -65,7 +65,11 @@ void __init proc_root_init(void)
>> #endif
>> 	proc_root_fs = proc_mkdir("fs", 0);
>> 	proc_root_driver = proc_mkdir("driver", 0);
>>+
>>+#if defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)
>> 	proc_mkdir("fs/nfsd", 0); /* somewhere for the nfsd filesystem to be mounted */
>>+#endif
>>+
>> #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
>> 	/* just give it a mountpoint */
>> 	proc_mkdir("openprom", 0);
>>    
>>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>
>  
>



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

* Re: [TRIVIAL][PATCH]:/proc/fs/nfsd/
  2004-03-05  9:47 [TRIVIAL][PATCH]:/proc/fs/nfsd/ Petr Vandrovec
@ 2004-03-05 11:28 ` Neil Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Brown @ 2004-03-05 11:28 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: Linux Kernel, obelix123

On Friday March 5, VANDROVE@vc.cvut.cz wrote:
> On  5 Mar 04 at 21:08, Neil Brown wrote:
> > > The following patch fixes it.
> > 
> > Does it need fixing??
> > 
> > If you remove this, then people who compile a kernel without nfsd
> > support, and then later decide to compile an nfsd module and load it,
> > will not be able to mount the nfsd filesystem at the right place.
> 
> > I think it is a very small cost, and a measurable gain, to leave it
> > there.
> 
> Maybe I'm stupid, but why cannot knfsd module create fs/nfsd
> directory at module load? That way you can do insmod/modprobe followed 
> by mount() to do that. And if you'll fiddle with do_mount a bit
> (so that get_fs_type() is invoked before walking mount path)
> you can do it even without modprobing knfsd in advance, by just
> doing 'mount none /proc/fs/nfsd -t nfsd'.
>                                                 Petr Vandrovec

I wanted 
   mount -t nfsd nfsd /proc/fs/nfsd
to load the module and, as you have noticed, that doesn't work.

"fiddle"ing with do_mount is an interesting idea.  If you (or someone)
can make that work and get it accepted, I am happy to have the nfsd
module create the directory.

NeilBrown

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

* Re: [TRIVIAL][PATCH]:/proc/fs/nfsd/
  2004-03-05 10:35   ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Raj
@ 2004-03-13 17:26     ` Adrian Bunk
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2004-03-13 17:26 UTC (permalink / raw)
  To: Raj; +Cc: Neil Brown, Linux Kernel, okir

On Fri, Mar 05, 2004 at 04:05:47PM +0530, Raj wrote:
> Neil Brown wrote:
>...
> >Does it need fixing??
> >
> >If you remove this, then people who compile a kernel without nfsd
> >support, and then later decide to compile an nfsd module and load it,
> >will not be able to mount the nfsd filesystem at the right place.
> > 
> >
> 
> I guess choosing nfsd either builtin or as a module will cause a rebuild 
> of some components of the main kernel and hence a
> reboot is anyway need. Pls correct me if i am wrong.

You are wrong.

If choosing nfsd as a module, no component of the main kernel needs to 
be changed to load the module on i386.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2004-03-13 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-05  9:09 [TRIVIAL][PATCH]:/proc/fs/nfsd/ Raj
2004-03-05 10:08 ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Neil Brown
2004-03-05 10:35   ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Raj
2004-03-13 17:26     ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2004-03-05  9:47 [TRIVIAL][PATCH]:/proc/fs/nfsd/ Petr Vandrovec
2004-03-05 11:28 ` [TRIVIAL][PATCH]:/proc/fs/nfsd/ Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox