[PATCH v2] ubifs: respect MS_SILENT mount flag

hujianyang hujianyang at huawei.com
Tue May 27 19:11:00 PDT 2014

Hi Daniel and Artem,

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

I think disabling log message in this case is needed. But I'm sorry to say
I don't like just adding a new parameter to ubifs_read_node in this way
because this silent flag seems only used during mount. This adding makes the
parameters different in ubifs_read_node and ubifs_write_node, also not good
for reading code.

How about to add a separate func ubifs_read_node_silent to instead this
ubifs_read_node in ubifs_read_sb_node? I think we could do more proper work
in this new function.

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

Do you get some more error messages not only in ubifs_read_node during mount?
I think this is a good suggestion. Current code do not use @silent in
ubifs_fill_super and we should do some work to enable it like other filesystems.



More information about the linux-mtd mailing list