1. 21

  2. 15

    There’s a comment about a temporary fix in OpenBSD’s ffs, from src/sys/ufs/ffs/ffs_vfsops.c:

    1359         /*
    1360          * Ensure that uid and gid are correct. This is a temporary
    1361          * fix until fsck has been changed to do the update.
    1362          */

    It was present in OpenBSD’s first commit – the import of the NetBSD tree – in 1995. NetBSD imported it from BSD4.4-Lite in 1994. From the unix history repo, it was committed by Kirk McKusick in July 1992.

    The code below the comment has been changed a few times in both NetBSD and OpenBSD (due to eg. name changes in the struct), but the functionality of the “temporary” fix and the comment has stayed the same.

    1. 5

      Filesystem code does tend to sustain compat code for a very long time. Nobody is quite certain how to answer, what’s the oldest disk somebody might try to mount? One can ask similar questions, like who in the world still needs to include malloc.h, but the tools needed to resolve those errors (text editor) are widely available and accessible, compared to tools to update disk formats.

    2. 13

      In illumos, we try to encourage comments to reflect the current state of the code. You can describe something as unfortunate, which it likely will still be in 20 years; describing something as temporary doesn’t really set the right tone, and usually turns out (as here) to be wrong in the end.

      1. 3

        Ooh, nice. Stealing this idea, thank you.

      2. 7

        Well, Atari did not release too much new hardware lately, so why bother changing it? w/o the comment the author of the blog would not even know that it was a workaround…