Bug 1566390
Summary: | [RHEL-7.5] losetup can not detach all loop devices | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | xhe <xhe> |
Component: | util-linux | Assignee: | Karel Zak <kzak> |
Status: | CLOSED ERRATA | QA Contact: | Radka Brychtova <rskvaril> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.5 | CC: | rskvaril |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | util-linux-2.23.2-56.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-30 10:52:39 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
xhe@redhat.com
2018-04-12 08:39:46 UTC
This is nothing unusual, if there is some reader of the loop device than kernel does not destroy the device, but mark by LO_FLAGS_AUTOCLEAR. The device will be detached later when reference counting will be zero. As you can see from the strace than ioctl(3, LOOP_CLR_FD) = 0 kernel returns success, in this case losetup cannot do anything more. man losetup (upstream): -d, --detach loopdev... Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruction". The detach operation does not return EBUSY error anymore if device is actively used by system, but it is marked by autoclear flag and destroyed later. Maybe we can add this note to RHEL7.6 too. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3178 |