Skip to content

fix(devices): hide system loop and busy volumes - #2105

Merged
l0gicgate merged 5 commits into
mainfrom
fix/2104-hide-system-held-volumes
Nov 9, 2026
Merged

l0gicgate merged 5 commits into
mainfrom
fix/2104-hide-system-held-volumes

Conversation

@l0gicgate

Copy link
Copy Markdown
Contributor

Description

Supersedes #2104 by @zhouwg. Their commit is kept on this branch, with main merged and the review fixes on top; the fork does not allow maintainer pushes, so the fixes could not land there.

On a live system, Devices lists volumes that can never be mounted: the root image's loop device and the boot medium, both already held by the kernel, so mount and eject fail with EBUSY. This hides unmounted volumes the system holds:

  • a loop volume GVfs does not mark for automount. GVfs marks exactly the loops the current user attached, so a disk image attached with udisksctl loop-setup stays listed and mountable;
  • a volume whose block device refuses an exclusive open with EBUSY. The probe runs off the UI thread through the cache the crypto hints already use, now shared as devices/probe_cache.rs.

Mount, unmount and eject failures that UDisks or eject(1) report as an untyped "busy" error now show the existing "The item is in use" message instead of backend text.

Changes relative to #2104, detailed in the review: the loop rule no longer hides loops the user attached, the device probe no longer opens device nodes on the UI thread, and the busy match is limited to whole phrases on untyped failures so a volume label such as BUSYBOX cannot trigger it.

Not verified: the live-ISO scenario itself, which could not be reproduced during review.

Visual evidence

N/A. The before and after screenshots from the original report are in #2104.

How to test

  1. Boot a live ISO in QEMU with two extra virtual disks, as described in fix(devices): hide system loop and busy volumes #2104, and open Strata.
  2. On an installed system without an automounter, run udisksctl loop-setup -f disk.iso and open Strata.

Expected result: On the live system, Devices no longer lists the root image loop or the boot medium, and the two data disks are still listed. On the installed system, the attached image is listed in Devices and mounts when clicked.

Related issue

Supersedes #2104. No issue was filed for the original report.

zhouwg and others added 5 commits November 9, 2026 19:51
Any message containing "busy" became "The item is in use", which also
caught device labels and mount paths in unrelated failures and overrode
typed GIO errors. Match the system's busy phrases on untyped failures
only.
The exclusive-open probe ran on the UI thread for every unmounted volume
on each sidebar rebuild. Cache it behind the worker that already reads
crypto hints.

Hide a loop only when GVfs does not mark it for automount, which it does
for loops this user attached, so a disk image attached with udisksctl
stays mountable from Devices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants