Bug#860894: kpartx: kpartx returns error even when loop device is deleted successfully

Balint Reczey balint.reczey at canonical.com
Fri Apr 21 13:00:43 UTC 2017


Package: kpartx
Version: 0.6.4-5
Severity: wishlist
Tags: patch

Dear Maintainers,

Sometimes kpartx reports errors during handling partition while at the
end deleting the loop device succeeds:

$ kpartx -v -d binary/boot/disk-uefi.ext4
device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
del devmap : loop0p15
del devmap : loop0p14
loop deleted : /dev/loop0
$
# here we have $? != 0
# (from: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1684090)

Please find the patch attached which ignores earlier errors after loop
deletion is done.

Cheers,
Balint

-- 
Balint Reczey
Debian & Ubuntu Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-kpartx-loop-deleted-succeed.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20170421/6d6264a6/attachment.bin>


More information about the pkg-lvm-maintainers mailing list