All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bounce:fix bug, avoid to flush dcache on slab page from jbd2.
@ 2013-03-08 12:37 ` Shuge
  0 siblings, 0 replies; 74+ messages in thread
From: Shuge @ 2013-03-08 12:37 UTC (permalink / raw)
  To: linux-kernel, linux-mm, linux-ext4
  Cc: Kevin, Jan Kara, Theodore Ts'o, Jens Axboe

The bounce accept slab pages from jbd2, and flush dcache on them.
When enabling VM_DEBUG, it will tigger VM_BUG_ON in page_mapping().
So, check PageSlab to avoid it in __blk_queue_bounce().

Bug URL: http://lkml.org/lkml/2013/3/7/56

Signed-off-by: shuge <shuge@allwinnertech.com>
---
  mm/bounce.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/bounce.c b/mm/bounce.c
index 4e9ae72..f352c03 100644
--- a/mm/bounce.c
+++ b/mm/bounce.c
@@ -214,7 +214,8 @@ static void __blk_queue_bounce(struct request_queue 
*q, struct bio **bio_orig,
  		if (rw == WRITE) {
  			char *vto, *vfrom;
  -			flush_dcache_page(from->bv_page);
+			if (unlikely(!PageSlab(from->bv_page)))
+				flush_dcache_page(from->bv_page);
  			vto = page_address(to->bv_page) + to->bv_offset;
  			vfrom = kmap(from->bv_page) + from->bv_offset;
  			memcpy(vto, vfrom, to->bv_len);
-- 
1.7.9.5


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

end of thread, other threads:[~2013-04-09 18:05 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-08 12:37 [PATCH] bounce:fix bug, avoid to flush dcache on slab page from jbd2 Shuge
2013-03-08 12:37 ` Shuge
2013-03-12 22:32 ` Andrew Morton
2013-03-12 22:32   ` Andrew Morton
2013-03-13  1:10   ` Darrick J. Wong
2013-03-13  1:10     ` Darrick J. Wong
2013-03-13  1:10     ` Darrick J. Wong
2013-03-13  3:35     ` Shuge
2013-03-13  3:35       ` Shuge
2013-03-13  3:35       ` Shuge
2013-03-13  4:11       ` Andrew Morton
2013-03-13  4:11         ` Andrew Morton
2013-03-13  4:11         ` Andrew Morton
2013-03-13  9:42         ` Russell King - ARM Linux
2013-03-13  9:42           ` Russell King - ARM Linux
2013-03-13  9:42           ` Russell King - ARM Linux
2013-03-13  8:50     ` Jan Kara
2013-03-13  8:50       ` Jan Kara
2013-03-13  8:50       ` Jan Kara
2013-03-13 19:44       ` Darrick J. Wong
2013-03-13 19:44         ` Darrick J. Wong
2013-03-13 19:44         ` Darrick J. Wong
2013-03-13 21:02         ` Jan Kara
2013-03-13 21:02           ` Jan Kara
2013-03-13 21:02           ` Jan Kara
2013-03-14 22:42           ` Darrick J. Wong
2013-03-14 22:42             ` Darrick J. Wong
2013-03-14 22:42             ` Darrick J. Wong
2013-03-14 23:01             ` Andrew Morton
2013-03-14 23:01               ` Andrew Morton
2013-03-14 23:01               ` Andrew Morton
2013-03-15 10:01             ` Jan Kara
2013-03-15 10:01               ` Jan Kara
2013-03-15 10:01               ` Jan Kara
2013-03-15 17:54               ` Darrick J. Wong
2013-03-15 17:54                 ` Darrick J. Wong
2013-03-15 17:54                 ` Darrick J. Wong
2013-03-18 17:32                 ` Jan Kara
2013-03-18 17:32                   ` Jan Kara
2013-03-18 17:32                   ` Jan Kara
2013-03-15 23:28               ` [PATCH] mm: Make snapshotting pages for stable writes a per-bio operation Darrick J. Wong
2013-03-15 23:28                 ` Darrick J. Wong
2013-03-15 23:28                 ` Darrick J. Wong
2013-03-18 17:41                 ` Jan Kara
2013-03-18 17:41                   ` Jan Kara
2013-03-18 17:41                   ` Jan Kara
2013-03-18 23:01                   ` Darrick J. Wong
2013-03-18 23:01                     ` Darrick J. Wong
2013-03-18 23:01                     ` Darrick J. Wong
2013-03-18 23:02                   ` [PATCH v3] " Darrick J. Wong
2013-03-18 23:02                     ` Darrick J. Wong
2013-03-18 23:02                     ` Darrick J. Wong
2013-03-19  8:54                     ` Jan Kara
2013-03-19  8:54                       ` Jan Kara
2013-03-19  8:54                       ` Jan Kara
2013-04-02 17:01                     ` Darrick J. Wong
2013-04-02 17:01                       ` Darrick J. Wong
2013-04-02 17:01                       ` Darrick J. Wong
2013-04-02 17:01                       ` Darrick J. Wong
2013-04-03 14:20                       ` Mel Gorman
2013-04-03 14:20                         ` Mel Gorman
2013-04-03 14:20                         ` Mel Gorman
2013-04-03 14:42                         ` Jan Kara
2013-04-03 14:42                           ` Jan Kara
2013-04-03 14:42                           ` Jan Kara
2013-04-09 18:03                           ` Darrick J. Wong
2013-04-09 18:03                             ` Darrick J. Wong
2013-04-09 18:03                             ` Darrick J. Wong
2013-03-14 22:46           ` [PATCH] bounce:fix bug, avoid to flush dcache on slab page from jbd2 Andrew Morton
2013-03-14 22:46             ` Andrew Morton
2013-03-14 22:46             ` Andrew Morton
2013-03-14 23:27             ` Darrick J. Wong
2013-03-14 23:27               ` Darrick J. Wong
2013-03-14 23:27               ` Darrick J. Wong

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.