2021-05-26 18:22:36

by Sean Nyekjaer

[permalink] [raw]
Subject: Squashfs on ubi blockdev

Hi,

After: 5a2be1288b514 ("vfs: Convert squashfs to use the new mount API")

We see this; when mounting a squashfs from a ubiblockdev:
root@iwg26-v2:/data/root# mount /dev/ubiblock0_6 /mnt

[ 39.884295] /dev/ubiblock0_6: Can't open blockdev

But the filesystem is mounted anyway...

I have tried checking the returned error code get_tree_bdev() -> blkdev_get_by_path() returns -EROFS.

I have also tried to see what happens in squashfs_get_tree() it will be re-run with the ro option set.
Which explains why the filesystem ends up mouted.
[ 39.889461] ####Custom debug: squashfs_get_tree -30


[ 39.906309] ####Custom debug: squashfs_get_tree 0


Fair enough it's after all a squashfs :)

But could the error message be better? Or just filter out the print when getting a EROFS?

Br,
/Sean