a799 ("mount,losetup: use /dev/loop-control is it exists")
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index cb8fa2442..845565d7b 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -218,8 +
ping
On 2022/10/21 15:10, Xiaoming Ni wrote:
When /dev/loop-control exists and *device is empty, the mounting fails
due to concurrent contention.
Code Execution Flow:
try = xasprintf(LOOP_FORMAT, i);
for (i = 0; i <= 0xf; i++) { // The value of "try" i
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 3/0) Total: 3 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 41 -
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index
On 2022/11/18 14:34, Lauri Kasanen wrote:
On Fri, 18 Nov 2022 09:01:58 +0800
Xiaoming Ni wrote:
LOOP_CONFIGURE is added to Linux 5.8
...
diff --git a/libbb/loop.c b/libbb/loop.c
index 9a7ca666d..d4f4906b0 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -126,6 +126,30 @@ static int open_file
Step 3 of micro-refactoring the set_loop() function:
Delete close_and_try_next_loopN.
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0) Total: 0 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-20) Total: -20 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 39 +--
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 2200ccb9a
oop 703 626 -77
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-77) Total:
-77 bytes
else:
add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0)
Signed-off-by: Xiaoming
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-2) Total: -2 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 750642ade..c517ceb13
758 734 -24
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-24) Total: -24 bytes
Fixes: 3448914e8cc5 ("mount,losetup: use /dev/loop-control is it exists")
Signed-off-by: Xiaoming Ni
---
li
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-34) Total: -34 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 91 +++-
1 file changed, 47 insertions(+), 44 deletions(-)
diff --git a/libbb/loop.c b
720 +12
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 12/0) Total: 12 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 54 +---
1 file changed, 30
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0) Total: 8 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 63 ++--
1 file changed, 36 insertions(+), 27 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
: 0/-57) Total:
-57 bytes
----
Xiaoming Ni (9):
loop:refactor: extract subfunction open_file()
loop:refactor: extract subfunction get_next_free_loop()
loop:refactor: del close_and_try_next_loopN
loop:refactor: extract subfunction set_loop_info()
loop:refactor: extract subfunct
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-34) Total: -34 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 91 +++-
1 file changed, 47 insertions(+), 44 deletions(-)
diff --git a/libbb/loop.c b
720 +12
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 12/0) Total: 12 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 54 +---
1 file changed, 30
Builders can use config to choose which algorithm to build into their
busybox binary
---
v2: add config for builder to select
v1: http://lists.busybox.net/pipermail/busybox/2022-November/089969.html
---
Xiaoming Ni (9):
loop:refactor: extract subfunction open_file()
loop:refactor: extract
758 734 -24
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-24) Total: -24 bytes
Fixes: 3448914e8cc5 ("mount,losetup: use /dev/loop-control is it exists")
Signed-off-by: Xiaoming Ni
---
li
ill send patch v3 later
Thanks
Von: busybox im Auftrag von Xiaoming Ni
Gesendet: Freitag, 18. November 2022 02:01:51
An: busybox@busybox.net; vda.li...@googlemail.com
Cc: wang...@huawei.com
Betreff: [PATCH 2/9] loop:refactor: extract subfunction get_n
patch 5 by extracting functions
Von: busybox im Auftrag von Xiaoming Ni
Gesendet: Freitag, 18. November 2022 13:14:43
An: busybox@busybox.net; vda.li...@googlemail.com; c...@gmx.com;
explore...@gmail.com
Cc: wang...@huawei.com
Betreff: [PATCH v2 4/9] loop:
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 16/0) Total: 16 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 39 ---
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index
Step 3 of micro-refactoring the set_loop() function:
Delete close_and_try_next_loopN.
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0) Total: 0 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
n: 0/0) Total:
0 bytes
Signed-off-by: Xiaoming Ni
---
libbb/Config.src | 22 ++
libbb/loop.c | 47 ++-
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/libbb/Config.src b/libbb/Config.src
index 66a3ffa23..b7f9ddab4
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0) Total: 8 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 63 ++--
1 file changed, 36 insertions(+), 27 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-20) Total: -20 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 39 +--
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 2200ccb9a
On 2022/11/18 20:39, Walter Harms wrote:
again try to safe indent level
if (stat(dev, ) == 0 && S_ISBLK(statbuf.st_mode))
return 0;
jm2c
Thanks, will be modified in v3
Von: busybox im Auftrag von Xiaoming Ni
Gesendet: Freitag, 18.
On 2022/11/18 17:13, Kang-Che Sung wrote:
On Fri, Nov 18, 2022 at 9:04 AM Xiaoming Ni wrote:
LOOP_CONFIGURE is added to Linux 5.8
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
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-2) Total: -2 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 750642ade..c517ceb13
if (rc == 0) {
+ return lfd;
+ }
In this case, duplicate "if(rc==0)" occurs.
Is that worse?
Thanks
Xiaoming Ni
Von: busybox im Auftrag von Xiaoming Ni
Gesendet: Freitag, 18. November 2022 13:14:44
An: busybox@busybox.net; v
On 2022/11/19 1:40, Kang-Che Sung wrote:
On Friday, November 18, 2022, Xiaoming Ni <mailto:nixiaom...@huawei.com>> wrote:
> Step 2 of micro-refactoring the set_loop function ()
> Extract subfunction get_next_free_loop() from set_loop()
>
> Also fix miss fr
720 +12
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 12/0) Total: 12 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 54 +---
1 file changed, 30
On 2022/11/19 2:06, Kang-Che Sung wrote:
On Friday, November 18, 2022, Xiaoming Ni <mailto:nixiaom...@huawei.com>> wrote:
> Step 6 of micro-refactoring the set_loop():
> Use structs to avoid transferring a large number of parameters
> in
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 16/0) Total: 16 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 39 ---
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index
758 734 -24
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-24) Total: -24 bytes
Fixes: 3448914e8cc5 ("mount,losetup: use /dev/loop-control is it exists")
Signed-off-by: Xiaoming Ni
---
li
+116
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 116/0) Total:
116 bytes
Signed-off-by: Xiaoming Ni
---
libbb/Config.src | 22 ++
libbb/loop.c | 47 ++-
2 files changed, 68 insertions(+), 1 de
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-20) Total: -20 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 38 --
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 0b1336a02
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-34) Total: -34 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 91 +++-
1 file changed, 47 insertions(+), 44 deletions(-)
diff --git a/libbb/loop.c b
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0) Total: 8 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 63 ++--
1 file changed, 36 insertions(+), 27 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
On 2022/11/19 2:22, Kang-Che Sung wrote:
On Friday, November 18, 2022, Xiaoming Ni <mailto:nixiaom...@huawei.com>> wrote:
> LOOP_CONFIGURE is added to Linux 5.8
>
> This allows userspace to completely setup a loop device with a single
> ioctl, removing the i
nd_mknod().
patch9: Rename set_loop_configure_old() to set_loop_fd_and_status()
v2: http://lists.busybox.net/pipermail/busybox/2022-November/089990.html
changes in patch9: add config for builder to select
v1: http://lists.busybox.net/pipermail/busybox/2022-November/089969.html
---
*** BLURB H
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-2) Total: -2 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 750642ade..c517ceb13
Step 3 of micro-refactoring the set_loop() function:
Delete close_and_try_next_loopN.
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0) Total: 0 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-34) Total: -34 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 91 +++-
1 file changed, 47 insertions(+), 44 deletions(-)
diff --git a/libbb/loop.c b
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 16/0) Total: 16 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 39 ---
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index
h9: Rename set_loop_configure_old() to set_loop_fd_and_status()
v2: http://lists.busybox.net/pipermail/busybox/2022-November/089990.html
changes in patch9: add config for builder to select
v1: http://lists.busybox.net/pipermail/busybox/2022-November/089969.html
---
Xiaoming Ni (9):
l
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-2) Total: -2 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 750642ade..c517ceb13
On 2022/11/21 15:50, Kang-Che Sung wrote:
On Mon, Nov 21, 2022 at 9:19 AM Xiaoming Ni wrote:
static int get_next_free_loop(char *dev, size_t dev_size, int id)
{
int loopdevno = get_free_loop();
if (loopdevno >= 0) {
snprintf(dev, dev_size, LOOP_FOR
758 734 -24
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-24) Total: -24 bytes
Fixes: 3448914e8cc5 ("mount,losetup: use /dev/loop-control is it exists")
Signed-off-by: Xiaoming Ni
---
li
720 +12
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 12/0) Total: 12 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 54 +---
1 file changed, 30
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0) Total: 8 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 63 ++--
1 file changed, 36 insertions(+), 27 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
Step 3 of micro-refactoring the set_loop() function:
Delete close_and_try_next_loopN.
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0) Total: 0 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
--
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-20) Total: -20 bytes
Signed-off-by: Xiaoming Ni
---
libbb/loop.c | 38 --
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/libbb/loop.c b/libbb/loop.c
index 5f0db4b18
+116
--
(add/remove: 0/0 grow/shrink: 1/0 up/down: 116/0) Total:
116 bytes
Signed-off-by: Xiaoming Ni
---
libbb/Config.src | 22 ++
libbb/loop.c | 45 +
2 files changed, 67 insertions(+)
diff
On 2022/11/21 12:28, Kang-Che Sung wrote:
On Mon, Nov 21, 2022 at 9:31 AM Xiaoming Ni wrote:
Also, it is unclear why there is the need to clone the loopinfo buffer.
> /* Old kernel, does not support LO_FLAGS_AUTOCLEAR? */
> /* (this code path is not
53 matches
Mail list logo