bug with umounting loop devices in busybox 1.10.2
Denys Vlasenko
vda.linux at googlemail.com
Thu May 22 15:56:34 UTC 2008
On Thursday 22 May 2008 17:48, Natanael Copa wrote:
> hi,
>
> I have noticed a problem with mount or umount in busybox-1.10.2
>
> # /dev/sda1 is ext3
> mount /dev/sda1 on /mnt
>
> # mount a loop back device
> mkdir /1
> mount -o loop /mnt/loopback /1
>
> umount /1
> umount /mnt
>
> The result is:
> umount: cannot umount /mnt: Device or resource busy
>
> Doing exactly the same works in busybox-1.9.2.
Yes. This was an incompatible change, to make our umount match
util-linux. It has -d "free loop device", we were using -D
with an inverted meaning:
# /app/busybox-1.9.0.svn/busybox umount --help
BusyBox v1.9.0.svn (2007-12-20 23:47:50 GMT) multi-call binary
Usage: umount [flags] FILESYSTEM|DIRECTORY
Unmount file systems
Options:
-a Unmount all file systems
-r Try to remount devices as read-only if mount is busy
-l Lazy umount (detach filesystem)
-f Force umount (i.e., unreachable NFS server)
-D Do not free loop device (if a loop device has been used)
# umount --help
BusyBox v1.10.0 (2008-03-22 15:35:10 CET) multi-call binary
Usage: umount [flags] FILESYSTEM|DIRECTORY
Unmount file systems
Options:
-a Unmount all file systems
-r Try to remount devices as read-only if mount is busy
-l Lazy umount (detach filesystem)
-f Force umount (i.e., unreachable NFS server)
-d Free loop device if it has been used
man umount:
NAME
umount - unmount file systems
SYNOPSIS
umount [-hV]
umount -a [-dflnrv] [-t vfstype] [-O options]
umount [-dflnrv] dir | device [...]
DESCRIPTION
...
-d In case the unmounted device was a loop device, also free this loop device.
Sorry for inconvenience...
--
vda
More information about the busybox
mailing list