[PATCH v2] ubifs: respect MS_SILENT mount flag

Daniel daniel at makrotopia.org
Tue May 27 09:04:02 PDT 2014

On 05/27/2014 04:56 PM, Artem Bityutskiy wrote:
> On Tue, 2014-05-27 at 16:11 +0200, Daniel Golle wrote:
>> When attempting to mount a non-ubifs formatted volume, lots of error
>> messages (including a stack dump) are thrown to the kernel log even if
>> the MS_SILENT mount flag is set.
>> Fix this by introducing an additional parameter in ubifs_read_node and
>> use it to pass down the MS_SILENT flag in ubifs_read_sb_node.
>> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> Thanks. How did you test this patch?

You can test this by trying to mount a non-empty volume which does not contain a
UBIFS superblock (but e.g. squashfs or a U-Boot environment) with
mount -t ubifs -o silent /dev/ubiX_Y /mnt
This should fail without creating any klog lines.

The reason that I want this is that I'm working on integration of UBI support in
OpenWrt, including auto-mounting the "rootfs" volume by default (if it exists)
in case the rootfs and/or rootfstype parameters are not passed-down by the
bootloader, see

The idea is to have the same level of features and comfort also on devices where
UBI is being used, for MTD devices OpenWrt does something similar

However, this is probably distribution-specific hackery, but independently of
that, UBIFS should still respect the MS_SILENT flag just like all other
filesystems do.

More information about the linux-mtd mailing list