Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-07-11 Thread Ram Pai
On Wed, 2007-07-11 at 11:24 +0100, Christoph Hellwig wrote:
> On Sat, Jun 30, 2007 at 08:56:02AM -0400, H. Peter Anvin wrote:
> > Is that conjecture, or do you have evidence to that effect?  Most users 
> > of this file are using it via the glibc interfaces, and there probably 
> > aren't all that many users of it in the first place.
> 
> I have written parsers for personal projects that might not have been
> happy to deal with additional fields myself for example..

I modified the patch to add fields towards the end of each line.
i.e after 'freq, passno' fields. And symlinked /etc/mtab
to /proc/mounts.
mount,df  and friends were all perfectly happy.  

I imagine your script may also be happy with the additional fields
**towards the end**. I would like to avoid one more mount interface if
we can help it.

RP



-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-07-11 Thread Christoph Hellwig
On Sat, Jun 30, 2007 at 08:56:02AM -0400, H. Peter Anvin wrote:
> Is that conjecture, or do you have evidence to that effect?  Most users 
> of this file are using it via the glibc interfaces, and there probably 
> aren't all that many users of it in the first place.

I have written parsers for personal projects that might not have been
happy to deal with additional fields myself for example..

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-06-30 Thread H. Peter Anvin

Christoph Hellwig wrote:


The following additional fields are appended to each record
in /proc/mounts


NACK.  Adding anything to the format will confuse the hell out of
existing parsers.  We really want something like your /proc//mounts_new,
except mounts_new should have a better name (/proc//ns anyone? :))



Is that conjecture, or do you have evidence to that effect?  Most users 
of this file are using it via the glibc interfaces, and there probably 
aren't all that many users of it in the first place.


This was debated in some detail earlier in this thread.

(Note: this patch is still wrong, since it appends the new fields in the 
wrong place.)


-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-06-30 Thread Christoph Hellwig
On Mon, Jun 25, 2007 at 03:00:15PM -0700, Ram Pai wrote:
> Please check if the following modified patch meets the requirements.
> 
> It augments /proc/mount with additional information to
>   (1) disambiguate bind mounts with subroot information.
>   (2) display shared-subtree information using which one can
>   determine the propagation trees.
> 
> 
> The following additional fields are appended to each record
> in /proc/mounts

NACK.  Adding anything to the format will confuse the hell out of
existing parsers.  We really want something like your /proc//mounts_new,
except mounts_new should have a better name (/proc//ns anyone? :))

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-06-26 Thread H. Peter Anvin

Karel Zak wrote:


 (BTW, maybe we can completely remove "freq, passno" from
 /proc/mounts, especially if we don't have care about compatibility
 with /etc/{mtab,fstab} format. The freq and passno are always zero in
 /proc/mounts).



But we do, since there are applications which use getmntent() and 
friends to parse /proc/mounts.


-hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-06-26 Thread Karel Zak
On Mon, Jun 25, 2007 at 03:00:15PM -0700, Ram Pai wrote:
> Please check if the following modified patch meets the requirements.
> 
> It augments /proc/mount with additional information to
>   (1) disambiguate bind mounts with subroot information.
>   (2) display shared-subtree information using which one can
>   determine the propagation trees.
> 
> 
> The following additional fields are appended to each record
> in /proc/mounts

 Can you append the new fields at real end of records? Now you have
 the new fields between "options" and "freq, passno".

 (BTW, maybe we can completely remove "freq, passno" from
 /proc/mounts, especially if we don't have care about compatibility
 with /etc/{mtab,fstab} format. The freq and passno are always zero in
 /proc/mounts).

> mntid=id->  The unique id associated with that mount.
> fsid=id:dir ->  The filesystem's id and directory in that filesystem
> that
>   makes the root directory of this mount.
> parent=id   ->  The id of the mount's parent; on which it is mounted.

 Do we really need a "=" (mntid=, fsid=, parent=) prefixes? I
 think your new fields are always in the same column (on same
 position).

> also flags are augmented with new information to indicate the mount's 
> propagation type.
> 
> Here is a sample 'cat /proc/mounts' after executing the following
> commands:
> mount --bind /mnt /mnt
> mount --make-shared /mnt
> mount --bind /mnt/1 /var
> mount --make-slave /var
> mount --make-shared /mnt
> mount --make-unbindable /proc
> 
> rootfs / rootfs rw PRIVATE mntid=c1708c30 fsid=1:/ parent=c1708c30 0 0
> /dev/root / ext2 rw  PRIVATE mntid=c1208c08 fsid=6200:/ parent=c1708c30
> 0 0
> /proc /proc proc rw UNBINDABLE mntid=c1108c90 fsid=3:/ parent=c1208c08 0
> 0
> devpts /dev/pts devpts rw PRIVATE mntid=c1108c18 fsid=a:/
> parent=c1208c08 0 0
> /dev/root /mnt ext2 rw  SHARED:peer=c1e08cb0 mntid=c1e08cb0
> fsid=6200:/mnt parent=c1208c08 0 0
> /dev/root /var ext2 rw  SHARED:peer=c1f08c28 SLAVE:master=c1e08cb0
> mntid=c1f08c28 fsid=6200:/mnt/1 parent=c1208c08 0 0

 You needn't "peer" or "master" keywords and it would be nice
 to use one column for all propagation flags (separated by comma).

[:id>][,...]

 for example:

   SHARED:c1f08c28,SLAVE:c1e08cb0

 Full example:

   \
  

 rootfs / rootfs rw  0 0 PRIVATE c1708c30 1:/ c1708c30
 /dev/root / ext2 rw 0 0 PRIVATE 1208c08 6200:/ c1708c30
 /proc /proc proc rw  0 0 UNBINDABLE c1108c90 3:/ c1208c08
 devpts /dev/pts devpts rw  0 0 PRIVATE c1108c18 a:/ c1208c08
 /dev/root /mnt ext2 rw 0 0 SHARED:c1e08cb0 c1e08cb0 6200:/mnt c1208c08
 /dev/root /var ext2 rw 0 0 SHARED:c1f08c28,SLAVE:c1e08cb0 c1f08c28 6200:/mnt/1 
c1208c08

Karel

-- 
 Karel Zak  <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html