aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
authorWanpeng Li <wanpeng.li@linux.intel.com>2015-02-27 02:56:16 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2015-04-10 18:08:28 -0400
commit2bda542d59f970b61095bd8205c6c76062f286e3 (patch)
tree2dbae96c6d3b724fe484db3b90e15e2b1b8717fc /fs/f2fs/checkpoint.c
parentb7f204cca4b7155f47e64555614b1f534a53737e (diff)
f2fs: fix block_ops trace point
block operations is used to flush all dirty node and dentry blocks in the page cache and suspend ordinary writing activities, however, there are some facts such like cp error or mount read-only etc which lead to block operations can't be invoked. Current trace point print block_ops start premature even if block_ops doesn't have opportunity to execute. This patch fix it by move block_ops trace point just before block_ops. Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 4d5e697d82f6..e9f30abbb6fe 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1047,8 +1047,6 @@ void write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
1047 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); 1047 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
1048 unsigned long long ckpt_ver; 1048 unsigned long long ckpt_ver;
1049 1049
1050 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "start block_ops");
1051
1052 mutex_lock(&sbi->cp_mutex); 1050 mutex_lock(&sbi->cp_mutex);
1053 1051
1054 if (!is_sbi_flag_set(sbi, SBI_IS_DIRTY) && 1052 if (!is_sbi_flag_set(sbi, SBI_IS_DIRTY) &&
@@ -1058,6 +1056,9 @@ void write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
1058 goto out; 1056 goto out;
1059 if (f2fs_readonly(sbi->sb)) 1057 if (f2fs_readonly(sbi->sb))
1060 goto out; 1058 goto out;
1059
1060 trace_f2fs_write_checkpoint(sbi->sb, cpc->reason, "start block_ops");
1061
1061 if (block_operations(sbi)) 1062 if (block_operations(sbi))
1062 goto out; 1063 goto out;
1063 1064