[PATCH 1/2] fs/super.c: introduce get_tree_bdev_by_dev()

Christoph Hellwig hch at infradead.org
Tue Oct 8 22:49:35 AEDT 2024


On Tue, Oct 08, 2024 at 05:56:05PM +0800, Gao Xiang wrote:
> As Allison reported [1], currently get_tree_bdev() will store
> "Can't lookup blockdev" error message.  Although it makes sense for
> pure bdev-based fses, this message may mislead users who try to use
> EROFS file-backed mounts since get_tree_nodev() is used as a fallback
> then.
> 
> Add get_tree_bdev_by_dev() to specify a device number explicitly
> instead of the hardcoded fc->source as mentioned in [2], there are
> other benefits like:
>   - Filesystems can have other ways to get a bdev-based sb
>     in addition to the current hard-coded source path;
> 
>   - Pseudo-filesystems can utilize this method to generate a
>     filesystem from given device numbers too.
> 
>   - Like get_tree_nodev(), it doesn't strictly tie to fc->source
>     either.

Do you have concrete plans for any of those?  If so send pointers.
Otherwise just passing a quiet flag of some form feels like a much
saner interface.



More information about the Linux-erofs mailing list