From 99e3964e0deb2f6ded9624262bcbd8b077963f7d Mon Sep 17 00:00:00 2001 From: Jin Qian Date: Thu, 27 Jul 2017 16:17:17 -0700 Subject: [PATCH] fastboot: enable uninit_bg for ext4 This speeds up mke2fs as well as e2fsck. Bug: 23686092 Bug: 64032335 Change-Id: I9f2d4c15e431647bb845d50a2361b2a9a091fba6 --- fastboot/fs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp index f3c000eb7..6058b882d 100644 --- a/fastboot/fs.cpp +++ b/fastboot/fs.cpp @@ -91,6 +91,8 @@ static int generate_ext4_image(const char* fileName, long long partSize, } mke2fs_args.push_back("-E"); mke2fs_args.push_back(ext_attr.c_str()); + mke2fs_args.push_back("-O"); + mke2fs_args.push_back("uninit_bg"); mke2fs_args.push_back(fileName); std::string size_str = std::to_string(partSize / block_size);