udisks
udisks copied to clipboard
post-mount is-blockdev-in-mountinfo assertion breaks fuse mounts
Hi,
I'm trying to use udisks2 alongside lklfuse, which gets invoked via the following mount_options.conf:
[defaults]
vfat_drivers=lklfuse
vfat:lklfuse_allow=type=vfat,uid=$UID,gid=$GID...
vfat:lklfuse_defaults=type=vfat,uid=$UID,gid=$GID...
# mount.lklfuse is a simple wrapper around the binary called below
# <parse arguments to extract type string and escape remaining mount options>
/usr/bin/lklfuse "$dev" "$mnt" -o "type=${typeopt},opts=${optsopt}"
This appears to work okay in that lklfuse starts and successfully mounts the block device. However, udisksd immediately fails the subsequent!is_mounted check, due to the lack of block device node presence in /proc/self/mountinfo. The mountinfo entry for the successful lklfuse mount instead corresponds to a FUSE-derived MAJOR:MINOR.
I'm just wondering how to best resolve this issue. The simplest might be to simply check wether the mountpoint is present in mountinfo, instead of the MAJOR:MINOR, or perhaps ignore the is_mounted check if a specific config flag is present.
I'd appreciate any other tips or suggestions.
I don't think there's a way to make this work from the outside. UDisks is currently heavily based on major:minor number as primary device identifier. There's a dirty workaround for btrfs, nothing for fuse AFAIK. Interesting that ntfs-3g mounts do work fine.