FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 06-15-2010, 01:07 AM
 
Default Bug#585944: /proc/mounts ambiguity in output for same disk mounted more than once

Package: linux-2.6
Version: 2.6.32-15
Severity: minor

For the same disk mounted more than once, it is impossible to tell the
actual options in effect.

$ cat script
{ cat /proc/mounts;mount;}|perl -nwle '
next unless /sdb/;
print STDERR;
tr/()//d;
next unless /S+execS+/;
$_=$&;tr/,/
/;print;'|sort|uniq -c|sort -n

$ sh script
/dev/sdb1 /media/usb0 vfat rw,sync,nosuid,nodev,noexec,noatime,nodiratime,uid =1000,gid=1000,fmask=0133,dmask=0022,codepage=cp43 7,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
/dev/sdb1 /mnt/usb/cf vfat rw,sync,nosuid,nodev,noexec,noatime,uid=1000,gid=1 000,fmask=0133,dmask=0022,codepage=cp437,iocharset =ascii,shortname=mixed,errors=remount-ro 0 0
/dev/sdb1 on /media/usb0 type vfat (rw,noexec,nosuid,nodev,sync,noatime,nodiratime,sh ortname=mixed,fmask=133,uid=1000,gid=1000,iocharse t=ascii)
/dev/sdb1 on /mnt/usb/cf type vfat (rw,noexec,nosuid,nodev,noatime,iocharset=ascii,sh ortname=mixed,fmask=133,uid=1000,gid=1000)
2 codepage=cp437
2 dmask=0022
2 errors=remount-ro
2 fmask=0133
2 fmask=133
2 nodiratime
3 sync
4 gid=1000
4 iocharset=ascii
4 noatime
4 nodev
4 noexec
4 nosuid
4 rw
4 shortname=mixed
4 uid=1000

One sees that some conflicting options are blocked,
# mount -o ro /dev/sdb1 /mnt/usb/extra/
mount: /dev/sdb1 already mounted or /mnt/usb/extra/ busy
mount: according to mtab, /dev/sdb1 is mounted on /media/usb0
# mount -o rw /dev/sdb1 /mnt/usb/extra/
# umount /mnt/usb/extra/

but some get through,
# mount -o async /dev/sdb1 /mnt/usb/extra/
# umount /mnt/usb/extra/
# mount -o sync /dev/sdb1 /mnt/usb/extra/
#

and end up in /proc/mounts as double ambiguous entries.

And thus here e.g., one cannot tell if sync is in effect, or the
default async is really the one in effect.

Or it may seem to the user that different options apply according to
with path a user uses when writing!



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87631lrtm9.fsf@jidanni.org">http://lists.debian.org/87631lrtm9.fsf@jidanni.org
 
Old 06-16-2010, 02:42 AM
Ben Hutchings
 
Default Bug#585944: /proc/mounts ambiguity in output for same disk mounted more than once

On Tue, 2010-06-15 at 09:07 +0800, jidanni@jidanni.org wrote:
> Package: linux-2.6
> Version: 2.6.32-15
> Severity: minor
>
> For the same disk mounted more than once, it is impossible to tell the
> actual options in effect.
[...]
> Or it may seem to the user that different options apply according to
> with path a user uses when writing!

That is actually true for these options:

- nosuid/suid
- nodev/dev
- noexec/exec
- noatime/relatime/strictatime
- nodiratime/diratime

The remaining differences you see are a bug in mount, not the kernel. I
will reassign this accordingly.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 

Thread Tools




All times are GMT. The time now is 05:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org