Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-12-13 16:27:08 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2022-12-13 17:21:28 +0300
commit45734a23515b3e1f2305ad33dc22d1bc69e3cba6 (patch)
tree5527d42c4853823b4002a837aabe0d025343ff79 /libbb/Config.src
parent9df54deead6845fc38509c412736b47a9a5d5187 (diff)
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.src22
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
For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
at shell prompt will list file named 0xff (single char name
with char value 255), not file named '?'.
+
+choice
+ prompt "Use LOOP_CONFIGURE for losetup and loop mounts"
+ default TRY_LOOP_CONFIGURE
+ help
+ LOOP_CONFIGURE is added to Linux 5.8
+ https://lwn.net/Articles/820408/
+ This allows userspace to completely setup a loop device with a single
+ ioctl, removing the in-between state where the device can be partially
+ configured - eg the loop device has a backing file associated with it,
+ but is reading from the wrong offset.
+
+config LOOP_CONFIGURE
+ bool "use LOOP_CONFIGURE, needs kernel >= 5.8"
+
+config NO_LOOP_CONFIGURE
+ bool "use LOOP_SET_FD + LOOP_SET_STATUS"
+
+config TRY_LOOP_CONFIGURE
+ bool "try LOOP_CONFIGURE, fall back to LOOP_SET_FD + LOOP_SET_STATUS"
+
+endchoice