lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <72939177-a284-b5b6-e75e-2de9ab989bb4@linux.ibm.com>
Date:   Wed, 16 Jun 2021 09:22:17 +0200
From:   Ingo Franzki <ifranzki@...ux.ibm.com>
To:     Karel Zak <kzak@...hat.com>
Cc:     Ming Lei <ming.lei@...hat.com>, Jens Axboe <axboe@...nel.dk>,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        Juergen Christ <jchrist@...ux.ibm.com>
Subject: Re: loop_set_block_size: loop0 () has still dirty pages (nrpages=2)

On 15.06.2021 10:42, Karel Zak wrote:
> On Mon, Jun 14, 2021 at 09:35:30AM +0200, Ingo Franzki wrote:
>> However, shouldn't then the losetup userspace utility implement some kind of retry logic in case of -EAGAIN ?
>> I don't see that in the source of losetup.c nor in loopdev.c in the util-linux package. There is a retry loop in create_loop() in losetup.c retrying loopcxt_setup_device() in case of EBUSY, but not in case of EAGAIN.
>>
>> And losetup also hides the original error code and just returns EXIT_FAILURE in case of a failure. So no real good chance for the script that uses losetup to catch that error situation and perform a retry itself.
>>
>> Adding Karel Zak (the maintainer of util-linux).
>>
>> @Karel Zak: How about adding EAGAIN to the condition for performing a retry? 
>>
>> Something like this:
>>
>> -		if (errno == EBUSY && !hasdev && ntries < 64) {
>> +		if ((errno == EBUSY || errno == EAGAIN) && !hasdev && ntries < 64) {
>> 			xusleep(200000);
>> 			ntries++;
>> 			continue;
>> 		}
>  
> EAGAIN sounds like the best reason to try it again :-) 
> 
> Committed, it will be also available in v2.37.1.

Thanks a lot for the quick resolution!

Do you by any chance know if Fedora 34 will be updated with v2.37.1? 
I guess Fedora 35 will get it in any case.
> 
>   Karel
> 
> 


-- 
Ingo Franzki
eMail: ifranzki@...ux.ibm.com  
Linux on IBM Z Development, Schoenaicher Str. 220, 71032 Boeblingen, Germany

IBM Deutschland Research & Development GmbH / Vorsitzender des Aufsichtsrats: Matthias Hartmann
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM DATA Privacy Statement: https://www.ibm.com/privacy/us/en/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ