From: Chris Wright Date: Fri, 13 Jan 2006 21:05:26 +0000 (-0800) Subject: Add Kill blk_attempt_remerge() patch, oops on ide-cd access with CFQ, X-Git-Tag: v2.6.14.7~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3badfd3db6cecf1c516b3a9820c7d0ff983b2f7;p=thirdparty%2Fkernel%2Fstable-queue.git Add Kill blk_attempt_remerge() patch, oops on ide-cd access with CFQ, fwd from Dave Jones. --- diff --git a/queue/kill-blk_attempt_remerge.patch b/queue/kill-blk_attempt_remerge.patch new file mode 100644 index 00000000000..6e7f6827e79 --- /dev/null +++ b/queue/kill-blk_attempt_remerge.patch @@ -0,0 +1,92 @@ +From stable-bounces@linux.kernel.org Thu Jan 12 19:27:22 2006 +Date: Mon, 9 Jan 2006 11:15:33 -0800 +From: Linux Kernel Mailing List +Subject: [BLOCK] Kill blk_attempt_remerge() + +From: Jens Axboe + +[BLOCK] Kill blk_attempt_remerge() + +It's a broken interface, it's done way too late. And apparently it triggers +slab problems in recent kernels as well (most likely after the generic dispatch +code was merged). So kill it, ide-cd is the only user of it. + +Signed-off-by: Jens Axboe +chrisw: backport to 2.6.15 tree +Signed-off-by: Chris Wright +--- + + block/ll_rw_blk.c | 24 ------------------------ + drivers/ide/ide-cd.c | 10 ---------- + include/linux/blkdev.h | 1 - + 3 files changed, 35 deletions(-) + +--- linux-2.6.15.y.orig/block/ll_rw_blk.c ++++ linux-2.6.15.y/block/ll_rw_blk.c +@@ -2609,30 +2609,6 @@ static inline int attempt_front_merge(re + return 0; + } + +-/** +- * blk_attempt_remerge - attempt to remerge active head with next request +- * @q: The &request_queue_t belonging to the device +- * @rq: The head request (usually) +- * +- * Description: +- * For head-active devices, the queue can easily be unplugged so quickly +- * that proper merging is not done on the front request. This may hurt +- * performance greatly for some devices. The block layer cannot safely +- * do merging on that first request for these queues, but the driver can +- * call this function and make it happen any way. Only the driver knows +- * when it is safe to do so. +- **/ +-void blk_attempt_remerge(request_queue_t *q, struct request *rq) +-{ +- unsigned long flags; +- +- spin_lock_irqsave(q->queue_lock, flags); +- attempt_back_merge(q, rq); +- spin_unlock_irqrestore(q->queue_lock, flags); +-} +- +-EXPORT_SYMBOL(blk_attempt_remerge); +- + static int __make_request(request_queue_t *q, struct bio *bio) + { + struct request *req; +--- linux-2.6.15.y.orig/drivers/ide/ide-cd.c ++++ linux-2.6.15.y/drivers/ide/ide-cd.c +@@ -1332,8 +1332,6 @@ static ide_startstop_t cdrom_start_read + if (cdrom_read_from_buffer(drive)) + return ide_stopped; + +- blk_attempt_remerge(drive->queue, rq); +- + /* Clear the local sector buffer. */ + info->nsectors_buffered = 0; + +@@ -1874,14 +1872,6 @@ static ide_startstop_t cdrom_start_write + return ide_stopped; + } + +- /* +- * for dvd-ram and such media, it's a really big deal to get +- * big writes all the time. so scour the queue and attempt to +- * remerge requests, often the plugging will not have had time +- * to do this properly +- */ +- blk_attempt_remerge(drive->queue, rq); +- + info->nsectors_buffered = 0; + + /* use dma, if possible. we don't need to check more, since we +--- linux-2.6.15.y.orig/include/linux/blkdev.h ++++ linux-2.6.15.y/include/linux/blkdev.h +@@ -559,7 +559,6 @@ extern void register_disk(struct gendisk + extern void generic_make_request(struct bio *bio); + extern void blk_put_request(struct request *); + extern void blk_end_sync_rq(struct request *rq); +-extern void blk_attempt_remerge(request_queue_t *, struct request *); + extern struct request *blk_get_request(request_queue_t *, int, gfp_t); + extern void blk_insert_request(request_queue_t *, struct request *, int, void *); + extern void blk_requeue_request(request_queue_t *, struct request *); diff --git a/queue/series b/queue/series index dde6a13c4e9..0eb618ba4a0 100644 --- a/queue/series +++ b/queue/series @@ -1 +1,2 @@ usb-audio-dont-use-empty-packets-at-start-of-playback.patch +kill-blk_attempt_remerge.patch