linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio_fs: Fix file_system_type.name to virtio_fs
@ 2019-10-04 20:29 Masayoshi Mizuma
  2019-10-11  9:02 ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Masayoshi Mizuma @ 2019-10-04 20:29 UTC (permalink / raw)
  To: Vivek Goyal, Stefan Hajnoczi, Miklos Szeredi
  Cc: Masayoshi Mizuma, Masayoshi Mizuma, linux-fsdevel

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

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
---
 fs/fuse/virtio_fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
 };
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtio_fs: Fix file_system_type.name to virtio_fs
  2019-10-04 20:29 [PATCH] virtio_fs: Fix file_system_type.name to virtio_fs Masayoshi Mizuma
@ 2019-10-11  9:02 ` Stefan Hajnoczi
  2019-10-11 13:44   ` Masayoshi Mizuma
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2019-10-11  9:02 UTC (permalink / raw)
  To: Masayoshi Mizuma
  Cc: Vivek Goyal, Miklos Szeredi, Masayoshi Mizuma, linux-fsdevel

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtio_fs: Fix file_system_type.name to virtio_fs
  2019-10-11  9:02 ` Stefan Hajnoczi
@ 2019-10-11 13:44   ` Masayoshi Mizuma
  0 siblings, 0 replies; 3+ messages in thread
From: Masayoshi Mizuma @ 2019-10-11 13:44 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Vivek Goyal, Miklos Szeredi, Masayoshi Mizuma, linux-fsdevel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-11 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-04 20:29 [PATCH] virtio_fs: Fix file_system_type.name to virtio_fs Masayoshi Mizuma
2019-10-11  9:02 ` Stefan Hajnoczi
2019-10-11 13:44   ` Masayoshi Mizuma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).