On Mon, Feb 23, 2009 at 03:50:02PM +0000, Bryn M. Reeves wrote: > Joel Granados Moreno wrote: >> Hello List >> >> Here is the reviewed patch for the unneeded stats that we are doing when >> looking for mounted devices. It is modified to not search for "server >> strings" (//servername/path/to/somewhere) >> >> Review appreciated > > There's a slight gotcha with this approach in that the kernel will > honour the names that userspace gives it in a mount syscall. E.g. if I > mount /dev/sda then that's what appears in /proc/mounts but if I mount > //dev/sda, then that's the string that will appear. > > E.g.: > > # mount //dev/mapper/cyan /mnt > # grep cyan /proc/mounts > //dev/mapper/cyan /mnt ext3 rw,data=ordered 0 0
I tested for this situation in my fedora10 environment With the latest parted. And if I do the mount with "//" /proc/mounts will show it with just one. This comment does make me doubt a little of the patch. The question here is, will kernel always have this behavior for now on? regards FYI: """ [r...@parted parted]# uname -a Linux parted 2.6.27.12-170.2.5.fc10.x86_64 #1 SMP Wed Jan 21 01:33:24 EST 2009 x86_64 x86_64 x86_64 GNU/Linux """ > > Which kinda breaks this heuristic. Technically although this is an odd > way to reference the device it's not incorrect so I think our parsing of > mount lists has to take it into account. > > Regards, > Bryn. > -- Joel Andres Granados Brno, Czech Republic, Red Hat. _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

