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 the loop device has a backing file associated with it,
but is reading from the wrong offset.

https://lwn.net/Articles/820408/
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3448914e8cc5

patch 1-8: To facilitate the addition of new functions, the code of set_loop() 
is micro-refactored.
        function                                             old     new   delta
        set_loop                                             760     703     -57
        
------------------------------------------------------------------------------
        (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-57)             Total: 
-57 bytes

patch 9: add LOOP_CONFIGURE 
        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 subfunction get_next_free_loop()
  loop:refactor: del close_and_try_next_loopN
  loop:refactor: extract subfunction set_loop_info()
  loop:refactor: extract subfunction set_loop_configure()
  loop:refactor: Use a structure to reduce parameters
  loop:refactor: Extract subfunction do_stat_and_mknod()
  loop:refactor: extract subfunction set_loop_dev()
  loop: Add LOOP_CONFIGURE ioctl

 libbb/Config.src |  22 ++++
 libbb/loop.c     | 293 ++++++++++++++++++++++++++++++-----------------
 2 files changed, 212 insertions(+), 103 deletions(-)

-- 
2.27.0

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to