Skip to contentSkip to conversation

virtio_fs: Fix file_system_type.name to virtio_fs

PATCH In review Masayoshi Mizuma 2 participants 3 messages Oct 4, 2019 – Oct 11, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_fs: Fix file_system_type.name to virtio_fs

From: Masayoshi Mizuma <[email protected]>

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

---
 fs/fuse/virtio_fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/virtio_fs.c +1 -1
index 6af3f131e..f72803120 100644
@@ -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,
 };
Signature · 1 line
2.18.1
maintainer
#1 lore raw
Quoted 11 lines · Masayoshi Mizuma

From: Masayoshi Mizuma <[email protected]>

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
Quoted 4 lines

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

#2 lore raw

Hi Stefan,

Quoted 22 lines · Stefan Hajnoczi
Quoted 11 lines · Masayoshi Mizuma

From: Masayoshi Mizuma <[email protected]>

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
Quoted 4 lines

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.

Quoted 7 lines

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