Signed-off-by: Jaegeuk Kim <[email protected]>
---
 tools/f2fs_io/f2fs_io.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 2bd5fd001b82..1f6bfcfff556 100644
--- a/tools/f2fs_io/f2fs_io.c
+++ b/tools/f2fs_io/f2fs_io.c
@@ -160,6 +160,7 @@ static u64 get_current_us()
 static void do_fsync(int argc, char **argv, const struct cmd_desc *cmd)
 {
        int fd;
+       u64 total_time;
 
        if (argc != 2) {
                fputs("Excess arguments\n\n", stderr);
@@ -169,10 +170,12 @@ static void do_fsync(int argc, char **argv, const struct 
cmd_desc *cmd)
 
        fd = xopen(argv[1], O_WRONLY, 0);
 
+       total_time = get_current_us();
        if (fsync(fd) != 0)
                die_errno("fsync failed");
 
-       printf("fsync a file\n");
+       printf("fsync total_time = %"PRIu64" us\n",
+                       get_current_us() - total_time);
        exit(0);
 }
 
-- 
2.51.0.618.g983fd99d29-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to