We need to check the first disk only, and trim the other disks.

Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org>
---
 mkfs/f2fs_format_utils.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mkfs/f2fs_format_utils.c b/mkfs/f2fs_format_utils.c
index 597c2b3a7b1c..448fbaa8866e 100644
--- a/mkfs/f2fs_format_utils.c
+++ b/mkfs/f2fs_format_utils.c
@@ -129,6 +129,10 @@ static bool is_wiped_device(int i)
        int nblocks = 4096;     /* 16MB size */
        int j;
 
+       /* let's trim the other devices except the first device */
+       if (i > 0)
+               return false;
+
        buf = malloc(F2FS_BLKSIZE);
        if (buf == NULL) {
                MSG(1, "\tError: Malloc Failed for buf!!!\n");
-- 
2.39.1.519.gcb327c4b5f-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to