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

2025-03-24 Thread Julian Stecklina
On Sat, 2025-03-22 at 21:34 +0100, Julian Stecklina via B4 Relay wrote: > >  #ifdef CONFIG_BLK_DEV_INITRD >  extern void __init reserve_initrd_mem(void); >  extern void wait_for_initramfs(void); > + > +/* > + * Detect a filesystem on the initrd. You get 1 KiB (BLOCK_SIZE)

[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

[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

[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

[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
v1 filesystems (64 MiB filesystem size limit!) or cramfs (16 MiB file size limit!) as an initrd these days! Squashfs and erofs seem genuinely useful, though. Signed-off-by: Julian Stecklina --- Changes in v2: - Remove more legacy code - Introduce initrd_fs_detect - Move all other initrd filesystems

[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

[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 i