)]}'
{
  "commit": "d589b6afab60a4cfc5723c04ae83183a4487ec7e",
  "tree": "fd404d8cdda2f86a1298aaa85b15a3946770e597",
  "parents": [
    "5d1bf6ab597d1ebfc4284bcb7df6648c17535464"
  ],
  "author": {
    "name": "Jan Schär",
    "email": "jan@monogon.tech",
    "time": "Mon Nov 11 14:55:38 2024 +0100"
  },
  "committer": {
    "name": "Jan Schär",
    "email": "jan@monogon.tech",
    "time": "Tue Nov 12 16:14:55 2024 +0000"
  },
  "message": "osbase/fat32: fix corrupted directories\n\nPreviously, after writing the contents of a file or directory, any\nremaining space in the last cluster was left as is instead of zeroed.\nFor files this may be acceptable, but directories do not have an\nexplicit size in bytes. The result is that, if the device was not zeroed\nbefore writing the FAT32, each directory contains some number of\nadditional garbage entries, with a random name, size, and initial\ncluster.\n\nThe fix is to ensure that the last cluster of a directory is filled up\nwith zeroes, following the FAT32 spec (page 24): \"initialize all bytes\nof that cluster to 0\". The change also applies to files, where zeroing\nthe remainder of the last cluster should not be necessary, but also\ndoesn\u0027t hurt. At most 32 KiB of zeroes (the maximum cluster size) will\nbe written for each file.\n\nThe fsck test is extended to initialize the file with random bytes.\nWithout the fix, this results in fsck reporting a large number of\nproblems.\n\nChange-Id: I7729e028c92bfad9b879a4256f3fa4f7af25553a\nReviewed-on: https://review.monogon.dev/c/monogon/+/3607\nReviewed-by: Lorenz Brun \u003clorenz@monogon.tech\u003e\nTested-by: Jenkins CI\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e0d460fef4a17a3d0fbe70f33c7daa81c894dd14",
      "old_mode": 33188,
      "old_path": "osbase/fat32/fat32.go",
      "new_id": "65f03e535578251e6cbd56f67ce1d8ff60864c42",
      "new_mode": 33188,
      "new_path": "osbase/fat32/fat32.go"
    },
    {
      "type": "modify",
      "old_id": "dde39784a594a814a2dd245b07c8bca790840c89",
      "old_mode": 33188,
      "old_path": "osbase/fat32/fsck_test.go",
      "new_id": "4b5f97d155e4c9baf7f209df0d9ea427ab017afb",
      "new_mode": 33188,
      "new_path": "osbase/fat32/fsck_test.go"
    }
  ]
}
