From edee8361d75715b9bc020d76fa8f38b005a6e912 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 16 May 2018 13:43:22 -0700 Subject: recovery: add --fsck_unshare_blocks option for adb remount Allow "adb remount" on deduplicated filesystems to reboot into recovery and run e2fsck to undo deduplication. The e2fsck binary is copied from the system partition into tmpfs, and the system partition is unmounted so e2fsck can run safely. Bug: 64109868 Test: recovery with --fsck_unshare_blocks; adb remount Change-Id: I7558749b018b58f3c4339e51a95831dbd5be1ae3 --- fsck_unshare_blocks.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 fsck_unshare_blocks.h (limited to 'fsck_unshare_blocks.h') diff --git a/fsck_unshare_blocks.h b/fsck_unshare_blocks.h new file mode 100644 index 000000000..9de8ef9a3 --- /dev/null +++ b/fsck_unshare_blocks.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2018 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. + */ + +#ifndef _FILESYSTEM_CMDS_H +#define _FILESYSTEM_CMDS_H + +bool do_fsck_unshare_blocks(); + +#endif // _FILESYSTEM_CMDS_H -- cgit v1.2.3