Messages in this thread | | | Subject | Re: per BDI dirty limit (was Re: -mm merge plans for 2.6.24) | From | Peter Zijlstra <> | Date | Fri, 14 Dec 2007 16:54:26 +0100 |
| |
On Fri, 2007-12-14 at 16:14 +0100, Miklos Szeredi wrote: > > Neil suggested using device numbers which would work, however I think > > those might not be human friendly. While its easy to find the device > > number of a given path (eg.: stat -c %d /), its rather hard to find the > > path belonging to a given device number. > > Ram Pai had a patch which added the device number (among other things) > to /proc/mounts: > > > > Subject: [RFC2 PATCH 1/1] VFS: Augment /proc/mount with subroot and > shared-subtree > From: Ram Pai <linuxram@us.ibm.com> > To: "H. Peter Anvin" <hpa@zytor.com> > Cc: Al Viro <viro@ftp.linux.org.uk>, > Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, > linux-fsdevel@vger.kernel.org, util-linux-ng@vger.kernel.org > In-Reply-To: <20070625214640.GC29058@ram.us.ibm.com> > Content-Type: text/plain > Date: Mon, 16 Jul 2007 11:46:48 -0700 > Content-Transfer-Encoding: 7bit > Sender: linux-fsdevel-owner@vger.kernel.org > X-Mailing-List: linux-fsdevel@vger.kernel.org > > /proc/mounts in its current state fail to disambiguate bind mounts, especially > when the bind mount is subrooted. Also it does not capture propagation state of > the mounts(shared-subtree). The following patch addresses the problem. > > The following additional fields to /proc/mounts are added. > > propagation-type in the form of <propagation_flag>[:<mntid>][,...] > note: 'shared' flag is followed by the mntid of its peer mount > 'slave' flag is followed by the mntid of its master mount > 'private' flag stands by itself > 'unbindable' flag stands by itself > > mntid -- is a unique identifier of the mount > major:minor -- is the major minor number of the device hosting the filesystem > dir -- the subdir in the filesystem which forms the root of this mount > parent -- the id of the parent mount > > > Here is a sample cat /proc/mounts after execution the following commands: > > mount --bind /mnt /mnt > mount --make-shared /mnt > mount --bind /mnt/1 /var > mount --make-slave /var > mount --make-shared /var > mount --bind /var/abc /tmp > mount --make-unbindable /proc > > rootfs / rootfs rw 0 0 private 2 0:1 / 2 > /dev/root / ext2 rw 0 0 private 16 98:0 / 2 > /proc /proc proc rw 0 0 unbindable 17 0:3 / 16 > devpts /dev/pts devpts rw 0 0 private 18 0:10 / 16 > /dev/root /mnt ext2 rw 0 0 shared:19 19 98:0 /mnt 16 > /dev/root /var ext2 rw 0 0 shared:21,slave:19 20 98:0 /mnt/1 16 > /dev/root /tmp ext2 rw 0 0 shared:20,slave:19 21 98:0 /mnt/1/abc 16 > > For example, the last line indicates that : > > 1) The mount is a shared mount. > 2) Its peer mount of mount with id 20 > 3) It is also a slave mount of the master-mount with the id 19 > 4) The filesystem on device with major/minor number 98:0 and subdirectory > mnt/1/abc makes the root directory of this mount. > 5) And finally the mount with id 16 is its parent. > > > Testing: symlinked /etc/mtab to /proc/mounts and did some mount and df commands. They worked normally. > > > > Signed-off-by: Ram Pai <linuxram@us.ibm.com>
OK, I guess that would work.
Ram Pai, what is the current status of that work?
| |