public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* MS_SILENT vs. vfat and hfs
@ 2011-03-02 11:45 Karel Zak
  2011-03-02 14:14 ` OGAWA Hirofumi
  0 siblings, 1 reply; 6+ messages in thread
From: Karel Zak @ 2011-03-02 11:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: t.artem, OGAWA Hirofumi, Roman Zippel


 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

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MS_SILENT vs. vfat and hfs
  2011-03-02 11:45 MS_SILENT vs. vfat and hfs Karel Zak
@ 2011-03-02 14:14 ` OGAWA Hirofumi
  2011-03-02 14:43   ` Karel Zak
  0 siblings, 1 reply; 6+ messages in thread
From: OGAWA Hirofumi @ 2011-03-02 14:14 UTC (permalink / raw)
  To: Karel Zak; +Cc: linux-kernel, t.artem, Roman Zippel

Karel Zak <kzak@redhat.com> writes:

>  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.

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.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MS_SILENT vs. vfat and hfs
  2011-03-02 14:14 ` OGAWA Hirofumi
@ 2011-03-02 14:43   ` Karel Zak
  2011-03-02 15:06     ` Karel Zak
  2011-03-02 15:13     ` OGAWA Hirofumi
  0 siblings, 2 replies; 6+ messages in thread
From: Karel Zak @ 2011-03-02 14:43 UTC (permalink / raw)
  To: OGAWA Hirofumi; +Cc: linux-kernel, t.artem, Roman Zippel

On Wed, Mar 02, 2011 at 11:14:28PM +0900, OGAWA Hirofumi wrote:
> Karel Zak <kzak@redhat.com> writes:
> 
> >  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.
> 
> 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.

 I know, but I don't care which option is newer. I'd like to found a
 solution with minimal impact to users.

> 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.

 Then all people who use "quiet" in their fstab will see problems...

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MS_SILENT vs. vfat and hfs
  2011-03-02 14:43   ` Karel Zak
@ 2011-03-02 15:06     ` Karel Zak
  2011-03-02 15:16       ` OGAWA Hirofumi
  2011-03-02 15:13     ` OGAWA Hirofumi
  1 sibling, 1 reply; 6+ messages in thread
From: Karel Zak @ 2011-03-02 15:06 UTC (permalink / raw)
  To: OGAWA Hirofumi; +Cc: linux-kernel, t.artem, Roman Zippel

On Wed, Mar 02, 2011 at 03:43:03PM +0100, Karel Zak wrote:
> On Wed, Mar 02, 2011 at 11:14:28PM +0900, OGAWA Hirofumi wrote:
> > Karel Zak <kzak@redhat.com> writes:
> > 
> > >  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.
> > 
> > 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.
> 
>  I know, but I don't care which option is newer. I'd like to found a
>  solution with minimal impact to users.
> 
> > 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.
> 
>  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

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MS_SILENT vs. vfat and hfs
  2011-03-02 14:43   ` Karel Zak
  2011-03-02 15:06     ` Karel Zak
@ 2011-03-02 15:13     ` OGAWA Hirofumi
  1 sibling, 0 replies; 6+ messages in thread
From: OGAWA Hirofumi @ 2011-03-02 15:13 UTC (permalink / raw)
  To: Karel Zak; +Cc: linux-kernel, t.artem, Roman Zippel

Karel Zak <kzak@redhat.com> writes:

> On Wed, Mar 02, 2011 at 11:14:28PM +0900, OGAWA Hirofumi wrote:
>> Karel Zak <kzak@redhat.com> writes:
>> 
>> >  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.
>> 
>> 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.
>
>  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.

>> 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.
>
>  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.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MS_SILENT vs. vfat and hfs
  2011-03-02 15:06     ` Karel Zak
@ 2011-03-02 15:16       ` OGAWA Hirofumi
  0 siblings, 0 replies; 6+ messages in thread
From: OGAWA Hirofumi @ 2011-03-02 15:16 UTC (permalink / raw)
  To: Karel Zak; +Cc: linux-kernel, t.artem, Roman Zippel

Karel Zak <kzak@redhat.com> writes:

>  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.

Sounds really good to me.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-02 15:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 11:45 MS_SILENT vs. vfat and hfs Karel Zak
2011-03-02 14:14 ` OGAWA Hirofumi
2011-03-02 14:43   ` Karel Zak
2011-03-02 15:06     ` Karel Zak
2011-03-02 15:16       ` OGAWA Hirofumi
2011-03-02 15:13     ` OGAWA Hirofumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox