* [PATCH] f2fs-tools: make fiemap command in accordance with uapi
@ 2021-07-21 21:12 Daeho Jeong
0 siblings, 0 replies; only message in thread
From: Daeho Jeong @ 2021-07-21 21:12 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel, kernel-team; +Cc: Daeho Jeong
From: Daeho Jeong <daehojeong@google.com>
Made "fiemap" command in accordance with user api manual. So, eliminated
NEW_ADDR print out and made it ends in the last extent.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
tools/f2fs_io/f2fs_io.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index aa1a7e4..42dbd60 100644
--- a/tools/f2fs_io/f2fs_io.c
+++ b/tools/f2fs_io/f2fs_io.c
@@ -757,10 +757,11 @@ static void do_fiemap(int argc, char **argv, const struct cmd_desc *cmd)
die_errno("FIEMAP failed");
phy_addr = fm->fm_extents[0].fe_physical / F2FS_BLKSIZE;
- if (phy_addr == NEW_ADDR)
- printf("NEW_ADDR ");
- else
- printf("%llu ", phy_addr);
+ printf("%llu: %llu\n", fm->fm_start / F2FS_BLKSIZE, phy_addr);
+
+ if (fm->fm_extents[0].fe_flags & FIEMAP_EXTENT_LAST)
+ break;
+
fm->fm_start += F2FS_BLKSIZE;
}
printf("\n");
--
2.32.0.402.g57bb445576-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-21 21:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 21:12 [PATCH] f2fs-tools: make fiemap command in accordance with uapi Daeho Jeong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).