[PATCH v2 6/9] fs: romfs: register an initrd fs detector

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina Port romfs from to the new initrd_fs_detect API. There are no functional changes. Signed-off-by: Julian Stecklina --- fs/romfs/Makefile | 4 fs/romfs/initrd.c | 22 ++ init/do_mounts_rd.c | 14 -- 3 files changed, 26 insertions(+

[PATCH v2 1/9] initrd: remove ASCII spinner

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina Writing the ASCII spinner probably costs more cycles than copying the block of data on some output devices if you output to serial and in all other cases it rotates at lightspeed in 2025. Signed-off-by: Julian Stecklina --- init/do_mounts_rd.c | 11 --- 1 file ch

[PATCH v2 3/9] initrd: add a generic mechanism to add fs detectors

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina So far all filesystems that are supported as initrd have their filesystem detection code implemented in init/do_mounts_rd.c. A better approach is to let filesystem implementations register a detection hook. This allows the filesystem detection code to live with the rest of

[PATCH v2 4/9] fs: minix: register an initrd fs detector

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina Port minix to the new initrd_fs_detect API. There are no functional changes. This code only supports the minix filesystem v1. This means 64 MiB filesystem size limit. This would be a good candidate to drop support for. Signed-off-by: Julian Stecklina --- fs/minix/Makefi

[PATCH v2 7/9] fs: squashfs: register an initrd fs detector

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina Port squashfs from to the new initrd_fs_detect API. There are no functional changes. Signed-off-by: Julian Stecklina --- fs/squashfs/Makefile | 5 + fs/squashfs/initrd.c | 23 +++ init/do_mounts_rd.c | 14 -- 3 files changed, 28 inse

[PATCH v2 9/9] fs: erofs: register an initrd fs detector

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina Allow erofs to be used as a filesystem for initrds. It offers similar advantages as squashfs, but with higher performance and arguably nicer tooling. If we support squashfs, there is no reason not to support erofs as well. Suggested-by: Niklas Sturm Signed-off-by: Julian

[PATCH v2 5/9] fs: cramfs: register an initrd fs detector

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina Port cramfs to the new initrd_fs_detect API. There are no functional changes. Signed-off-by: Julian Stecklina --- fs/cramfs/Makefile | 5 + fs/cramfs/initrd.c | 41 + init/do_mounts_rd.c | 28 ++-- 3

[PATCH v2 0/9] initrd: cleanup and erofs support

2025-03-22 Thread Julian Stecklina via B4 Relay
On my journey towards adding erofs support for initrd, Al Viro suggested to move the filesystem detection code into the respective filesystem modules. This patch series implements this, while also adding erofs support. To achieve this, I added a macro initrd_fs_detect() that allows filesystem modu

[PATCH v2 8/9] fs: ext2, ext4: register an initrd fs detector

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina Port ext2fs to the new initrd_fs_detect API. There are minor functional changes, because I thought that relying on a 16-bit magic number alone is too error-prone. I also removed ext2_image_size from linux/ext2_fs.h, because the initrd code is the only user. Given that both

[PATCH v2 2/9] initrd: fix double fput for truncated ramdisks

2025-03-22 Thread Julian Stecklina via B4 Relay
From: Julian Stecklina When you actually take the exit via devblocks == 0, the code will do fput(in_file) twice. This was introduced when the APIs where switched to the file-based APIs. Remove more of the multi-floppy support from the olden days. Fixes: bef173299613 ("initrd: switch initrd load