LWN: Comments on "The ABI status of filesystem formats" https://lwn.net/Articles/833696/ This is a special feed containing comments posted to the individual LWN article titled "The ABI status of filesystem formats". en-us Sat, 18 Oct 2025 23:48:44 +0000 Sat, 18 Oct 2025 23:48:44 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Why ext4? https://lwn.net/Articles/835337/ https://lwn.net/Articles/835337/ mina86 <div class="FormattedComment"> FYI, there’s Rock Ridge extension which adds POSIX semantics to an ISO file-system.<br> </div> Mon, 26 Oct 2020 20:57:18 +0000 Why ext4? https://lwn.net/Articles/834702/ https://lwn.net/Articles/834702/ eru <p>Squashfs, unlike cramfs, does not have problematic size limitations: "Files up to 2^64 bytes are supported; file systems can be up to 2^64 bytes" (<a href="https://tldp.org/HOWTO/SquashFS-HOWTO/whatis.html">https://tldp.org/HOWTO/SquashFS-HOWTO/whatis.html</a>). Tue, 20 Oct 2020 05:38:48 +0000 Why ext4? https://lwn.net/Articles/834566/ https://lwn.net/Articles/834566/ WolfWings <div class="FormattedComment"> Oh, yup, I&#x27;d missed that one going through the main filesystems, that one looks to nail it and he &quot;ROMFS but a full Linux filesystem&quot; so it&#x27;s just about ideal.<br> </div> Sun, 18 Oct 2020 16:19:22 +0000 The ABI status of filesystem formats https://lwn.net/Articles/834376/ https://lwn.net/Articles/834376/ rwmj <div class="FormattedComment"> I&#x27;m wondering if what Josh really wants is some kind of deduplicating block layer. I have a (non-upstream) nbdkit allocator for this. The devil may be in the details however since it may be possible that the bitmaps being combined are not actually identical at the block size level.<br> </div> Thu, 15 Oct 2020 11:11:36 +0000 Why ext4? https://lwn.net/Articles/834152/ https://lwn.net/Articles/834152/ NYKevin <div class="FormattedComment"> What about EROFS? It doesn&#x27;t look very complicated, but it does appear to support most things you might reasonably want to do.<br> <p> <a href="https://www.kernel.org/doc/html/latest/filesystems/erofs.html">https://www.kernel.org/doc/html/latest/filesystems/erofs....</a><br> </div> Tue, 13 Oct 2020 15:30:19 +0000 The ABI status of filesystem formats https://lwn.net/Articles/834102/ https://lwn.net/Articles/834102/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; The way i see it, the only thing a formal spec does is to force upon (someone) to take ALL discussions about the subject of the article up front. </font><br> <p> No, you can write a spec that formalizes an implementation. This is how most RFCs are written.<br> </div> Tue, 13 Oct 2020 03:29:02 +0000 The ABI status of filesystem formats https://lwn.net/Articles/834079/ https://lwn.net/Articles/834079/ ncm <div class="FormattedComment"> I understand the desire to use ext4 for a read-only fs as a need for features maybe not-supported in certain other filesystems.<br> <p> I don&#x27;t understand a reluctance to certify e2fsck as the arbiter of what may be mounted as an ext2/3/4 filesystem. If it is discovered that some bit pattern is a security hole, surely e2fsck will be updated to patch up an image that tickles that security hole?<br> <p> It seems not necessary to remain bitwise compatible with filesystems that *current* e2fsck would alter, but that older e2fsck would allow. e2fsck should continue to accept non-broken images, and to fix known-broken ones. So, we could accept a future kernel requiring that a file system image that used to mount as-is be fixed by a new e2fsck before it may be mounted. We could even have e2fsck refuse to fix certain old images it finds too confusing, as it might for any damaged image.<br> </div> Mon, 12 Oct 2020 16:42:52 +0000 make_ext4fs to generate filesystem https://lwn.net/Articles/834080/ https://lwn.net/Articles/834080/ mebrown <div class="FormattedComment"> The yocto build system has a utility called &#x27;pseudo&#x27;.<br> <p> It uses an LD_PRELOAD library such that anything doing a mknod() libc call is saved to a database instead of invoking the underlying mknod() call, and instead just creates a regular placeholder file.<br> <p> Then when you run mke2fs, similarly the LD_PRELOAD then hooks stat() such that mke2fs reading the placeholder file actually reads the details from the database instead of the filesystem.<br> <p> Seems a little hacky at first, but seems to work well enough in practice.<br> </div> Mon, 12 Oct 2020 16:36:06 +0000 The ABI status of filesystem formats https://lwn.net/Articles/834019/ https://lwn.net/Articles/834019/ error27 <div class="FormattedComment"> I didn&#x27;t mean writing a spec is a waste of time. Specs are good because they encourage rigorous thinking. I meant it would be very difficult and a waste of time to try detect filesystems like Josh&#x27;s in advance and prevent them from mounting.<br> <p> But although specs have their uses, in the kernel, specs cannot work in the way you have said. The rule is never &quot;You can&#x27;t break the spec.&quot; The rule is &quot;You can&#x27;t break userspace.&quot;<br> <p> Here is an example. Ten years ago glibc changed memcpy(). <a href="https://lwn.net/Articles/414467/">https://lwn.net/Articles/414467/</a> The spec said that the new implementation of memcpy() was valid but kernel developers find this attitude rage inducing. We would never do that in the kernel. You could theoretically still change memcpy(), but first you would have to fix all the applications that rely on the old behavior.<br> <p> In the glibc example, it&#x27;s not the flash developers who suffered, it&#x27;s the regular Linux users. For the users, they had a program which worked and now it doesn&#x27;t work. They don&#x27;t care about specs. As kernel developers we care about users first and the spec second.<br> </div> Mon, 12 Oct 2020 13:46:29 +0000 Why ext4? https://lwn.net/Articles/833988/ https://lwn.net/Articles/833988/ WolfWings <div class="FormattedComment"> SquashFS _requires_ compression, so there&#x27;d be a compression -&gt; decompression layer involved. CRAMFS has a ~256MB total size limit. ROMFS is 32-bit so it&#x27;d run into obstacles around the 4GB mark (or maybe 2GB, I don&#x27;t think it&#x27;s been tested for &gt;2GB total size to my knowledge) but it would be the lightest weight option IMHO.<br> <p> But this does boil down to they were abusing an invalid filesystem data structure configuration that was not previously checked. That they were declaring that a particular flag marked the filesystem as such a monstrosity doesn&#x27;t change that they were laying multiple copies of a data structure on top of each other instead of pushing upstream for a proper &quot;read only&quot; flag that did away with those structures entirely is the core invalidity.<br> </div> Sun, 11 Oct 2020 21:27:59 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833987/ https://lwn.net/Articles/833987/ WolfWings <div class="FormattedComment"> ...this seems like they&#x27;re simply using the wrong filesystem entirely. ROMFS has been around since somewhere in the 2.6&#x27;s and compiles down to literally a couple kilobytes of total binary size in most cases.<br> </div> Sun, 11 Oct 2020 21:23:29 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833985/ https://lwn.net/Articles/833985/ NYKevin <div class="FormattedComment"> <font class="QuotedText">&gt; So probably that approach is a waste of time.</font><br> <p> I find this remark deeply confusing, so much so that I think I must have misunderstood you.<br> <p> I proposed creating a formal spec, and declaring that to be the defining line of &quot;what the kernel is prepared to support.&quot; In response to this, you described what happens if you don&#x27;t have a spec and/or don&#x27;t care about said spec, and then ambiguously said &quot;that approach is a waste of time.&quot;<br> <p> It sounds as if you were trying to refute my suggestion, but your argument before this line appears to *agree* with me, because it describes problems that arise when you don&#x27;t have a spec. So, if you could clarify your position, that would help me to understand your argument a lot better.<br> </div> Sun, 11 Oct 2020 19:55:32 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833961/ https://lwn.net/Articles/833961/ error27 <div class="FormattedComment"> The problem is that we don&#x27;t care about a spec, we care about &quot;User space used to work and now it doesn&#x27;t.&quot; So the fix is to program a lot of validation into the kernel so that Josh&#x27;s filesystem never works from square one. If it never worked to begin with then it can never be broken. It&#x27;s a lot of work to code this and it doesn&#x27;t necessarily make Josh any happier.<br> <p> So probably that approach is a waste of time.<br> </div> Sat, 10 Oct 2020 19:43:38 +0000 make_ext4fs to generate filesystem https://lwn.net/Articles/833920/ https://lwn.net/Articles/833920/ tytso <div class="FormattedComment"> Sorry: s/libsparse file/libsparse library/<br> </div> Fri, 09 Oct 2020 17:42:46 +0000 make_ext4fs to generate filesystem https://lwn.net/Articles/833918/ https://lwn.net/Articles/833918/ tytso <div class="FormattedComment"> Interesting. I didn&#x27;t know about this feature in the 6th edition Unix&#x27;s mkfs. It&#x27;s not something which the BSD Fast File System supported, and my involvement with Unix started with BSD 4.3.<br> <p> Using a proto file so that the system can more easily create device files does make sense, and of course these days we need to have something which supports SELinux attributes as well. That&#x27;s one of the reasons why contrib/e2fsdroid exists. (The other is that e2fsdroid uses the Android libsparse file to create an image which omits the all zero blocks and which is compatible with the existing Android image creation tools, and I didn&#x27;t want to drag that into mke2fs as a shared library dependency, since that would make distro installer release engineers.... cranky.)<br> <p> Patches to support some kind of proto file which supports SELinux attributes, and which uses the qemu image file creation functions in libext2fs for mke2fs would certainly be gratefully accepted. If we had that, plus the per-block dedup functionality to create shared blocks file system added, then yes, we could upstream all of that functionality into mke2fs, and allow other embedded systems developers access to e2fsdroid functionality without having to build AOSP....<br> </div> Fri, 09 Oct 2020 17:40:07 +0000 make_ext4fs to generate filesystem https://lwn.net/Articles/833915/ https://lwn.net/Articles/833915/ jhhaller <div class="FormattedComment"> The -d option would still require root access to allow creating device file entries which may not match the host&#x27;s devices.<br> Setting the correct file ownership is another aspect requiring root access. The protofile addresses both of these issues,<br> as it overwrites the filesystem owner, permissions, and allows creating device files. I doubt mkfs was originally<br> concerned with CI systems, but creating filesystem images on a non-native host was likely an early concern.<br> </div> Fri, 09 Oct 2020 15:05:26 +0000 Why ext4? https://lwn.net/Articles/833888/ https://lwn.net/Articles/833888/ eru &gt;<i>There are filesystems which are designed to be read-only, such as ISO9660. Why abuse ext4?</i> <p> Maybe he needed a file system that supports all features expected of a native Linux file system. ISO9660 does not qualify. (But squashfs would? It would also automatically save space). Fri, 09 Oct 2020 12:02:33 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833885/ https://lwn.net/Articles/833885/ roc <div class="FormattedComment"> What I meant to add was: if you write formal specifications the right way, you can use these tools to get more value out of the spec, which tilts the cost/benefit tradeoff towards formal specifications.<br> </div> Fri, 09 Oct 2020 10:35:17 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833884/ https://lwn.net/Articles/833884/ roc <div class="FormattedComment"> One nice thing about really formal specs (as opposed to careful English specs, which aren&#x27;t really formal) is that for many specification languages you can find (or write) tools that leverage the specs to do useful work. For example, for a language like Alloy, fuzzing and model-checking tools can automatically generate testcases that are valid according to the spec and exercise all or most of the interesting edge cases (including many that the spec authors didn&#x27;t think of).<br> <p> You may also be able to prove useful consistency properties from the spec, e.g. that a &quot;valid&quot; filesystem doesn&#x27;t have unaccounted-for blocks, etc.<br> </div> Fri, 09 Oct 2020 10:33:49 +0000 Why ext4? https://lwn.net/Articles/833882/ https://lwn.net/Articles/833882/ epa <div class="FormattedComment"> Yes, I wasn&#x27;t replying to your comment, but to sfeam&#x27;s one.<br> </div> Fri, 09 Oct 2020 08:06:54 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833872/ https://lwn.net/Articles/833872/ bangert <div class="FormattedComment"> A formal spec is not the panacea that one may be inclined to assume. <br> <p> The way i see it, the only thing a formal spec does is to force upon (someone) to take ALL discussions about the subject of the article up front. That&#x27;s practically impossible to get right and specifically when done well takes a huge amount of effort. If the developers were forced to do it, it would consume their time for a very long time - if someone else were to do it it would/could have a higher degree of defects.<br> <p> You are highly likely to just debate the formal specification instead of the implementation.<br> <p> While these objections apply to many situations the extra effort a formal spec introduces is worth it in (some|other) cases.<br> <p> And although the conclusion of the article, that this subject will likely be discussed again, may be true, that is not in itself a bad thing (and the article does not say so). <br> </div> Fri, 09 Oct 2020 07:11:22 +0000 Why ext4? https://lwn.net/Articles/833870/ https://lwn.net/Articles/833870/ Yenya <div class="FormattedComment"> Well, my (rhetorical) question was, why Josh Triplett even decided to use this &quot;optimized&quot; ext4 image instead of going for some filesystem which is read-only by design. Not whether there can arise the same kind of problems with ISO 9660.<br> </div> Fri, 09 Oct 2020 06:38:22 +0000 Why ext4? https://lwn.net/Articles/833862/ https://lwn.net/Articles/833862/ epa <div class="FormattedComment"> ISO 9660 has a standard formally specifying it. That means you can decide whether a given file system image is valid, and if the kernel doesn’t work with a valid image, that is clearly a kernel bug. So no, it doesn’t quite have the same general problem as ext4. <br> <p> In principle the point still stands: there could be a bug in the kernel code when handling a malformed file system image, and that bug could cause security problems, yet somebody might be relying on the exiting behaviour because they use one of these malformed images. But that seems much less likely with ISO 9660, partly because it’s much simpler than ext4, and partly because it’s understood by many different OSes, so you’d soon find out if your image depended on a Linux-specific quirk. <br> <p> I have a CD-ROM that’s meant to be in ISO 9660 format but many of the filenames contain the / character. Linux does not handle this well. But it’s clearly incorrect by the standard, so you can say this is no bug in Linux. <br> </div> Fri, 09 Oct 2020 03:45:17 +0000 make_ext4fs to generate filesystem https://lwn.net/Articles/833858/ https://lwn.net/Articles/833858/ djwong <div class="FormattedComment"> Yeah... mke2fs -d takes care of slurping a directory tree into the new filesystem now.<br> <p> Also, that&#x27;s a very interesting man page link-- now I&#x27;ve learned where the mkfs.xfs &quot;protofile&quot; format comes from! The manpage for mkfs.xfs even features a very similar example file.<br> <p> Er, thanks!<br> </div> Fri, 09 Oct 2020 02:58:03 +0000 Why ext4? https://lwn.net/Articles/833851/ https://lwn.net/Articles/833851/ NYKevin <div class="FormattedComment"> But that argument even applies to e2fsprogs itself. How do we know there isn&#x27;t some weird combination of flags you can pass to tune2fs or mke2fs which somehow makes an evil filesystem? At that point, you would have to break e2fsprogs backcompat anyway. This is probably a lot less *likely* than the &quot;some third-party tool generates a weird filesystem image&quot; case, but some of those third-party tools are actually rather popular (e.g. the article mentions FreeBSD), and breaking them would also be unfortunate. So I&#x27;m not sure how much sense it makes to draw a bright line around e2fsprogs as the single point of compatibility.<br> </div> Fri, 09 Oct 2020 01:14:25 +0000 make_ext4fs to generate filesystem https://lwn.net/Articles/833841/ https://lwn.net/Articles/833841/ jhhaller <div class="FormattedComment"> I wrote an alternate version of this tool at Alcatel-Lucent (twice because the first one got lost). Historically, Unix mkfs could make a filesystem from a list of files and contents, and write that filesystem to a file or device. Most any team generating filesystem images needs such a tool if they want to generate that ISO without needing root access. And, who really wants to give root access to one&#x27;s CI system? We typically used this as a TFTP boot image for embedded Unix systems, and the filesystem was in RAM. That was another story, as the TFTP large block option was required, and no one had implemented a TFTP server with large block support at that time, and the filesystems were typically more than the 64K 512 byte block TFTP transfer size limit.<br> <p> It was not hard to slightly modify mke2fs to take a manifest of files (and file of contents for regular files), and use the functions available to mke2fs to write the special files, permissions, directories, and file content to the ISO. I based the manifest loosely on the syntax of the contents of the proto argument of Unix 6th edition mkfs command - <a href="http://man.cat-v.org/unix-6th/8/mkfs">http://man.cat-v.org/unix-6th/8/mkfs</a> - and added options for other file types including both symbolic and hard links. But, by using mke2fs, it at least used the functions built into the filesystem to populate the parts of the filesystem, making corruption significantly less likely. It would make two passes through the internal data model of the manifest, the first time writing inodes, and the second time writing the file contents. I don&#x27;t remember if all-zero blocks were suppressed to support holes, I suspect not, as few files we installed had large all-zero blocks.<br> <p> It was just more work than I wanted to do to get approval for releasing the changes externally, and get it accepted into ext4 source code, so it stayed internal. Since we never redistributed the tool externally, there was no need to share it, even though the change was under GPL. Sorry, Google and Ted Ts&#x27;o.<br> </div> Thu, 08 Oct 2020 22:39:03 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833842/ https://lwn.net/Articles/833842/ roc <div class="FormattedComment"> C++ is an extreme example. Filesystem formats are vastly simpler than C++. We know how to write formal specifications for quite complicated things.<br> </div> Thu, 08 Oct 2020 22:10:42 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833837/ https://lwn.net/Articles/833837/ khim <div class="FormattedComment"> Format specification only works for simple data structures. Look on C++: it has formal spec, ISO-approved one… yet discussions about if something is a valid C++ or not is not uncommon.<br> </div> Thu, 08 Oct 2020 20:49:54 +0000 Why ext4? https://lwn.net/Articles/833834/ https://lwn.net/Articles/833834/ Yenya <div class="FormattedComment"> Well, a read-only by-design filesystem would not need a bitmap of free blocks and free inodes. And being able to make the r/only filesystem smaller for the same amount of data makes sense, unlike that abuse of ext4.<br> </div> Thu, 08 Oct 2020 20:23:20 +0000 Why ext4? https://lwn.net/Articles/833833/ https://lwn.net/Articles/833833/ sfeam <div class="FormattedComment"> &quot;There are filesystems which are designed to be read-only, such as ISO9660. Why abuse ext4?&quot;<br> <p> Choosing a different filesystem might lessen Ts&#x27;o&#x27;s personal stake in the push-back but the same general arguments and principles would apply to any filesystem, right? The most solid argument Ts&#x27;o raises is that a read-only file system may still be a malware vector if the kernel code handling it fails to consider some edge case or unforeseen content in a data structure. Any patch to fix that vulnerability could hypothetically break an out-of-tree application that had been relying on the previous behavior. Is that to be considered a regression or not? In fact the general argument applies even if the filesystem is not read-only.<br> </div> Thu, 08 Oct 2020 20:19:22 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833828/ https://lwn.net/Articles/833828/ khim <div class="FormattedComment"> Agree 100% there. I&#x27;m not sure I would want to push e2fsprogs to support it, but it sounds precisely as something much more useful then author who made this tool thinks.<br> <p> I only hope that&#x27;s not something which differentiates the product which he is developing from other such tools and it could be open-sourced and shared.<br> <p> </div> Thu, 08 Oct 2020 19:51:23 +0000 Why ext4? https://lwn.net/Articles/833827/ https://lwn.net/Articles/833827/ Yenya <div class="FormattedComment"> There are filesystems which are designed to be read-only, such as ISO9660. Why abuse ext4?<br> </div> Thu, 08 Oct 2020 19:45:57 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833812/ https://lwn.net/Articles/833812/ NYKevin <div class="FormattedComment"> My 2¢ (which should not count for much, seeing as I am neither a Linux developer nor someone who regularly works with filesystem images):<br> <p> This problem would be a lot easier if ext4 had a formal specification saying &quot;This is what a valid filesystem should look like.&quot; I&#x27;m not really happy with the idea that &quot;valid&quot; just means &quot;something you got from mke2fs(8).&quot; Obviously, people are going to want to do experimental things that are not within the scope of a general-purpose tool like mke2fs. A formal spec would help to delimit the lines between &quot;weird, but supported&quot; and &quot;don&#x27;t do that, or else you&#x27;re on your own.&quot;<br> <p> I get the sense that some developers* don&#x27;t like formal specs. A formal spec does not need to be huge or complicated like the C or POSIX standards; it could just be a short description of what e2fsprogs currently expects and supports, in plain and simple language. In fact, I imagine they could take <a href="https://www.kernel.org/doc/html/latest/filesystems/ext4/index.html">https://www.kernel.org/doc/html/latest/filesystems/ext4/i...</a>, sweep it for bugs, ambiguities, or outdated information, and then slap a &quot;this is the formal spec&quot; notice on it. This would not necessarily be easy (ambiguities in particular are hard to find and hard to fix), but it wouldn&#x27;t require convening a huge standards committee or something ridiculous like that.<br> <p> * This is not a reference to any individual, and it is especially not a reference to Mr. Ts&#x27;o. I do not know what Mr. Ts&#x27;o thinks of formal specs.<br> </div> Thu, 08 Oct 2020 18:04:07 +0000 The ABI status of filesystem formats https://lwn.net/Articles/833811/ https://lwn.net/Articles/833811/ sbaugh <div class="FormattedComment"> Triplett&#x27;s library sounds interesting and somewhat-generally-useful, actually. Repeating the description here:<br> <p> <font class="QuotedText">&gt;The short version is that I needed a library to rapidly turn</font><br> <font class="QuotedText">&gt;dynamically-obtained data into a set of disk blocks to be served</font><br> <font class="QuotedText">&gt;on-the-fly as a software-defined disk, and then mounted on the other</font><br> <font class="QuotedText">&gt;side of that interface by the Linux kernel. Turns out that&#x27;s *many</font><br> <font class="QuotedText">&gt;orders of magnitude* faster than any kind of network filesystem like</font><br> <font class="QuotedText">&gt;NFS. It&#x27;s slightly similar to a vvfat for ext4. The less blocks it can</font><br> <font class="QuotedText">&gt;generate and account for and cache, the faster it can run, and</font><br> <font class="QuotedText">&gt;microseconds matter.</font><br> <p> It&#x27;s an unusual use case, but it doesn&#x27;t seem like one which is totally unacceptable. I could imagine using it myself. It would be nice to see it upstreamed to e2fsprogs.<br> </div> Thu, 08 Oct 2020 17:46:29 +0000