diff options
author | Yusuke Sato <yusukes@google.com> | 2015-07-08 14:57:07 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-05-05 18:36:06 -0700 |
commit | 784c22c8388e50db243ac4ca3871747cd3eefadc (patch) | |
tree | cd61ce81b20696711d1cb566d984a3ff7b910c48 /fs_mgr | |
parent | 0d6557ec30fc8c3e06badcae93efff1ee5f6b6a1 (diff) | |
download | system_core-784c22c8388e50db243ac4ca3871747cd3eefadc.zip system_core-784c22c8388e50db243ac4ca3871747cd3eefadc.tar.gz system_core-784c22c8388e50db243ac4ca3871747cd3eefadc.tar.bz2 |
Use fsck.f2fs -a instead of -f for faster boot
and run fsck with -f on clean shutdown instead.
With -f, fsck.f2fs always performs a full scan of the /data
partition regardless of whether the partition is clean or not.
The full scan takes more than 2 seconds on volantis-userdebug
and delays the OS boot.
With -a, the command does almost nothing when the partition
is clean and finishes within 20-30ms on volantis-userdebug.
When the partition has an error or its check point has
CP_FSCK_FLAG (aka "need_fsck"), the command does exactly the
same full scan as -f to fix it.
Bug: 21853106
Change-Id: I126263caf34c0f5bb8f5e6794454d4e72526ce38
Diffstat (limited to 'fs_mgr')
-rw-r--r-- | fs_mgr/fs_mgr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c index 6e20560..e78b581 100644 --- a/fs_mgr/fs_mgr.c +++ b/fs_mgr/fs_mgr.c @@ -163,10 +163,10 @@ static void check_fs(char *blk_device, char *fs_type, char *target) } else if (!strcmp(fs_type, "f2fs")) { char *f2fs_fsck_argv[] = { F2FS_FSCK_BIN, - "-f", + "-a", blk_device }; - INFO("Running %s -f %s\n", F2FS_FSCK_BIN, blk_device); + INFO("Running %s -a %s\n", F2FS_FSCK_BIN, blk_device); ret = android_fork_execvp_ext(ARRAY_SIZE(f2fs_fsck_argv), f2fs_fsck_argv, &status, true, LOG_KLOG | LOG_FILE, |