)]}'
{
  "commit": "e0db72ca567b5142bb6a31d745b3bf78cd8eb53a",
  "tree": "9182fda3cfa5e5f407969f66d7ca01ff5dbd5734",
  "parents": [
    "16298986aba754618473fe7658f74c8ebe28ee7e"
  ],
  "author": {
    "name": "Jan Schär",
    "email": "jan@monogon.tech",
    "time": "Wed Jun 18 18:14:07 2025 +0000"
  },
  "committer": {
    "name": "Jan Schär",
    "email": "jan@monogon.tech",
    "time": "Wed Jun 25 15:37:52 2025 +0000"
  },
  "message": "osbase/blockdev: implement copy_file_range optimization\n\nThis change enables the use of the copy_file_range syscall on Linux when\ncopying from an os.File to a blockdev.File. This speeds up building of\nsystem images, especially with a file system which supports reflinks.\n\nThe implementation is partially based on the implementation in the Go\nstandard library for copy_file_range between two os.File in\nsrc/os/zero_copy_linux.go and src/internal/poll/copy_file_range_unix.go.\nWe can\u0027t use that implementation, because it only supports using the\nfile offset for both source and destination, but we want to provide the\ndestination offset as an argument. To support this, the ReaderFromAt\ninterface is introduced.\n\nWith these changes, copy_file_range is now used when building system\nimages, for both the rootfs and files on the FAT32 boot partition. If\nthe file system supports it (e.g. XFS), reflinks will be used for the\nrootfs, which means no data is copied. For files on the FAT32 partition,\nreflinks probably can\u0027t be used, because these are only aligned to 512\nbytes but would need to be aligned to 4096 bytes on my system for\nreflinking.\n\nChange-Id: Ie42b5834e6d3f63a5cc1f347d2681d8a6bb5c006\nReviewed-on: https://review.monogon.dev/c/monogon/+/4293\nTested-by: Jenkins CI\nReviewed-by: Lorenz Brun \u003clorenz@monogon.tech\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5eb7fe80e42001625007d4fd54c1ed31f951abf4",
      "old_mode": 33188,
      "old_path": "osbase/blockdev/blockdev.go",
      "new_id": "9877186267d69f7ac0cc63fea6fc86060035ff3d",
      "new_mode": 33188,
      "new_path": "osbase/blockdev/blockdev.go"
    },
    {
      "type": "modify",
      "old_id": "fbcbf5b84062965e3f9b2fa159f561882576120c",
      "old_mode": 33188,
      "old_path": "osbase/blockdev/blockdev_linux.go",
      "new_id": "ab9c96b5769c3f5b351c35ea27ae7002e7a6e02d",
      "new_mode": 33188,
      "new_path": "osbase/blockdev/blockdev_linux.go"
    },
    {
      "type": "modify",
      "old_id": "9cbf027b6ac049c4b9c6c9dac2a2e1781e86a64a",
      "old_mode": 33188,
      "old_path": "osbase/blockdev/blockdev_linux_test.go",
      "new_id": "b61c1eebe9f3d1e83d1da75117291a3309f96f16",
      "new_mode": 33188,
      "new_path": "osbase/blockdev/blockdev_linux_test.go"
    },
    {
      "type": "modify",
      "old_id": "611c2eddce01202c30be9b47d18beb426dc26a75",
      "old_mode": 33188,
      "old_path": "osbase/build/mkimage/osimage/osimage.go",
      "new_id": "5b17e6bed3bfd2a96544f81713694a523380e57d",
      "new_mode": 33188,
      "new_path": "osbase/build/mkimage/osimage/osimage.go"
    },
    {
      "type": "modify",
      "old_id": "8ddb1627219f8c1e2448b14237b4b85adf8905a9",
      "old_mode": 33188,
      "old_path": "osbase/fat32/utils.go",
      "new_id": "309ecf6525d9444b3cdeaf7d74a44f33d63a5695",
      "new_mode": 33188,
      "new_path": "osbase/fat32/utils.go"
    }
  ]
}
