Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 216305 - Linux >= 2.6.22 and filesystem subtypes
Summary: Linux >= 2.6.22 and filesystem subtypes
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-05 10:32 UTC by Henning Schild
Modified: 2022-02-06 20:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/proc/mounts example (mounts,1.12 KB, text/plain)
2008-04-15 08:08 UTC, Henning Schild
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Schild 2008-04-05 10:32:36 UTC
The Linux kernel 2.6.22 introduced filesystem subtypes which are currently only used by fuse. The name of a subtyped filesystem shown in /proc/mounts, 'mount', or /etc/mtab will be "type.subtype" (i.e. "fuse.sshfs").

This new naming scheme breaks the current implementation since is_net_fs wont match "fuse.sshfs" or any other netfs implemented with fuse. Also "netmount stop" wont umount any netfs implemented with fuse. And maybe there are other scripts using NET_FS_LIST which dont work correctly if one has a kernel >= 2.6.22.

But the new naming scheme enables the init-system to distinguish "fuse.{no_net_fs}" from "fuse.{net_fs}".

So the new scheme breaks all current implementations of baselayout-1. I had a quick look at openrc and it seems that it also does not handle that new fstypes.

One fix could be to add all "fuse.{net_fs}" to NET_FS_LIST, if anyone can come up with a complete list and the exact subtype names.
Another quick fix could be to match only the type (everything before the dot) whenever using NET_FS_LIST.

The second approach is not very nice since any fuse implemantation would be detected as network fs, while the first might produce a long unmaintainable list.

Maybe a mechanism for ebuilds to extend NET_FS_LIST would be better.

Reproducible: Always

Steps to Reproduce:
1. mount sshfs on linux >= 2.6.22
2. /etc/init.d/netmount stop
3. mount
4. halt

Actual Results:  
3. your sshfs will still be mouted
4. the system will hang during shutdown

Expected Results:  
3. "fuse.sshfs" gets umounted by 2.
4. system cleanly shuts down
Comment 1 Henning Schild 2008-04-05 10:57:00 UTC
The subtype can be specified as an option when mounting. Using an empty subtype when mounting sshfs, the current baselayout umounts the remote filesystem corrently.

So before this bug is fixed mounting with "-o subtype=" is a solution.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2008-04-06 16:45:52 UTC
Roy, I'm assuming this is something you're going to want to look at in OpenRC.
Comment 3 Roy Marples 2008-04-06 18:15:08 UTC
Is this some kind of option, as my linux-2.6.23/24 systems don't have any subtype stuff AFAIK. Also, links to documentation about this would be nice.
Comment 4 Henning Schild 2008-04-06 22:11:23 UTC
I found it by looking at the linux source and now i looked up this for you:
http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg11698.html

It is no configuration option, but maybe old userland doesnt send subtype strings to the kernel.

I am using:
sys-fs/fuse-2.7.0
sys-fs/sshfs-fuse-1.9
kernel 2.6.24

In my case any sshfs mount will have the type "fuse.sshfs" unless i specify an empty subtype.
Comment 5 Roy Marples 2008-04-13 13:23:23 UTC
Could you attach output from `cat /proc/mounts` showing this please?
Comment 6 Henning Schild 2008-04-15 08:07:47 UTC
All 4 fuse mounts are sshfs, those of user2 are mounted with

"-o workaround=rename,uid=1000,gid=100,allow_root"

and user2 mounted with

"-o workaround=rename,uid=1000,gid=100,allow_root,subtype=subtype"
Comment 7 Henning Schild 2008-04-15 08:08:31 UTC
Created attachment 149776 [details]
/proc/mounts example
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2008-04-15 12:57:18 UTC
from /etc/fstab:
/dev/sda1               /mnt/windows    ntfs-3g         noatime,locale=C 0 2

from mount:
/dev/sda1 on /mnt/windows type fuseblk (rw,noatime,allow_other,blksize=4096)

from /proc/mounts:
/dev/sda1 /mnt/windows fuseblk rw,noatime,user_id=0,group_id=0,allow_other 0 0

That's an ~arch system with a 2.6.24 kernel.

Comment 9 Henning Schild 2022-02-06 20:56:19 UTC
Not sure that is still valid, very old stuff.