diff options
author | Jaegeuk Kim <jaegeuk@google.com> | 2018-03-28 12:43:17 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@google.com> | 2018-04-04 09:24:24 -0700 |
commit | e2596bfed53a47301304cd35278179a812916173 (patch) | |
tree | 7b504fee14e66ae649c454092e0f40f7d24fd386 /fs_mgr | |
parent | a10d40e2b2a6132b7e06397f62ac07a4d9bfb5e1 (diff) | |
download | system_core-e2596bfed53a47301304cd35278179a812916173.tar.gz system_core-e2596bfed53a47301304cd35278179a812916173.tar.bz2 system_core-e2596bfed53a47301304cd35278179a812916173.zip |
make_f2fs: specify sector size for target image size and missing options
The total sectors that we want to format is used in different meanings from
various users. This notifies its size based on 4096 bytes explicitly.
Bug: 76407663
Change-Id: I4e00f2e2289c1381f0238d2a4acb606a0ab551a9
Merged-In: I4e00f2e2289c1381f0238d2a4acb606a0ab551a9
Reported-by: katao@xiaomi.com
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Diffstat (limited to 'fs_mgr')
-rw-r--r-- | fs_mgr/fs_mgr_format.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs_mgr/fs_mgr_format.cpp b/fs_mgr/fs_mgr_format.cpp index 85a593f19..63a6839c5 100644 --- a/fs_mgr/fs_mgr_format.cpp +++ b/fs_mgr/fs_mgr_format.cpp @@ -114,8 +114,19 @@ static int format_f2fs(char *fs_blkdev, uint64_t dev_sz, bool crypt_footer) } std::string size_str = std::to_string(dev_sz / 4096); + // clang-format off const char* const args[] = { - "/system/bin/make_f2fs", "-f", "-O", "encrypt", fs_blkdev, size_str.c_str(), nullptr}; + "/system/bin/make_f2fs", + "-d1", + "-f", + "-O", "encrypt", + "-O", "quota", + "-w", "4096", + fs_blkdev, + size_str.c_str(), + nullptr + }; + // clang-format on return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), NULL, true, LOG_KLOG, true, nullptr, nullptr, 0); |