loop-util: use new LOOP_CONFIGURE ioctl
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Aug 2020 07:47:14 +0000 (09:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 11 Aug 2020 13:24:18 +0000 (15:24 +0200)
LOOP_CONFIGURE allows us to configure a loopback device in one ioctl
instead of two, which is not just faster but also removes the race that
udev might start probing the device before we adjusted things properly.

Unfortunately LOOP_CONFIGURE is broken in regards to LO_FLAGS_PARTSCAN
as of kernel 5.8.0. This patch contains a work-around for that, to
fallback to old behaviour if partition scanning is requested but does
not work. Sucks a bit.

Proposed upstream fix for that issue:

https://lkml.org/lkml/2020/8/6/97


No differences found