Re: umount chokes on devices with '-' in the name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/12/2011 02:53 PM, Karel Zak wrote:
>  Not true,
> 
>   $ cat /proc/mounts | grep mapper                                       
>   /dev/mapper/kzak-home /home/kzak ext4 rw,noatime,barrier=1,data=ordered 0 0

I had gotten used to seeing the /dev/dm-N name in /proc/mounts in the
past and I may have just assumed it was normal.  Now I see that other dm
mounts do use the /dev/mapper/ name as you say, but the ntfs-3g mount
also shows up as /dev/dm-7 in /proc/mounts.

I thought that the kernel used to just find the dev_t in the superblock
and print the canonical name of that device as generated from the
major/minor number, but it seems it now remembers the name that was
passed to mount(), which ntfs-3g must be passing the canonicalized name,
and shouldn't be.

>  It all seems like an extra unnecessary step, if you use everywhere
>  (including /proc/mounts) user-friendly /dev/mapper/<name> names then
>  you have to translate from dm-N very rarely.
>
>  Don't forget that mtab and /proc/mounts could be really large
>  files. Our goal is minimize number of situation where we have to
>  translate any path.
> 
>  Anyway, I'm not sure what issue you're trying to resolve. The
>  mount(8) and umount(8) have to be able to work with both versions of
>  the name. The problem in umount(8) was fixed. Problem resolved.

You're right; sticking with the friendly name is better, as long as you
can still umount with the unfriendly name as well, which it appears you
can with your patch.  Nice work.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2lFj4ACgkQJ4UciIs+XuKm2ACfTFTR3VoBsRiE3wpD5nkZvDDY
aAAAniqpxpBAZl1Itusan8a2o9kyWHZQ
=Zfzs
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux