summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/data.c4
-rw-r--r--fs/f2fs/f2fs.h1
-rw-r--r--fs/f2fs/super.c2
-rw-r--r--include/trace/events/f2fs.h3
4 files changed, 6 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 73fcafbc8191..5469547142e7 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1472,7 +1472,7 @@ static void f2fs_map_lock(struct f2fs_sb_info *sbi,
{
f2fs_down_read(&sbi->cp_enable_rwsem);
if (flag == F2FS_GET_BLOCK_PRE_AIO)
- f2fs_down_read(&sbi->node_change);
+ f2fs_down_read_trace(&sbi->node_change, lc);
else
f2fs_lock_op(sbi, lc);
}
@@ -1482,7 +1482,7 @@ static void f2fs_map_unlock(struct f2fs_sb_info *sbi,
int flag)
{
if (flag == F2FS_GET_BLOCK_PRE_AIO)
- f2fs_up_read(&sbi->node_change);
+ f2fs_up_read_trace(&sbi->node_change, lc);
else
f2fs_unlock_op(sbi, lc);
f2fs_up_read(&sbi->cp_enable_rwsem);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 58244bb87fef..8f6a255f9e57 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -176,6 +176,7 @@ enum device_allocation_policy {
enum f2fs_lock_name {
LOCK_NAME_NONE,
LOCK_NAME_CP_RWSEM,
+ LOCK_NAME_NODE_CHANGE,
};
/*
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index d70567b48d12..247638b98cfb 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4897,7 +4897,7 @@ try_onemore:
mutex_init(&sbi->writepages);
init_f2fs_rwsem(&sbi->cp_global_sem);
init_f2fs_rwsem(&sbi->node_write);
- init_f2fs_rwsem(&sbi->node_change);
+ init_f2fs_rwsem_trace(&sbi->node_change, sbi, LOCK_NAME_NODE_CHANGE);
spin_lock_init(&sbi->stat_lock);
init_f2fs_rwsem_trace(&sbi->cp_rwsem, sbi, LOCK_NAME_CP_RWSEM);
init_f2fs_rwsem(&sbi->cp_enable_rwsem);
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index f4f13ddbe104..d472f47eedec 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -186,7 +186,8 @@ TRACE_DEFINE_ENUM(CP_PHASE_FINISH_CHECKPOINT);
#define show_lock_name(lock) \
__print_symbolic(lock, \
- { LOCK_NAME_CP_RWSEM, "cp_rwsem" })
+ { LOCK_NAME_CP_RWSEM, "cp_rwsem" }, \
+ { LOCK_NAME_NODE_CHANGE, "node_change" })
struct f2fs_sb_info;
struct f2fs_io_info;