All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] f2fs: detect bug_on in f2fs_wait_discard_bios
@ 2018-07-08 14:16 Chao Yu
  2018-07-08 14:16 ` [PATCH 2/5] f2fs: clean up with IS_INODE() Chao Yu
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Chao Yu @ 2018-07-08 14:16 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu

From: Chao Yu <yuchao0@huawei.com>

Add bug_on to detect potential non-empty discard wait list.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index cbf8f3f9a8e7..e55188975fcc 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1495,6 +1495,8 @@ bool f2fs_wait_discard_bios(struct f2fs_sb_info *sbi)
 
 	/* just to make sure there is no pending discard commands */
 	__wait_all_discard_cmd(sbi, NULL);
+
+	f2fs_bug_on(sbi, atomic_read(&dcc->discard_cmd_cnt));
 	return dropped;
 }
 
-- 
2.16.2.17.g38e79b1fd

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-08 14:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-08 14:16 [PATCH 1/5] f2fs: detect bug_on in f2fs_wait_discard_bios Chao Yu
2018-07-08 14:16 ` [PATCH 2/5] f2fs: clean up with IS_INODE() Chao Yu
2018-07-08 14:16 ` [PATCH 3/5] f2fs: fix to do sanity check with i_extra_isize Chao Yu
2018-07-08 14:16   ` Chao Yu
2018-07-08 14:16 ` [PATCH 4/5] f2fs: fix to do sanity check with cp_pack_start_sum Chao Yu
2018-07-08 14:16   ` Chao Yu
2018-07-08 14:16 ` [PATCH 5/5] f2fs: fix to propagate error from __get_meta_page() Chao Yu
2018-07-08 14:16   ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.