udisks
udisks copied to clipboard
Fix btrfs lingering mounts
Btrfs has an issue where mount can linger after a sudden device disconnect, this is very apparent with USB storage. the psuedo mount option x-systemd.device-bound overrides the default Requires dependency to that of BindsTo which will automatically stop the mount if the device became inactive.
Partly fixes https://github.com/storaged-project/udisks/issues/1359
Please list more filesystems susceptible to lingering mounts in https://github.com/storaged-project/udisks/issues/1359 if you know any so they can be covered as well.
https://github.com/systemd/systemd/issues/36634#issuecomment-2704011521
Oh perhaps udisks could use systemd-mount --discover probing? It can probe if the backing device is a removable storage, and applies a BindsTo dependency against said backing dev for the mount unit.