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:
Changman Lee 2013-08-31 08:41:31 +09:00 committed by Jaegeuk Kim
parent cd1e4704d0
commit b155ea8e18
2 changed files with 2 additions and 0 deletions

View File

@ -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)

View File

@ -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)) {