Fixes for make_ext4fs / mkfs.ext4(mke2fs)

Alex Zakharov uglym8 at
Mon Oct 16 11:03:17 UTC 2023

Hey all,
While waiting for my Salsa login approval I decided to introduce the
changes that might be interesting for the reproducibility topic.
At the moment *
<>* suggests you:
"Instead of using mkfs.ext, make_ext4fs can be used. make_ext4fs is
creating the whole filesystem at once."

I think we can mention (after verification, see below please) that now we
can also use mkfs.ext4 (mke2fs) (although I am not sure that I
covered all but the simple case here).

I'd like to also propose a few fixes for make_ext4fs as well, namely:
- Adding proper hard links support (try to use a directory with two files,
say, perf and trace, that are hard links, and see that current make_ext4fs
will create two files each having hard link of 1, thus doubling the
occupied storage size)
- (Optional) different handling of lost+found directory (the current one
though being correct, is not the best implementation:
questionable/redundant calloc() and memcpy() and memory leaks)
- (Optional) Add CFLAGS_EXTRA and LDFLAGS_EXTRA to facilitate the cross
compiling (verified on ARM). You can easily cross compile it like this:

CC=arm-linux-gnueabihf-gcc EXTRA_CFLAGS=-I/home/xxxx/arm_build/zlib-1.2.13/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rb-general mailing list