diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-12-13 14:27:08 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-12-13 15:21:28 +0100 |
commit | 45734a23515b3e1f2305ad33dc22d1bc69e3cba6 (patch) | |
tree | 5527d42c4853823b4002a837aabe0d025343ff79 /libbb/Config.src | |
parent | 9df54deead6845fc38509c412736b47a9a5d5187 (diff) | |
download | busybox-w32-45734a23515b3e1f2305ad33dc22d1bc69e3cba6.tar.gz busybox-w32-45734a23515b3e1f2305ad33dc22d1bc69e3cba6.tar.bz2 busybox-w32-45734a23515b3e1f2305ad33dc22d1bc69e3cba6.zip |
loop: optionally use ioctl(LOOP_CONFIGURE) to set up loopdevs
LOOP_CONFIGURE is added to Linux 5.8
function old new delta
NO_LOOP_CONFIGURE (old code):
set_loop 784 782 -2
LOOP_CONFIGURE:
set_loop 784 653 -131
TRY_LOOP_CONFIGURE:
set_loop 784 811 +27
Based on a patch by Xiaoming Ni <nixiaoming@huawei.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/Config.src')
-rw-r--r-- | libbb/Config.src | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libbb/Config.src b/libbb/Config.src index 66a3ffa23..b980f19a9 100644 --- a/libbb/Config.src +++ b/libbb/Config.src | |||
@@ -369,3 +369,25 @@ config UNICODE_PRESERVE_BROKEN | |||
369 | For example, this means that entering 'l', 's', ' ', 0xff, [Enter] | 369 | For example, this means that entering 'l', 's', ' ', 0xff, [Enter] |
370 | at shell prompt will list file named 0xff (single char name | 370 | at shell prompt will list file named 0xff (single char name |
371 | with char value 255), not file named '?'. | 371 | with char value 255), not file named '?'. |
372 | |||
373 | choice | ||
374 | prompt "Use LOOP_CONFIGURE for losetup and loop mounts" | ||
375 | default TRY_LOOP_CONFIGURE | ||
376 | help | ||
377 | LOOP_CONFIGURE is added to Linux 5.8 | ||
378 | https://lwn.net/Articles/820408/ | ||
379 | This allows userspace to completely setup a loop device with a single | ||
380 | ioctl, removing the in-between state where the device can be partially | ||
381 | configured - eg the loop device has a backing file associated with it, | ||
382 | but is reading from the wrong offset. | ||
383 | |||
384 | config LOOP_CONFIGURE | ||
385 | bool "use LOOP_CONFIGURE, needs kernel >= 5.8" | ||
386 | |||
387 | config NO_LOOP_CONFIGURE | ||
388 | bool "use LOOP_SET_FD + LOOP_SET_STATUS" | ||
389 | |||
390 | config TRY_LOOP_CONFIGURE | ||
391 | bool "try LOOP_CONFIGURE, fall back to LOOP_SET_FD + LOOP_SET_STATUS" | ||
392 | |||
393 | endchoice | ||