MS_SILENT vs. vfat and hfs
The mount(8) command uses "quiet" mount option as a synonym to the MS_SILENT mount flag (since util-linux 2.7, Aug 1997).
It means than on systems where is properly defined the MS_SILENT mount flags in headers is the "quiet" mount option always translated to the MS_SILENT mount flags and "quiet" string is never send to FS drivers.
$ strace -e mount mount -o quiet /dev/sdb1 /mnt/test
mount("/dev/sdb1", "/mnt/test", "vfat", MS_MGC_VAL|MS_SILENT, NULL) = 0
^^^^^^^^^Unfortunately,
$ grep -r \"quiet\" *
fat/inode.c: {Opt_quiet, "quiet"},
hfs/super.c: { opt_quiet, "quiet" },
vfat and hfs drivers use "quiet" as a mount option. That's bug.
There should not be a collision between mount(8) mount options and filesystem specific mount options.
My suggestion is to fix the fat and hfs code to use something other than "quiet" (shutup, noisless, ...). I think you don't have to care about backward compatibility, because it's probably broken for years.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 19 lines · Karel Zak
The mount(8) command uses "quiet" mount option as a synonym to the
MS_SILENTmount flag (since util-linux 2.7, Aug 1997).It means than on systems where is properly defined the
MS_SILENTmount flags in headers is the "quiet" mount option always translated to theMS_SILENTmount flags and "quiet" string is never send to FS drivers.$ strace -e mount mount -o quiet /dev/sdb1 /mnt/test mount("/dev/sdb1", "/mnt/test", "vfat", MS_MGC_VAL|MS_SILENT, NULL) = 0 ^^^^^^^^^Unfortunately,
$ grep -r \"quiet\" *fat/inode.c: {Opt_quiet, "quiet"}, hfs/super.c: { opt_quiet, "quiet" },
Quoted 8 lines
vfat and hfs drivers use "quiet" as a mount option. That's bug.
There should not be a collision between mount(8) mount options and filesystem specific mount options.
My suggestion is to fix the fat and hfs code to use something other than "quiet" (shutup, noisless, ...). I think you don't have to care about backward compatibility, because it's probably broken for years.
No. Actually the _new_ option is MS_SILENT. In history, there was no MS_SILENT (it was called MS_VERBOSE) in kernel, then _added_ newly, and never be enabled MS_SILENT in mount command until that.
So, my suggestion is use "silent" (or something) as MS_SILENT for backward compatibility. Because the "quiet" is already hardcoded by some userland apps for vfat.
Thanks.
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Quoted 26 lines · OGAWA Hirofumi
Quoted 24 lines · Karel Zak
The mount(8) command uses "quiet" mount option as a synonym to the
MS_SILENTmount flag (since util-linux 2.7, Aug 1997).It means than on systems where is properly defined the
MS_SILENTmount flags in headers is the "quiet" mount option always translated to theMS_SILENTmount flags and "quiet" string is never send to FS drivers.$ strace -e mount mount -o quiet /dev/sdb1 /mnt/test mount("/dev/sdb1", "/mnt/test", "vfat", MS_MGC_VAL|MS_SILENT, NULL) = 0 ^^^^^^^^^Unfortunately,
$ grep -r \"quiet\" *fat/inode.c: {Opt_quiet, "quiet"}, hfs/super.c: { opt_quiet, "quiet" },vfat and hfs drivers use "quiet" as a mount option. That's bug.
There should not be a collision between mount(8) mount options and filesystem specific mount options.
Quoted 7 lines
Quoted 3 lines
My suggestion is to fix the fat and hfs code to use something other than "quiet" (shutup, noisless, ...). I think you don't have to care about backward compatibility, because it's probably broken for years.
No. Actually the _new_ option is
MS_SILENT. In history, there was noMS_SILENT(it was calledMS_VERBOSE) in kernel, then _added_ newly, and never be enabledMS_SILENTin mount command until that.
I know, but I don't care which option is newer. I'd like to found a solution with minimal impact to users.
Quoted 3 lines
So, my suggestion is use "silent" (or something) as
MS_SILENTfor backward compatibility. Because the "quiet" is already hardcoded by some userland apps for vfat.
Then all people who use "quiet" in their fstab will see problems...
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 35 lines · Karel Zak
Quoted 26 lines · OGAWA Hirofumi
Quoted 24 lines · Karel Zak
The mount(8) command uses "quiet" mount option as a synonym to the
MS_SILENTmount flag (since util-linux 2.7, Aug 1997).It means than on systems where is properly defined the
MS_SILENTmount flags in headers is the "quiet" mount option always translated to theMS_SILENTmount flags and "quiet" string is never send to FS drivers.$ strace -e mount mount -o quiet /dev/sdb1 /mnt/test mount("/dev/sdb1", "/mnt/test", "vfat", MS_MGC_VAL|MS_SILENT, NULL) = 0 ^^^^^^^^^Unfortunately,
$ grep -r \"quiet\" *fat/inode.c: {Opt_quiet, "quiet"}, hfs/super.c: { opt_quiet, "quiet" },vfat and hfs drivers use "quiet" as a mount option. That's bug.
There should not be a collision between mount(8) mount options and filesystem specific mount options.
Quoted 7 lines
Quoted 3 lines
My suggestion is to fix the fat and hfs code to use something other than "quiet" (shutup, noisless, ...). I think you don't have to care about backward compatibility, because it's probably broken for years.
No. Actually the _new_ option is
MS_SILENT. In history, there was noMS_SILENT(it was calledMS_VERBOSE) in kernel, then _added_ newly, and never be enabledMS_SILENTin mount command until that.
Quoted 8 lines
I know, but I don't care which option is newer. I'd like to found a solution with minimal impact to users.
Quoted 3 lines
So, my suggestion is use "silent" (or something) as
MS_SILENTfor backward compatibility. Because the "quiet" is already hardcoded by some userland apps for vfat.Then all people who use "quiet" in their fstab will see problems...
I'll probably add an exception for vfat and hfs to mount(8), "silent" as MS_SILENT and mark "quiet" as deprecated for non-fat filesystems.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 2 lines · Karel Zak
I'll probably add an exception for vfat and hfs to mount(8), "silent" as
MS_SILENTand mark "quiet" as deprecated for non-fat filesystems.
Sounds really good to me.
Thanks.
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Quoted 31 lines · Karel Zak
Quoted 30 lines · OGAWA Hirofumi
Quoted 27 lines · Karel Zak
The mount(8) command uses "quiet" mount option as a synonym to the
MS_SILENTmount flag (since util-linux 2.7, Aug 1997).It means than on systems where is properly defined the
MS_SILENTmount flags in headers is the "quiet" mount option always translated to theMS_SILENTmount flags and "quiet" string is never send to FS drivers.$ strace -e mount mount -o quiet /dev/sdb1 /mnt/test mount("/dev/sdb1", "/mnt/test", "vfat", MS_MGC_VAL|MS_SILENT, NULL) = 0 ^^^^^^^^^Unfortunately,
$ grep -r \"quiet\" *fat/inode.c: {Opt_quiet, "quiet"}, hfs/super.c: { opt_quiet, "quiet" },vfat and hfs drivers use "quiet" as a mount option. That's bug.
There should not be a collision between mount(8) mount options and filesystem specific mount options.
My suggestion is to fix the fat and hfs code to use something other than "quiet" (shutup, noisless, ...). I think you don't have to care about backward compatibility, because it's probably broken for years.
Quoted 6 lines
Quoted 3 lines
No. Actually the _new_ option is
MS_SILENT. In history, there was noMS_SILENT(it was calledMS_VERBOSE) in kernel, then _added_ newly, and never be enabledMS_SILENTin mount command until that.I know, but I don't care which option is newer. I'd like to found a solution with minimal impact to users.
Sounds good.
Quoted 5 lines
Quoted 3 lines
So, my suggestion is use "silent" (or something) as
MS_SILENTfor backward compatibility. Because the "quiet" is already hardcoded by some userland apps for vfat.Then all people who use "quiet" in their fstab will see problems...
I don't know how to know the minimal impact though. I'll bet to change MS_SILENT, because at least the mount command in debian/testing doesn't provide "quiet" as MS_SILENT.
Thanks.
Signature · 1 line
OGAWA Hirofumi <[email protected]>