Bug 254625 - FUSE filesystems do not report device name to devd
Summary: FUSE filesystems do not report device name to devd
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-28 13:36 UTC by Gleb Popov
Modified: 2021-03-31 07:52 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Popov freebsd_committer freebsd_triage 2021-03-28 13:36:01 UTC
When running "ntfs-3g /dev/da0 /mnt" I get the following line in "cat /var/run/devd.pipe":

!system=VFS subsystem=FS type=MOUNT mount-point="/mnt" mount-dev="/dev/fuse" mount-type="fusefs" fsid=0x37ff00eded000000 owner=0 flags="" opt="fstype=fusefs;fspath=/mnt;from=/dev/fuse;fd=4;"

As you can see, there is no "/dev/da0" string anywhere in this output. This makes it impossible to figure out source device in sysutils/bsdisks, which monitors devd output for mount/unmount events.
Comment 1 Alan Somers freebsd_committer freebsd_triage 2021-03-28 16:58:55 UTC
This is not a bug in fusefs.  The kernel has no idea which disk(s) a particular fuse daemon may be using.  It may be using 0, 1, or many real disks, but those disks will all be opened by the daemon, not by fusefs itself.

I think that you want may be one of the following two new features:
1) For bsdisks to monitor disk devices for open/close events instead of just mount/unmount, or
2) For ntfs-3g to report events to bsdisks directly

I'm going to close this issue, because there's no bug in fusefs, and those two features are both things that you should pursue upstream.  But feel free to reopen it if there's something I'm not understanding, or if you have a better idea.
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2021-03-28 20:35:14 UTC
(In reply to Alan Somers from comment #1)
Thanks for your reply. What do you mean by "monitor disk devices for open/close events" ?
Comment 3 Alan Somers freebsd_committer freebsd_triage 2021-03-28 21:57:28 UTC
I mean that in addition to type=MOUNT , devd also publishes events every time a GEOM device is opened or closed, IIRC.
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2021-03-31 07:52:49 UTC
(In reply to Alan Somers from comment #3)
I tried mounting my msdosfs USB stick on CURRENT system and got only

!system=VFS subsystem=FS type=MOUNT mount-point="/mnt" mount-dev="/dev/da0s1" mount-type="msdosfs" fsid=0xec01000032000000 owner=0 flags="local;" opt="fstype=msdosfs;fspath=/mnt;from=/dev/da0s1;uid=0;gid=0;mask=493;dirmask=493;"


Unmounting results in

!system=DEVFS subsystem=CDEV type=MEDIACHANGE cdev=da0
!system=GEOM subsystem=DEV type=MEDIACHANGE cdev=da0
!system=VFS subsystem=FS type=UNMOUNT mount-point="/mnt" mount-dev="/dev/da0s1" mount-type="msdosfs" fsid=0xec01000032000000 owner=0 flags="" opt="fstype=msdosfs;fspath=/mnt;from=/dev/da0s1;uid=0;gid=0;mask=493;dirmask=493;"
!system=DEVFS subsystem=CDEV type=MEDIACHANGE cdev=da0s1
!system=GEOM subsystem=DEV type=MEDIACHANGE cdev=da0s1

Are you talking about MEDIACHANGE events? These aren't very informative.