From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Brown Subject: Re: [patch] VFS: extend /proc/mounts Date: Thu, 17 Jan 2008 11:33:09 +1100 Message-ID: <18318.41541.386224.301640@notabene.brown> References: <20080116143051.ec488f3d.akpm@linux-foundation.org> <20080116234339.GG26049@petra.dvoda.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Karel Zak , Andrew Morton , Miklos Szeredi , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linuxram-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org, viro-rfM+Q5joDG/XmaaqVzeoHQ@public.gmane.org, hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org To: Jan Engelhardt Return-path: In-Reply-To: message from Jan Engelhardt on Thursday January 17 Sender: util-linux-ng-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Thursday January 17, jengelh-bdq14YP6qtRlEiWPh9xO2Q@public.gmane.org wrote: > > On Jan 17 2008 00:43, Karel Zak wrote: > >> > >> Seems like a plain bad idea to me. There will be any number of home-made > >> /proc/mounts parsers and we don't know what they do. > > > > So, let's use /proc/mounts_v2 ;-) > > Was not it like "don't use /proc for new things"? I thought it was "don't use /proc for new things that aren't process related". And as the mount table is per process...... A host has a bunch of mounted filesystems (struct super_block), and each process has some subset of these stitched together into a mount tree (struct vfsmount / struct namespace). There needs to be something in /proc that exposes the vfsmount tree. Arguably there should be something else - maybe in sysfs - that provides access to the "struct superblock" object. And there needs to be a clear way to relate information from one with information from the other. In the tradition of stat, statm, status, maybe the former should be /proc/$PID/mountm :-) Hey, I just found /proc/X/mountstats. How does this fit in to the big picture? NeilBrown