flash devices support discard therefore discard is default but not set
in config

Signed-off-by: Changman Lee <cm224....@samsung.com>
---
 lib/libf2fs.c      |    1 +
 mkfs/f2fs_format.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 6947425..9046986 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -364,6 +364,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)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 5b017c7..364bb46 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -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)) {
-- 
1.7.9.5


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to