Message ID | 20191004202921.21590-1-msys.mizuma@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | virtio_fs: Fix file_system_type.name to virtio_fs | expand |
On Fri, Oct 04, 2019 at 04:29:21PM -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> > > On 5.4.0-rc1 kernel, following warning happens when virtio_fs is tried > to mount as "virtio_fs". > > ------------[ cut here ]------------ > request_module fs-virtio_fs succeeded, but still no fs? > WARNING: CPU: 1 PID: 1234 at fs/filesystems.c:274 get_fs_type+0x12c/0x138 > Modules linked in: ... virtio_fs fuse virtio_net net_failover ... > CPU: 1 PID: 1234 Comm: mount Not tainted 5.4.0-rc1 #1 > > That's because the file_system_type.name is "virtiofs", but the > module name is "virtio_fs". > > Set the file_system_type.name to "virtio_fs". The mount command-line should be mount -t virtiofs, not mount -t virtio_fs. Existing documentation on https://virtio-fs.gitlab.io/ still says mount -t virtio_fs but this is outdated (sorry!). I will update the website and I don't think this patch needs to be merged. We originally set the file_system_type.name to "virtio_fs" but Miklos explained that other Linux file systems do not contain underscores in their names. The kernel module is called virtio_fs.ko and the code internally uses "virtio_fs" as the prefix for function names, but from a user point of the view the mount command-line must use "virtiofs". Does this sound reasonable? Stefan
Hi Stefan, On Fri, Oct 11, 2019 at 10:02:08AM +0100, Stefan Hajnoczi wrote: > On Fri, Oct 04, 2019 at 04:29:21PM -0400, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> > > > > On 5.4.0-rc1 kernel, following warning happens when virtio_fs is tried > > to mount as "virtio_fs". > > > > ------------[ cut here ]------------ > > request_module fs-virtio_fs succeeded, but still no fs? > > WARNING: CPU: 1 PID: 1234 at fs/filesystems.c:274 get_fs_type+0x12c/0x138 > > Modules linked in: ... virtio_fs fuse virtio_net net_failover ... > > CPU: 1 PID: 1234 Comm: mount Not tainted 5.4.0-rc1 #1 > > > > That's because the file_system_type.name is "virtiofs", but the > > module name is "virtio_fs". > > > > Set the file_system_type.name to "virtio_fs". > > The mount command-line should be mount -t virtiofs, not mount -t > virtio_fs. Existing documentation on https://virtio-fs.gitlab.io/ still > says mount -t virtio_fs but this is outdated (sorry!). I will update > the website and I don't think this patch needs to be merged. > > We originally set the file_system_type.name to "virtio_fs" but Miklos > explained that other Linux file systems do not contain underscores in > their names. The kernel module is called virtio_fs.ko and the code > internally uses "virtio_fs" as the prefix for function names, but from a > user point of the view the mount command-line must use "virtiofs". > > Does this sound reasonable? Yes, make sense to me, thanks! Do you have the plan to change the module name to virtiofs.ko? I suppose virtiofs.ko may be good enough to avoid the warning. Thanks! Masa
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 6af3f131e..f72803120 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -1158,7 +1158,7 @@ static int virtio_fs_init_fs_context(struct fs_context *fsc) static struct file_system_type virtio_fs_type = { .owner = THIS_MODULE, - .name = "virtiofs", + .name = "virtio_fs", .init_fs_context = virtio_fs_init_fs_context, .kill_sb = virtio_kill_sb, };