Skip to content

Automatically unmount mounted directory when deleting loop device

When deleting a loop device, all mounts depending on this loop device should be unmounted before deletion. This patch uses Solid to get all StorageAccess devices linked to the loop device to delete and unmounts them if needed before the loop devie deletion.

BUG: 422082

Additional questions:

  • Should the mount action of the mountiso plugin automatically mount the loop device to a directory?
    • I've open another merge request about that !8 (merged)
  • Should the unmount action of dolphin sidebar automatically delete the loop device?
    • If this comes up as a bug, I'll try to resolve this in dolphin

I have already tried to automatically mount the StorageAccess device (which was automatically created after creating the loop device) to a directory when mounting using mountiso action, but I can't make it to work. The getStorageAccessFromDevice function does not work when used right after mounting the iso file to a loop device. After mounting the iso file to /dev/loop0, I can get the corresponding /dev/loop0p1 device but it seems that Solid does not consider it to be a StorageAccess device, which means that I can't mount it to a directory.

Resolved it in !8 (merged)

Edited by Kwon-Young Choi

Merge request reports