Olivier Daudel wrote:
Hi Dave,
This patch try to support namespaces.
The following sample use two processes having different namespaces.
For example, /sys and /dev/shm are presents in one namespace and not in
the other.
Olivier.crash> mount -n 1
VFSMOUNT SUPERBLK TYPE DEVNAME DIRNAME
f7eab780 f7eaf200 rootfs rootfs / f7eabf00 f784d800
tmpfs /dev /dev f7eab080 f7ce5600 ext3 /dev/root
/ f7eabf80 f7ea3c00 proc /proc /proc
f7eab100 f7a7ae00 usbfs /proc/bus/usb /proc/bus/usb
f7eab880 f7eaf400 sysfs /sys /sys f7eab980 f7d72200
devpts /dev/devpts /dev/pts f7eaba80 f7af5c00 tmpfs /dev/shm
/dev/shm f7eabb00 f7029400 ext3 /dev/sda3
/mnt/sda3 f7eabb80 f7209a00 binfmt_misc none
/proc/sys/fs/binfmt_misc
f7eabd80 f7af6c00 rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs
f7eabc00 f6de5400 autofs automount(pid2367) /net f6e44780 c1f63000
autofs automount(pid2357) /misc f6e44200 f6c4d800 nfsd nfsd
/proc/fs/nfsd
crash> mount -n 3287
VFSMOUNT SUPERBLK TYPE DEVNAME DIRNAME
f6e44180 f7eaf200 rootfs rootfs / f6e44700 f7ce5600
ext3 /dev/root / f6e44680 f784d800 tmpfs /dev
/dev f6e44600 f7d72200 devpts /dev/devpts /dev/pts
f6e44580 f7ea3c00 proc /proc /proc f6e44500
f7a7ae00 usbfs /proc/bus/usb /proc/bus/usb
f6e44480 f7209a00 binfmt_misc none /proc/sys/fs/binfmt_misc
f6e44300 f7029400 ext3 /dev/sda3 /mnt/sda3 f6e44280 f7af6c00
rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs
f7eaba00 f6de5400 autofs automount(pid2367) /net f7eabe00 c1f63000
autofs automount(pid2357) /misc----------------------------------------------------------------
Ce message a ete envoye par IMP, grace a l'Universite Paris 10 Nanterre
Again your mailer is mangling your output...
Anyway, what your patch would show is this:
crash> mount -n 1
VFSMOUNT SUPERBLK TYPE DEVNAME
DIRNAME
f7eab780 f7eaf200 rootfs rootfs
/
f7eabf00 f784d800 tmpfs /dev
/dev
f7eab080 f7ce5600 ext3 /dev/root
/
f7eabf80 f7ea3c00 proc /proc
/proc
f7eab100 f7a7ae00 usbfs /proc/bus/usb
/proc/bus/usb
f7eab880 f7eaf400 sysfs /sys
/sys
f7eab980 f7d72200 devpts /dev/devpts
/dev/pts
f7eaba80 f7af5c00 tmpfs /dev/shm
/dev/shm
f7eabb00 f7029400 ext3 /dev/sda3
/mnt/sda3
f7eabb80 f7209a00 binfmt_misc none
/proc/sys/fs/binfmt_misc
f7eabd80 f7af6c00 rpc_pipefs sunrpc
/var/lib/nfs/rpc_pipefs
f7eabc00 f6de5400 autofs automount(pid2367) /net
f6e44780 c1f63000 autofs automount(pid2357) /misc
f6e44200 f6c4d800 nfsd nfsd
/proc/fs/nfsd
crash> mount -n 3287
VFSMOUNT SUPERBLK TYPE DEVNAME
DIRNAME
f6e44180 f7eaf200 rootfs rootfs
/
f6e44700 f7ce5600 ext3 /dev/root
/
f6e44680 f784d800 tmpfs /dev
/dev
f6e44600 f7d72200 devpts /dev/devpts
/dev/pts
f6e44580 f7ea3c00 proc /proc
/proc
f6e44500 f7a7ae00 usbfs /proc/bus/usb
/proc/bus/usb
f6e44480 f7209a00 binfmt_misc none
/proc/sys/fs/binfmt_misc
f6e44300 f7029400 ext3 /dev/sda3
/mnt/sda3
f6e44280 f7af6c00 rpc_pipefs sunrpc
/var/lib/nfs/rpc_pipefs
f7eaba00 f6de5400 autofs automount(pid2367) /net
f7eabe00 c1f63000 autofs automount(pid2357) /misc
crash>
...and would default to pid 1's namespace if no -n [pid]
was entered (as it does now).
Anyway, the patch looks OK upon first glance. I'll test
it out to make sure it doesn't break anything, and if
OK, I'll queue it for the next release.
Thanks,
Dave