commit 641be3225901d2e94262f3ff131a07315eb501c2 (patch)
parent 3835fef f2fs-tools: fix # of total segments
tree 2476d3a6e785f9e74df1c2cc0a503d09a40fb001
author Jaegeuk Kim <jaegeuk@kernel.org> 2023-02-08 11:24:41 -0800
committer Jaegeuk Kim <jaegeuk@kernel.org> 2023-02-15 08:34:57 -0800
mkfs.f2fs: trim all the devices except the first one
We need to check the first disk only, and trim the other disks.
Signed-off-by: Jaegeuk Kim <jaegeuk@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 597c2b3..448fbaa 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");
glossary
--------
Commit objects reference one tree, and zero or more parents.
Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.
Multiple parents means the commit is a merge.
Root commits have no ancestor. Note that it is
possible to have multiple root commits when merging independent histories.
Every commit references one top-level tree object.
git clone https://yhbt.net/lore/pub/scm/linux/kernel/git/chao/f2fs-tools.git