f2fs: move flush tracepoint
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 3 Feb 2017 00:40:55 +0000 (16:40 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 23 Feb 2017 18:08:43 +0000 (10:08 -0800)
This patch moves the tracepoint location for flush command.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c

index 5c0b59fe9bef924c7a73bae8f95f89566529aa75..2f6d7370904cfb9f57b862d300c3fdeb1efaa95d 100644 (file)
@@ -426,6 +426,9 @@ static int submit_flush_wait(struct f2fs_sb_info *sbi)
        int ret = __submit_flush_wait(sbi->sb->s_bdev);
        int i;
 
+       trace_f2fs_issue_flush(sbi->sb, test_opt(sbi, NOBARRIER),
+                                       test_opt(sbi, FLUSH_MERGE));
+
        if (sbi->s_ndevs && !ret) {
                for (i = 1; i < sbi->s_ndevs; i++) {
                        ret = __submit_flush_wait(FDEV(i).bdev);
@@ -471,9 +474,6 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi)
        struct flush_cmd_control *fcc = SM_I(sbi)->fcc_info;
        struct flush_cmd cmd;
 
-       trace_f2fs_issue_flush(sbi->sb, test_opt(sbi, NOBARRIER),
-                                       test_opt(sbi, FLUSH_MERGE));
-
        if (test_opt(sbi, NOBARRIER))
                return 0;