Skip to contentSkip to conversation

Patch: 2.5.62 devfs shrink

DISCUSSION Adam J. Richter 4 participants 4 messages Feb 25, 2003 – Feb 26, 2003 VFS

lore
Share & tools
lore
#0 lore raw

Here is an update to my patch to shrink devfs for linux-2.5.62.
The patch is a net deletion of 2407 lines. It contains the following new changes:

- Maneesh Soni submitted a patch for operation with the read-copy-update code, which was extremely good timing, as that code apparently got integrated into 2.5.62.

- Fixed a bug reported by Alistair Strachan where pseudo-terminals could not be allocated by non-super-user processes (devfs needed to set CAP_DAC_OVERRIDE in a couple of places).

- Restore the devfs=nomount option, to accomodate a distribution compatability problem reported by Steven Cole. devfs=nomount suppresses the effect CONFIG_DEVFS_MOUNT--that is, mounting of /dev before the kernel invokes /sbin/init. Note: perhsps we should eliminate CONFIG_DEVFS_MOUNT entirely. I'll have to check to see if it is needed by systems that boot directly to a hardware device rather than to an initial ramdisk.

Presumably because of the size of all of the "-" lines in the
patch, the linux-kernel mailing list filters it out, so I'll just post a URL for it:

ftp://ftp.yggdrasil.com/pub/dist/device_control/devfs/smalldevfs-2.5.62-v10.patch

Also, here is the URL for the latest devfs_helper user level
program (version 0.2, unchanged). It is a reduced functionality replacement for devfsd.

ftp://ftp.yggdrasil.com/pub/dist/device_control/devfs/devfs_helper-0.2.tar.gz

I'll also describe my "to do" list for this software, in case
anyone spots something I've forgotten:

- Submit a patch to the -mm kernels, as Andrew has been kind enough to distribute this change in his -mm kernels.
- Write a small FAQ list on moving from old devfs.
- Remove CONFIG_DEVFS_MOUNT?
- Probably request integration after linux-2.7.0.

Adam J. Richter     __     ______________   575 Oroville Road
[email protected]     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

"Free Software For The Rest Of Us."

#1 lore raw
Quoted 2 lines · Adam J. Richter

Here is an update to my patch to shrink devfs for linux-2.5.62.

Adam, could you please provide a description of the incompatibilities between this implementation and the present one? For both kernel and userspace.

And would you also please provide a list of operations which people need to perform to migrate existing setups to the new code.

And should I drop the below patch?

init/do_mounts.c renamed from init/do_mounts.c~devfs-fix +0 -5
diff -puN init/do_mounts.c~devfs-fix init/do_mounts.c
@@ -853,11 +853,6 @@ void prepare_namespace(void)
 {
 	int is_floppy;
 
-#ifdef CONFIG_DEVFS_FS
-	sys_mount("devfs", "/dev", "devfs", 0, NULL);
-	do_devfs = 1;
-#endif
-
 	md_run_setup();
 
 	if (saved_root_name[0]) {

_

#2 lore raw

init/do_mounts.c void prepare_namespace(void) · line 856

Quoted 13 lines · Andrew Morton

diff -puN init/do_mounts.c~devfs-fix init/do_mounts.c

init/do_mounts.c renamed from init/do_mounts.c~devfs-fix +0 -5
@@ -853,11 +853,6 @@ void prepare_namespace(void)
 {
 	int is_floppy;
 
-#ifdef CONFIG_DEVFS_FS
-	sys_mount("devfs", "/dev", "devfs", 0, NULL);
-	do_devfs = 1;
-#endif
-
 	md_run_setup();

Whoa. I thought that sucker made it into mainline.
This has been blocking closure of http://bugzilla.kernel.org/show_bug.cgi?id=110
for a while.

Dave

#3 lore raw

The real fix cset is below and was applied long ago (dated Jan 5), and indeed reading carefully bugzilla #110

"2.5.55 boots ok with no workarounds needed, but 2.5.54 fails"

[email protected]|ChangeSet|20030106035042|11703

1.879.2.22 03/01/05 19:50:42-08:00 [email protected] 15796 15795 00003/00000/00001

[PATCH] devfs mount-time readdir fix and cleanup

milton