提交 c608f25c 编写于 作者: Z Zheng Yongjun

Delete resize.f2fs option to avoid potential inode fault

How to reproduce?
mkdir /data/temp; dd if=/dev/zero of=/data/temp/image bs=1G count=5

what happend?
```
cd /data/
ls -al
total 33
drwxrwx--x 25 system system 4096 2017-08-07 12:56 .
drwxr-xr-x 16 root   root   4096 2022-08-29 13:15 ..
drwxrwx--x  6 system system 3488 2017-08-07 12:55 app
d?????????  ? ?      ?         ?                ? app-staging
d?????????  ? ?      ?         ?                ? bluetooth
d?????????  ? ?      ?         ?                ? chipset
drwxrwx--x  3 system system 3488 2017-08-07 12:55 data
d?????????  ? ?      ?         ?                ? dhcp
d?????????  ? ?      ?         ?                ? ethernet
d?????????  ? ?      ?         ?                ? local
drwxrwx---  2 gps    gps    3488 2017-08-07 12:55 location
drwxrwxr-x  9 system log    3488 2017-08-07 12:55 log
drwxrwx--t  3 system misc   3488 2017-08-07 12:55 misc
d?????????  ? ?      ?         ?                ? misc_ce
d?????????  ? ?      ?         ?                ? misc_de
d?????????  ? ?      ?         ?                ? nfc
d?????????  ? ?      ?         ?                ? ota_package
drwx--x--x  5 root   root   3488 2017-08-07 12:55 service
d?????????  ? ?      ?         ?                ? system
d?????????  ? ?      ?         ?                ? system_ce
d?????????  ? ?      ?         ?                ? system_de
drwxrwxrwx  2 root   root   3488 2017-08-07 12:56 temp
d?????????  ? ?      ?         ?                ? user
d?????????  ? ?      ?         ?                ? user_de
d?????????  ? ?      ?         ?                ? vendor
```
After this patch, this problem fixed.
Signed-off-by: NZheng Yongjun <zhengyongjun3@huawei.com>
上级 fa8e9f71
......@@ -167,7 +167,7 @@ static int DoResizeF2fs(const char* device, const unsigned long long size)
int ret = 0;
if (size <= 0) {
char *cmd[] = {
file, "-s", (char *)device, NULL
file, (char *)device, NULL
};
int argc = ARRAY_LENGTH(cmd);
char **argv = (char **)cmd;
......@@ -178,7 +178,7 @@ static int DoResizeF2fs(const char* device, const unsigned long long size)
char sizeStr[RESIZE_BUFFER_SIZE] = {0};
sprintf_s(sizeStr, RESIZE_BUFFER_SIZE, "%llu", realSize);
char *cmd[] = {
file, "-s", "-t", sizeStr, (char *)device, NULL
file, "-t", sizeStr, (char *)device, NULL
};
int argc = ARRAY_LENGTH(cmd);
char **argv = (char **)cmd;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册