summaryrefslogtreecommitdiff
path: root/libartbase/base/bit_vector.cc
diff options
context:
space:
mode:
author Richard Neill <richard.neill@arm.com> 2024-03-05 16:18:14 +0000
committer Jiakai Zhang <jiakaiz@google.com> 2024-03-25 15:01:42 +0000
commit00fbc4047bd6a1984c333b93fc39e73e61a2521a (patch)
tree1ea128bd50230a40a75363a590a6af1d07301d2c /libartbase/base/bit_vector.cc
parentc5e25a99840aeb9b60e914287573bdef16fcb292 (diff)
Add and use FdFile::Rename on Android V+
Add the ability to change a file's path via the Rename function, and use it when installing staging files during odrefresh. As the moved file requires its SELinux label updated via `selinux_android_restorecon` which odrefresh requires an updated SELinux policy to use, only perform the rename on Android V+ and otherwise fallback to the existing copy and delete approach. On linux, the rename syscall requires the source and destination to be on the same mounted filesystem. As this approach does not modify the file's contents, this has the added benefit of ensuring the sparsity of the resulting file in the destination path is preserved, thereby saving disk space on systems that support sparse files. As rename applies changes to parent directory metadata, FdFile now supports flushing metadata in addition to data (via fsync), as well as allowing read-only file descriptors to be flushed (required for directories). Bug: 323906594 Tested on oriole and shiba (ext4 and f2fs): Test: odrefresh --force-compile Test: art/tools/run-gtests.sh Change-Id: I1d017552fbffcc728cac7a55a14d4d17d1770cb8
Diffstat (limited to 'libartbase/base/bit_vector.cc')
0 files changed, 0 insertions, 0 deletions