Conversation
Allow X-loopdev.direct-io=on|off to select the direct I/O mode when mounting a file through a loop device. Pass the flag to the existing loop setup path and require a matching mode when reusing a device. Omitting the option preserves the current behavior. Keep reused devices attached if the mount fails; only release the reference acquired by this mount. Add tests for option parsing, new devices, reuse, mode conflicts and failure cleanup. Fixes: util-linux#3464 Assisted-by: LLM Signed-off-by: Tianyi Chen <hi@tychen.cc>
fee112d to
42979c7
Compare
|
Thanks for the patch. A few things before this can go in: 1. Misleading error for the direct-I/O mismatch rc = -MNT_ERR_LOOPOVERLAP;
2. Please split the commit The 3. Document that direct-io=on is not guaranteed The kernel clears 4. Use Instead of open-coding 5. Test should use the test-suite helpers
Minor / style:
— assisted by Claude Code |
Allow X-loopdev.direct-io=on|off to select the direct I/O mode when mounting a file through a loop device. Pass the flag to the existing loop setup path and require a matching mode when reusing a device. Omitting the option preserves the current behavior.
Keep reused devices attached if the mount fails; only release the reference acquired by this mount. Add tests for option parsing, new devices, reuse, mode conflicts and failure cleanup.
Fixes: #3464
Assisted-by: LLM