Bug 1076166

Summary: loop-delete won't tear down a loop device
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Koten <jkoten>
Component: udisks2Assignee: Tomas Smetana <tsmetana>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-11 11:44:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Koten 2014-03-13 17:13:39 UTC
Description of problem:
When I try to tear down a loop device backed by iso file, the iso file remains mounted despite udisksd claims that it deleted the loop device.

Version-Release number of selected component (if applicable):
udisks2-2.1.2-5.el7

How reproducible:
100%

Steps to Reproduce:
1. udisksctl loop-setup -f path/to/your/image.iso
2. udisksctl loop-delete -b /dev/loop0
3. udisksctl info -b /dev/loop0

Actual results:
iso file remains mounted

Expected results:
loop device is torn down

Additional info:

Comment 1 RHEL Program Management 2014-03-22 05:48:10 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 Tomáš Bžatek 2014-03-27 14:16:41 UTC
Well, the way losetup works when deleting loop device is that it marks it as "autoclear", i.e. it automatically disappears when not used anymore (after unmount). I don't see any option to force removal or report an error.

`udisksctl loop-delete` acts the same way it succeeds as long losetup succeeds.

The only thing we can do is to unmount a mount when mounted through udisks; for mounts trigerred outside udisks we're not permitted to operate over them.

In any case, we should probably print a warning or something.