f2fs: Fix bad unlock balance detected.
A message that is not in the archive (sent off-list or not yet received): [email protected]
The blocked means gc can't proceed anymore due to not enough free sections.
Look at the f2fs_gc -> do_garbage_collect -> gc_node_segment and gc_data_segment. Before returning GC_BLOCKED as gc_status, mutex_lock(&sbi->cp_mutex) and blokc_operation(sbi) is called. So unblock_operations should always be called.
Quoted 14 lines · majianpeng
Only !blocked is true,it can call the
unblock_operationsin funcwrite_checkpoint.Signed-off-by Jianpeng Ma <[email protected]>--- fs/f2fs/checkpoint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)fs/f2fs/checkpoint.c +0
-0@@ -760,8 +760,10 @@ void write_checkpoint(struct f2fs_sb_info *sbi, bool blocked, bool is_umount)/* unlock all the fs_lock[] in do_checkpoint() */ do_checkpoint (sbi, is_umount);
fs/f2fs/checkpoint.c void write_checkpoint(struct f2fs_sb_info *sbi, bool blocked, bool is_umount) · line 769
Quoted 10 lines
fs/f2fs/checkpoint.c +4
-2-unblock_operations (sbi); -mutex_unlock (&sbi->cp_mutex); +if (!blocked) { +unblock_operations (sbi); +mutex_unlock (&sbi->cp_mutex); + } }void init_orphan_info (struct f2fs_sb_info *sbi)
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html