diff options
author | David Anderson <dvander@google.com> | 2019-12-17 21:06:15 -0800 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2020-01-28 12:04:38 -0800 |
commit | c13586faea2fd1f3ad80e72a48cd41831987c8a7 (patch) | |
tree | 8c10aa364bf407690bba947df16f81da2996d732 /fs_mgr/clean_scratch_files.cpp | |
parent | 077839ab239f0aeae95e0b3814da70f6a0eb9699 (diff) |
remount: Use /data for backing scratch storage.
Currently, this is only enabled for Virtual A/B devices. When /data uses
F2FS, then proper pinning support must be enabled.
Because /data cannot be mounted in recovery, we can't delete the scratch
image backed by /data while in fastbootd. Instead, we mark it as
disabled in /metadata. The remount command now has an init script that
checks for and removes a disabled scratch partition.
Bug: 134949511
Test: adb remount on V A/B device with patched F2FS
Change-Id: Ifc8720378259654472d3822e97059b6c366f601d
Diffstat (limited to 'fs_mgr/clean_scratch_files.cpp')
-rw-r--r-- | fs_mgr/clean_scratch_files.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fs_mgr/clean_scratch_files.cpp b/fs_mgr/clean_scratch_files.cpp new file mode 100644 index 000000000..42fe35a59 --- /dev/null +++ b/fs_mgr/clean_scratch_files.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <fs_mgr_overlayfs.h> + +int main() { + android::fs_mgr::CleanupOldScratchFiles(); + return 0; +} |