← Back to context

Comment by layer8

14 hours ago

As the submission explains, the lost+found folder has pre-allocated space for the directory entries. From the mklost+found man page [0]:

       mklost+found pre-allocates disk blocks to the lost+found directory
       so that when e2fsck(8) is being run to recover a file system, it
       does not need to allocate blocks in the file system to store a
       large number of unlinked files.  This ensures that e2fsck will not
       have to allocate data blocks in the file system during recovery.

Pre-allocating space without making the directory visible would require more arcane file system magic.

[0] https://man7.org/linux/man-pages/man8/mklost+found.8.html

> Preallocating space without making the directory visible would require more arcane file system magic.

If those filesystem engineers had a manager that said: make this nice for the user, then it would have been done.

But these developers had no managers and were OK eating their own unpalatable dogfood.

  • You greatly overestimate the capabilities of computers of the era that this originated in. Major limitations of disk space, speed and addressability combined with limited CPU power and RAM mean that your hypothetical, “it could have been done” would require a significant investment in development and runtime resources all to avoid having a directory in root that would be empty until after a post-crash recovery.

    Also remember that these systems would have all been multi-user time-sharing systems, not desktop computers.

    • Sorry, but I just don't believe all this. We're talking about hiding a folder. Of course the developers could do that.