[elbe-devel] [PATCH] fstab: Fix issue #254

Olivier Dion dion at linutronix.de
Thu Mar 26 19:32:48 CET 2020


On Thu, 26 Mar 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
> On Tue, Mar 24, 2020 at 12:34:11AM +0100, Bastian Germann wrote:
>> Please use a more describing subject.
>> 
>> Am 24.03.20 um 00:35 schrieb Olivier Dion:
>> > See <https://github.com/Linutronix/elbe/issues/254>.
>> 
>> Write a line "Fixes #254." instead to trigger the GitHub issue management.
>
> Errm, lets do this correctly.
>
> losetup has the -f option, which will make it seek for a "free" loop
> device.

Made a new patch with your recommendations.

> This will allow 2 jobs running in parallel sometime in the future.
>
> I am also very interested in the cause of Issue 254.
> i mean, we call losetup -d /dev/loop0 and afterwards, its busy ?
> what is happening here ? is there some code running asyncronously,
> that is still freeing the device ?

Is it possible that this has to do with detaching /dev/poop0 in
grubinstaller{97,202}?  My guess is that we're detaching, but the device
is still busy.  Thus, the call to 'losetup -d /dev/poop0' "failed".

I write "failed" because losetup(8) says that since Linux 3.7, there's
no EBUSY error for detaching and thus the call to losetup -d /dev/poop0
does not fail.  However, the device is "marked by autoclear flag and
destroyed later".  We later try to acquire the same device and we get
EBUSY.

Letting losetup finding a device is the good thing to do.

-- 
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen



More information about the elbe-devel mailing list