Package: mount
Version: 2.32-0.1
Severity: normal
If I request losetup to detach from a loop device and it cannot be
detached, I would expect it to notify me accordingly. However:
# losetup --list
NAMESIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
DIO LOG-SEC
/dev/loop1 0 0 1 0
/home/gwolf/vcs/raspi3-image-spec/raspi3.img (deleted) 0 512
# if losetup --detach /dev/loop1 ; then echo SUCCESS; else echo FAIL; fi
SUCCESS
# losetup --list
NAMESIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
DIO LOG-SEC
/dev/loop1 0 0 1 0
/home/gwolf/vcs/raspi3-image-spec/raspi3.img (deleted) 0 512
When requesting debug information, it seems losetup actually believes
the loopback was dropped - but it is false:
# LOOPDEV_DEBUG=all losetup --detach /dev/loop1
9932: loopdev: CXT: [0x7ffeaa764d60]: initialize context
9932: loopdev: CXT: [0x7ffeaa764d60]: init: ignore ioctls
9932: loopdev: CXT: [0x7ffeaa764d60]: init: loop-control detected
9932: loopdev: CXT: [0x7ffeaa764d60]: /dev/loop1 name assigned
9932: loopdev: CXT: [0x7ffeaa764d60]: open /dev/loop1 [ro]: Success
9932: loopdev: CXT: [0x7ffeaa764d60]: device removed
9932: loopdev: CXT: [0x7ffeaa764d60]: de-initialize
9932: loopdev: CXT: [0x7ffeaa764d60]: closing old open fd
9932: loopdev: ITER: [0x7ffeaa764f18]: de-initialize
# losetup --list
NAMESIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
DIO LOG-SEC
/dev/loop1 0 0 1 0
/home/gwolf/vcs/raspi3-image-spec/raspi3.img (deleted) 0 512
Thank you very much for looking into this!
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.15.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mount depends on:
ii libblkid1 2.32-0.1
ii libc6 2.27-3
ii libmount1 2.32-0.1
ii libselinux12.8-1
ii libsmartcols1 2.32-0.1
ii util-linux 2.32-0.1
mount recommends no packages.
Versions of packages mount suggests:
pn nfs-common
-- no debconf information