[PATCH 9/9] loop: Add LOOP_CONFIGURE ioctl
Xiaoming Ni
nixiaoming at huawei.com
Fri Nov 18 09:27:23 UTC 2022
On 2022/11/18 17:13, Kang-Che Sung wrote:
> On Fri, Nov 18, 2022 at 9:04 AM Xiaoming Ni <nixiaoming at 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 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
>>
>
> Hello.
>
> 1. Are the patches 1 to 8 you proposed in this set _not_ relevant to
> the new LOOP_CONFIGURE ioctl?
> I.e. They are general code structure improvements to the busybox loop
> device code and do not add any feature?
Patches 1-8 are micro-refactoring, not new features.
> Note that according to the bloat-o-meter results you included in the
> patches, some of them increase code size, and you should explain why
> the code size increases there, and why you think it is okay for the
> patch to increase code size.
In patches 1-8, each patch increases or decreases the code size, but the
end result is a reduction in the code size.
see [PATCH 0/9] loop: Micro-refactoring set_loop() and add LOOP_CONFIGURE
> 2. I think LOOP_CONFIGURE support can be made into a config option, so
> that builders can have choice on which algorithm should be built into
> their busybox binary.
> * Always use LOOP_CONFIGURE ioctl, or
> * Support LOOP_CONFIGURE, but keep the old code for runtime fallback, or
> * Not support LOOP_CONFIGURE at all (always use the old code)
> .
>
Thanks, I will add the switch control in the v2 patch.
More information about the busybox
mailing list