)]}'
{
  "commit": "00fbc4047bd6a1984c333b93fc39e73e61a2521a",
  "tree": "1ea128bd50230a40a75363a590a6af1d07301d2c",
  "parents": [
    "c5e25a99840aeb9b60e914287573bdef16fcb292"
  ],
  "author": {
    "name": "Richard Neill",
    "email": "richard.neill@arm.com",
    "time": "Tue Mar 05 16:18:14 2024 +0000"
  },
  "committer": {
    "name": "Jiakai Zhang",
    "email": "jiakaiz@google.com",
    "time": "Mon Mar 25 15:01:42 2024 +0000"
  },
  "message": "Add and use FdFile::Rename on Android V+\n\nAdd the ability to change a file\u0027s path via the Rename function, and use\nit when installing staging files during odrefresh. As the moved file\nrequires its SELinux label updated via `selinux_android_restorecon`\nwhich odrefresh requires an updated SELinux policy to use, only perform\nthe rename on Android V+ and otherwise fallback to the existing copy and\ndelete approach.\n\nOn linux, the rename syscall requires the source and destination to be\non the same mounted filesystem. As this approach does not modify the\nfile\u0027s contents, this has the added benefit of ensuring the sparsity of\nthe resulting file in the destination path is preserved, thereby saving\ndisk space on systems that support sparse files.\n\nAs rename applies changes to parent directory metadata, FdFile now\nsupports flushing metadata in addition to data (via fsync), as well as\nallowing read-only file descriptors to be flushed (required for\ndirectories).\n\nBug: 323906594\n\nTested on oriole and shiba (ext4 and f2fs):\nTest: odrefresh --force-compile\nTest: art/tools/run-gtests.sh\n\nChange-Id: I1d017552fbffcc728cac7a55a14d4d17d1770cb8\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c5307e249b8c6f8e09ce5eb617b582da998d276c",
      "old_mode": 33188,
      "old_path": "libartbase/base/unix_file/fd_file.cc",
      "new_id": "f5f20214f59a7df6a9c8bf66a85411a6b87d9d43",
      "new_mode": 33188,
      "new_path": "libartbase/base/unix_file/fd_file.cc"
    },
    {
      "type": "modify",
      "old_id": "39471010df1173e0362f8c88e794ea272c58a824",
      "old_mode": 33188,
      "old_path": "libartbase/base/unix_file/fd_file.h",
      "new_id": "5e09373b590cc0d4b4a7b719c84a7082cad1f518",
      "new_mode": 33188,
      "new_path": "libartbase/base/unix_file/fd_file.h"
    },
    {
      "type": "modify",
      "old_id": "92f8308b8c6133ff0e7b5047f5ab5e6083220b85",
      "old_mode": 33188,
      "old_path": "libartbase/base/unix_file/fd_file_test.cc",
      "new_id": "433e3084b01df84b6c8a810b1f72ed6b092713ab",
      "new_mode": 33188,
      "new_path": "libartbase/base/unix_file/fd_file_test.cc"
    },
    {
      "type": "modify",
      "old_id": "c87629df77fb0317cebf710d46c2780f6f8c3aff",
      "old_mode": 33188,
      "old_path": "odrefresh/odrefresh.cc",
      "new_id": "9a3f9f67cb1b8445b8f6d1ac951fbe6125abd4cc",
      "new_mode": 33188,
      "new_path": "odrefresh/odrefresh.cc"
    }
  ]
}
