All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs: assert page dirty bit
@ 2018-09-11 22:06 Liu Bo
  2018-09-12  6:38 ` Nikolay Borisov
  2018-09-13 17:46 ` [PATCH v2] " Liu Bo
  0 siblings, 2 replies; 6+ messages in thread
From: Liu Bo @ 2018-09-11 22:06 UTC (permalink / raw)
  To: linux-btrfs

Just in case that someone breaks the rule that pages are dirty as long
as eb is dirty.

Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
---
 fs/btrfs/extent_io.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index fb2bf50134a1..99895f196ecb 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5184,6 +5184,11 @@ bool set_extent_buffer_dirty(struct extent_buffer *eb)
 			set_page_dirty(eb->pages[i]);
 	}
 
+#ifdef BTRFS_DEBUG
+	for (i = 0; i < num_pages; i++)
+		ASSERT(PageDirty(eb->pages[i]));
+#endif
+
 	return was_dirty;
 }
 
-- 
1.8.3.1

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

end of thread, other threads:[~2018-09-14 18:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 22:06 [PATCH] Btrfs: assert page dirty bit Liu Bo
2018-09-12  6:38 ` Nikolay Borisov
2018-09-12 19:28   ` Liu Bo
2018-09-13 17:46 ` [PATCH v2] " Liu Bo
2018-09-14  6:24   ` Nikolay Borisov
2018-09-14 12:55   ` David Sterba

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.