summaryrefslogtreecommitdiffstats
path: root/src/basic/missing_loop.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* missing_loop: add missing assertions for fallback valuesMike Yuan2024-06-151-4/+8
|
* src/basic/missing_loop.h: fix missing LOOP_SET_BLOCK_SIZERaphaël Mélotte2024-06-151-0/+4
| | | | | | | | | | | | | | Builds with kernels headers < 4.14 fail with: ../src/shared/loop-util.c: In function ‘loop_configure_fallback’: ../src/shared/loop-util.c:237:31: error: ‘LOOP_SET_BLOCK_SIZE’ undeclared (first use in this function); did you mean ‘LOOP_SET_DIRECT_IO’? if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) c->block_size) < 0) ^~~~~~~~~~~~~~~~~~~ LOOP_SET_DIRECT_IO Fixes: https://github.com/systemd/systemd/issues/33341 Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
* missing_loop.h: fix LOOP_SET_STATUS_SETTABLE_FLAGSYu Watanabe2024-05-281-1/+1
| | | | | | See https://github.com/torvalds/linux/blob/v6.10-rc1/include/uapi/linux/loop.h Fixes a bug in b3fe33ff52ece458a5b990a4a68d59aef7cae10b.
* missing_loop: fix potential compile-time assertionYu Watanabe2024-05-281-1/+1
| | | | Fixes a bug introduced by 4d6437d33c45c3d31497f2e3bd8d415f775546b8.
* basic/missing_*.h: indentation tweaksZbigniew Jędrzejewski-Szmek2024-03-201-1/+1
|
* basic/missing_*.h: add asserts that the values are as expectedZbigniew Jędrzejewski-Szmek2024-03-201-3/+10
| | | | | | | | | | | | It's great that we provide fallback values, but if we got one of those wrong, it could be a long time before anyone noticed. So let's add asserts that the our internal defines actually match the official ones, when the latter are available. I did not add '#include "macro.h"' to missing_{audit,capability}, because those are processed by an awk script that would need additional include directories and could be confused by the additional lines. We don't include those headers standalone anyway, so this is not necessary anyway.
* basic/missing_loop.h: fix missing lo_flags LO_FLAGS_DIRECT_IOGuillaume W. Bres2022-09-081-1/+6
|
* basic/missing: move BLKGETDISKSEQ to missing_fs.hYu Watanabe2022-04-011-5/+0
| | | | As it is defined at linux/fs.h.
* loop-util: enable LO_FLAGS_DIRECT_IO by default on loopback devicesLennart Poettering2021-10-191-0/+4
| | | | Fixes: #21003
* loop: parse and store disk sequence numberLuca Boccassi2021-07-281-0/+5
| | | | | | | When loop devices are re-used, the disk sequence number is increased. Parse it when creating a loop device and store it. The kernel will never return DISKSEQ=0, so use it to signal that it's not supported by the current kernel.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* loop-util: use new LOOP_CONFIGURE ioctlLennart Poettering2020-08-111-0/+15
LOOP_CONFIGURE allows us to configure a loopback device in one ioctl instead of two, which is not just faster but also removes the race that udev might start probing the device before we adjusted things properly. Unfortunately LOOP_CONFIGURE is broken in regards to LO_FLAGS_PARTSCAN as of kernel 5.8.0. This patch contains a work-around for that, to fallback to old behaviour if partition scanning is requested but does not work. Sucks a bit. Proposed upstream fix for that issue: https://lkml.org/lkml/2020/8/6/97