From: Daeho Jeong <[email protected]> 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 <[email protected]> --- 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 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
