Re: IDE crash...

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jens Axboe
Date: Tuesday, October 23, 2007 - 12:02 am

On Mon, Oct 22 2007, David Miller wrote:

We should never see the end pointer in blk_rq_map_sg(), or that's a bug
in the driver. So it should be OK to just clear the end pointer always
in there, even if it's not the prettiest solution...

This just needs to be wrapped up in some scatterlist.h macro/function.

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 61c2e39..a3bda2f 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1354,6 +1354,12 @@ new_segment:
 			else
 				sg = sg_next(sg);
 
+			/*
+			 * Clear end-of-table pointer, we'll mark a new one
+			 * at the end
+			 */
+			sg->page_link &= ~0x2;
+
 			sg_dma_len(sg) = 0;
 			sg_dma_address(sg) = 0;
 			sg_set_page(sg, bvec->bv_page);

-- 
Jens Axboe

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
IDE crash..., David Miller, (Mon Oct 22, 11:50 pm)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 12:02 am)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 12:09 am)
Re: IDE crash..., FUJITA Tomonori, (Tue Oct 23, 12:14 am)
Re: IDE crash..., David Miller, (Tue Oct 23, 12:18 am)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 12:23 am)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 12:23 am)
Re: IDE crash..., David Miller, (Tue Oct 23, 12:43 am)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 12:45 am)
Re: IDE crash..., FUJITA Tomonori, (Tue Oct 23, 3:52 am)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 3:57 am)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 3:58 am)
Re: IDE crash..., FUJITA Tomonori, (Tue Oct 23, 4:10 am)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 4:43 am)
Re: IDE crash..., John Stoffel, (Tue Oct 23, 8:10 am)
Re: IDE crash..., David Miller, (Tue Oct 23, 2:18 pm)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 2:44 pm)
Re: IDE crash..., Jens Axboe, (Tue Oct 23, 11:49 pm)
Re: IDE crash..., John Stoffel, (Wed Oct 24, 9:27 am)
Re: IDE crash..., Jens Axboe, (Wed Oct 24, 11:10 am)