On Fri, Sep 08 2000, [EMAIL PROTECTED] wrote: > Incorrect number of segments after building list > nr_segments is 3 > counted segments is 20 > Flags 0 0 > Segment 0xc59cf920, blocks 4, addr 0x59177ff [snip] Try attached patch, I hadn't noticed the segment counts were wrong because I have implicit recounting. -- * Jens Axboe <[EMAIL PROTECTED]> * SuSE Labs
--- drivers/scsi/scsi_merge.c~ Sat Sep 9 00:20:15 2000 +++ drivers/scsi/scsi_merge.c Sat Sep 9 00:21:49 2000 @@ -818,11 +818,7 @@ /* * First we need to know how many scatter gather segments are needed. */ - if (!sg_count_valid) { - count = __count_segments(req, use_clustering, dma_host, NULL); - } else { - count = req->nr_segments; - } + count = __count_segments(req, use_clustering, dma_host, NULL); /* * If the dma pool is nearly empty, then queue a minimal request