mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
f2fs-tools: discard is default but not set in config
flash devices support discard therefore discard is default but not set in config Signed-off-by: Changman Lee <cm224.lee@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
parent
cd1e4704d0
commit
b155ea8e18
@ -371,6 +371,7 @@ void f2fs_init_configuration(struct f2fs_configuration *c)
|
||||
c->heap = 1;
|
||||
c->vol_label = "";
|
||||
c->device_name = NULL;
|
||||
c->trim = 1;
|
||||
}
|
||||
|
||||
static int is_mounted(const char *mpt, const char *device)
|
||||
|
@ -917,6 +917,7 @@ int f2fs_trim_device()
|
||||
return -1;
|
||||
}
|
||||
|
||||
MSG(0, "Info: Discarding device\n");
|
||||
if (S_ISREG(stat_buf.st_mode))
|
||||
return 0;
|
||||
else if (S_ISBLK(stat_buf.st_mode)) {
|
||||
|
Loading…
Reference in New Issue
Block a user