From acecc47261567816ace517333ae445c98d4a304d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 7 Jul 2000 21:22:19 +0000 Subject: Add in my fix for 2.4.x kernels so /proc/mounts will not have useless deg entries which break mount, df, and friends. Renamed WillThisGoIntoTheKernel to avoid any confision. -Erik --- examples/kernel-patches/2.4.x_mount_patch | 66 +++++++++++++ examples/kernel-patches/WillThisGoIntoTheKernel | 104 --------------------- examples/kernel-patches/Will_devps_GoIntoTheKernel | 104 +++++++++++++++++++++ 3 files changed, 170 insertions(+), 104 deletions(-) create mode 100644 examples/kernel-patches/2.4.x_mount_patch delete mode 100644 examples/kernel-patches/WillThisGoIntoTheKernel create mode 100644 examples/kernel-patches/Will_devps_GoIntoTheKernel (limited to 'examples/kernel-patches') diff --git a/examples/kernel-patches/2.4.x_mount_patch b/examples/kernel-patches/2.4.x_mount_patch new file mode 100644 index 0000000..91f5262 --- /dev/null +++ b/examples/kernel-patches/2.4.x_mount_patch @@ -0,0 +1,66 @@ +On Sat Jul 01, 2000 at 12:04:36PM -0400, Alexander Viro wrote: +> +> Try to trace the path from their roots to absolute root(s)... They simply +> should not be in the output - that's a debugging stuff and I have no +> problems with removing it from /proc/mounts. No heuristics needed - we +> can pass NULL as dev_name in kern_mount() and check for NULL ->mnt_devname +> in get_filesystem_info(). I'll do that as soon as threading patches will +> be over (hopefully RSN - they went to Linus). +> + +Ok, cool. So something like then? I kept in the filter for FS_NOMOUNT +filesystems, as I assume those should never show up in /proc/mounts, and added +that filter to the /proc/filesystems listing as well. + + -Erik + +-- +Erik B. Andersen Web: http://www.xmission.com/~andersen/ + email: andersee@debian.org +--This message was written using 73% post-consumer electrons-- + + +--- fs/super.c.virgin Wed Jun 28 22:42:35 2000 ++++ fs/super.c Mon Jul 3 12:07:07 2000 +@@ -251,6 +251,10 @@ int get_filesystem_list(char * buf) + read_lock(&file_systems_lock); + tmp = file_systems; + while (tmp && len < PAGE_SIZE - 80) { ++ /* Filter out any filesystems that are marked as FS_NOMOUNT. ++ * User space doesn't need to know or care about them */ ++ if (tmp->fs_flags & FS_NOMOUNT) ++ continue; + len += sprintf(buf+len, "%s\t%s\n", + (tmp->fs_flags & FS_REQUIRES_DEV) ? "" : "nodev", + tmp->name); +@@ -443,6 +447,16 @@ int get_filesystem_info( char *buf ) + path = d_path(tmp->mnt_root, tmp, buffer, PAGE_SIZE); + if (!path) + continue; ++ /* Filter out any filesystems that are marked as FS_NOMOUNT. ++ * User space doesn't need to know or care about them */ ++ if (tmp->mnt_sb->s_type->fs_flags & FS_NOMOUNT) ++ continue; ++ /* kern_mount() allows the kernel to mount internal-use-only ++ * filesystems, and marks then with ->mnt_devname==NULL, so ++ * filter out those here */ ++ if (tmp->mnt_devname == NULL) ++ continue; ++ + len += sprintf( buf + len, "%s %s %s %s", + tmp->mnt_devname, path, + tmp->mnt_sb->s_type->name, +@@ -895,7 +909,7 @@ struct vfsmount *kern_mount(struct file_ + put_unnamed_dev(dev); + return ERR_PTR(-EINVAL); + } +- mnt = add_vfsmnt(sb, sb->s_root, sb->s_root, NULL, "none", type->name); ++ mnt = add_vfsmnt(sb, sb->s_root, sb->s_root, NULL, NULL, type->name); + if (!mnt) { + kill_super(sb, 0); + return ERR_PTR(-ENOMEM); + +- +To unsubscribe from this list: send the line "unsubscribe linux-kernel" in +the body of a message to majordomo@vger.rutgers.edu +Please read the FAQ at http://www.tux.org/lkml/ diff --git a/examples/kernel-patches/WillThisGoIntoTheKernel b/examples/kernel-patches/WillThisGoIntoTheKernel deleted file mode 100644 index 33ee8b4..0000000 --- a/examples/kernel-patches/WillThisGoIntoTheKernel +++ /dev/null @@ -1,104 +0,0 @@ -I have been asked several times whether the devps patch will go into the -mainline Linux kernel. The following emails from Alan Cox and Linux Torvalds -make it clear that it is not going to happen. This does not mean this patch -had no value -- it does. It just means that those that like it get to apply it -themselves... - - -Erik - - -------------------------------- - -From alan@lxorguk.ukuu.org.uk Thu Apr 13 08:07:22 2000 -Return-Path: -Delivered-To: andersen@dillweed.dsl.xmission.com -Received: from localhost (dillweed.dsl.xmission.com [10.0.0.1]) - by dillweed.dsl.xmission.com (Postfix) with ESMTP id 1D57A11A4F5 - for ; Thu, 13 Apr 2000 08:07:22 -0600 (MDT) -Envelope-to: andersen@xmission.com -Received: from mail.xmission.com - by localhost with IMAP (fetchmail-5.3.3) - for andersen@dillweed.dsl.xmission.com (single-drop); Thu, 13 Apr 2000 08:07:22 -0600 (MDT) -Received: from [194.168.151.1] (helo=the-village.bc.nu) - by mail.xmission.com with esmtp (Exim 3.03 #3) - id 12fhQk-0002OZ-00 - for andersen@xmission.com; Thu, 13 Apr 2000 05:05:03 -0600 -Received: from alan by the-village.bc.nu with local (Exim 2.12 #1) - id 12fhQ9-0002nD-00 - for andersen@xmission.com; Thu, 13 Apr 2000 12:04:25 +0100 -Subject: Re: kernel ps drivers [Was: vm locking question] -To: andersen@xmission.com -Date: Thu, 13 Apr 2000 12:04:23 +0100 (BST) -In-Reply-To: <20000412224130.A2748@xmission.com> from "Erik Andersen" at Apr 12, 2000 10:41:30 PM -X-Mailer: ELM [version 2.5 PL1] -MIME-Version: 1.0 -Content-Type: text/plain; charset=us-ascii -Content-Transfer-Encoding: 7bit -Message-Id: -From: Alan Cox -Status: RO -X-Status: A -Content-Length: 242 -Lines: 6 - -> On the subject of ps, would you be willing to accept my /dev/ps -> patch into the kernel? If no, any suggestions on what should -> be done differently (if anything) to make it worthy of inclusion? - -For 2.2.x no, for 2.3.x ask Linus not me - - -From torvalds@transmeta.com Thu Apr 13 09:18:16 2000 -Return-Path: -Delivered-To: andersen@dillweed.dsl.xmission.com -Received: from localhost (dillweed.dsl.xmission.com [10.0.0.1]) - by dillweed.dsl.xmission.com (Postfix) with ESMTP id 3776411A3DF - for ; Thu, 13 Apr 2000 09:18:16 -0600 (MDT) -Envelope-to: andersen@xmission.com -Received: from mail.xmission.com - by localhost with IMAP (fetchmail-5.3.3) - for andersen@dillweed.dsl.xmission.com (single-drop); Thu, 13 Apr 2000 09:18:16 -0600 (MDT) -Received: from [209.10.217.66] (helo=neon-gw.transmeta.com) - by mail.xmission.com with esmtp (Exim 3.03 #3) - id 12flK2-0004dd-00 - for andersen@xmission.com; Thu, 13 Apr 2000 09:14:22 -0600 -Received: (from root@localhost) - by neon-gw.transmeta.com (8.9.3/8.9.3) id IAA18635; - Thu, 13 Apr 2000 08:10:51 -0700 -Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) - id xma018629; Thu, 13 Apr 00 08:10:25 -0700 -Received: from penguin.transmeta.com (root@penguin.transmeta.com [10.1.2.202]) - by deepthought.transmeta.com (8.9.3/8.9.3) with ESMTP id IAA12264; - Thu, 13 Apr 2000 08:13:53 -0700 (PDT) -Received: from localhost (torvalds@localhost) by penguin.transmeta.com (8.9.3/8.7.3) with ESMTP id IAA02051; Thu, 13 Apr 2000 08:13:53 -0700 -X-Authentication-Warning: penguin.transmeta.com: torvalds owned process doing -bs -Date: Thu, 13 Apr 2000 08:13:53 -0700 (PDT) -From: Linus Torvalds -To: Erik Andersen -Cc: Alan Cox -Subject: Re: kernel ps drivers [Was: vm locking question] -In-Reply-To: <20000413083127.A976@xmission.com> -Message-ID: -MIME-Version: 1.0 -Content-Type: TEXT/PLAIN; charset=US-ASCII -Status: RO -Content-Length: 659 -Lines: 16 - - - -On Thu, 13 Apr 2000, Erik Andersen wrote: -> -> For 2.3.x would you be willing to accept my /dev/ps driver into the kernel? -> (Assuming I remove the /dev/modules driver (since it was pointed out that there -> is a perfectly good syscall providing that interface). If no, is there anything -> that could be done differently (if anything) to make it worthy of inclusion? - -I do dislike /dev/ps mightily. If the problem is that /proc is too large, -then the right solution is to just clean up /proc. Which is getting done. -And yes, /proc will be larger than /dev/ps, but I still find that -preferable to having two incompatible ways to do the same thing. - - Linus - - diff --git a/examples/kernel-patches/Will_devps_GoIntoTheKernel b/examples/kernel-patches/Will_devps_GoIntoTheKernel new file mode 100644 index 0000000..33ee8b4 --- /dev/null +++ b/examples/kernel-patches/Will_devps_GoIntoTheKernel @@ -0,0 +1,104 @@ +I have been asked several times whether the devps patch will go into the +mainline Linux kernel. The following emails from Alan Cox and Linux Torvalds +make it clear that it is not going to happen. This does not mean this patch +had no value -- it does. It just means that those that like it get to apply it +themselves... + + -Erik + + +------------------------------- + +From alan@lxorguk.ukuu.org.uk Thu Apr 13 08:07:22 2000 +Return-Path: +Delivered-To: andersen@dillweed.dsl.xmission.com +Received: from localhost (dillweed.dsl.xmission.com [10.0.0.1]) + by dillweed.dsl.xmission.com (Postfix) with ESMTP id 1D57A11A4F5 + for ; Thu, 13 Apr 2000 08:07:22 -0600 (MDT) +Envelope-to: andersen@xmission.com +Received: from mail.xmission.com + by localhost with IMAP (fetchmail-5.3.3) + for andersen@dillweed.dsl.xmission.com (single-drop); Thu, 13 Apr 2000 08:07:22 -0600 (MDT) +Received: from [194.168.151.1] (helo=the-village.bc.nu) + by mail.xmission.com with esmtp (Exim 3.03 #3) + id 12fhQk-0002OZ-00 + for andersen@xmission.com; Thu, 13 Apr 2000 05:05:03 -0600 +Received: from alan by the-village.bc.nu with local (Exim 2.12 #1) + id 12fhQ9-0002nD-00 + for andersen@xmission.com; Thu, 13 Apr 2000 12:04:25 +0100 +Subject: Re: kernel ps drivers [Was: vm locking question] +To: andersen@xmission.com +Date: Thu, 13 Apr 2000 12:04:23 +0100 (BST) +In-Reply-To: <20000412224130.A2748@xmission.com> from "Erik Andersen" at Apr 12, 2000 10:41:30 PM +X-Mailer: ELM [version 2.5 PL1] +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit +Message-Id: +From: Alan Cox +Status: RO +X-Status: A +Content-Length: 242 +Lines: 6 + +> On the subject of ps, would you be willing to accept my /dev/ps +> patch into the kernel? If no, any suggestions on what should +> be done differently (if anything) to make it worthy of inclusion? + +For 2.2.x no, for 2.3.x ask Linus not me + + +From torvalds@transmeta.com Thu Apr 13 09:18:16 2000 +Return-Path: +Delivered-To: andersen@dillweed.dsl.xmission.com +Received: from localhost (dillweed.dsl.xmission.com [10.0.0.1]) + by dillweed.dsl.xmission.com (Postfix) with ESMTP id 3776411A3DF + for ; Thu, 13 Apr 2000 09:18:16 -0600 (MDT) +Envelope-to: andersen@xmission.com +Received: from mail.xmission.com + by localhost with IMAP (fetchmail-5.3.3) + for andersen@dillweed.dsl.xmission.com (single-drop); Thu, 13 Apr 2000 09:18:16 -0600 (MDT) +Received: from [209.10.217.66] (helo=neon-gw.transmeta.com) + by mail.xmission.com with esmtp (Exim 3.03 #3) + id 12flK2-0004dd-00 + for andersen@xmission.com; Thu, 13 Apr 2000 09:14:22 -0600 +Received: (from root@localhost) + by neon-gw.transmeta.com (8.9.3/8.9.3) id IAA18635; + Thu, 13 Apr 2000 08:10:51 -0700 +Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) + id xma018629; Thu, 13 Apr 00 08:10:25 -0700 +Received: from penguin.transmeta.com (root@penguin.transmeta.com [10.1.2.202]) + by deepthought.transmeta.com (8.9.3/8.9.3) with ESMTP id IAA12264; + Thu, 13 Apr 2000 08:13:53 -0700 (PDT) +Received: from localhost (torvalds@localhost) by penguin.transmeta.com (8.9.3/8.7.3) with ESMTP id IAA02051; Thu, 13 Apr 2000 08:13:53 -0700 +X-Authentication-Warning: penguin.transmeta.com: torvalds owned process doing -bs +Date: Thu, 13 Apr 2000 08:13:53 -0700 (PDT) +From: Linus Torvalds +To: Erik Andersen +Cc: Alan Cox +Subject: Re: kernel ps drivers [Was: vm locking question] +In-Reply-To: <20000413083127.A976@xmission.com> +Message-ID: +MIME-Version: 1.0 +Content-Type: TEXT/PLAIN; charset=US-ASCII +Status: RO +Content-Length: 659 +Lines: 16 + + + +On Thu, 13 Apr 2000, Erik Andersen wrote: +> +> For 2.3.x would you be willing to accept my /dev/ps driver into the kernel? +> (Assuming I remove the /dev/modules driver (since it was pointed out that there +> is a perfectly good syscall providing that interface). If no, is there anything +> that could be done differently (if anything) to make it worthy of inclusion? + +I do dislike /dev/ps mightily. If the problem is that /proc is too large, +then the right solution is to just clean up /proc. Which is getting done. +And yes, /proc will be larger than /dev/ps, but I still find that +preferable to having two incompatible ways to do the same thing. + + Linus + + -- cgit v1.1