mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andrew Morton <akpm@digeo.com>
Cc: Anton Blanchard <anton@samba.org>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] elv_former_request reversion
Date: Sun, 16 Feb 2003 12:59:08 +0100	[thread overview]
Message-ID: <20030216115908.GY26738@suse.de> (raw)
In-Reply-To: <20030216093244.GP26738@suse.de>

On Sun, Feb 16 2003, Jens Axboe wrote:
> On Sat, Feb 15 2003, Andrew Morton wrote:
> > 
> > This morning's fix for elv_former_request() is causing oopses all over the
> > place in the IO scheduler.
> > 
> > Jens, remember that I did try that fix a while ago, and the same happened.
> > 
> > I believe it has exposed a new problem at the
> > __make_request/attempt_front_merge level: if attempt_front_merge()
> > actually succeeds, the wrong request gets freed up in
> > elv_merged_request().
> > 
> > It may be best to back this change out until it can be fixed up for
> > real.
> 
> Yes agreed, I had forgotten about that point... Will fix.

Andrew, does this work for you?

===== drivers/block/deadline-iosched.c 1.14 vs edited =====
--- 1.14/drivers/block/deadline-iosched.c	Fri Feb 14 13:57:15 2003
+++ edited/drivers/block/deadline-iosched.c	Sun Feb 16 12:57:35 2003
@@ -297,6 +297,9 @@
 		deadline_del_drq_rb(dd, drq);
 	}
 
+	if (q->last_merge == &rq->queuelist)
+		q->last_merge = NULL;
+
 	list_del_init(&rq->queuelist);
 }
 
@@ -424,12 +427,7 @@
 {
 	request_queue_t *q = drq->request->q;
 
-	if (q->last_merge == &drq->request->queuelist)
-		q->last_merge = NULL;
-
-	deadline_del_drq_hash(drq);
-	deadline_del_drq_rb(dd, drq);
-	list_del_init(&drq->fifo);
+	deadline_remove_request(q, drq->request);
 	list_add_tail(&drq->request->queuelist, dd->dispatch);
 }
 
===== drivers/block/elevator.c 1.39 vs edited =====
--- 1.39/drivers/block/elevator.c	Sun Feb 16 00:57:09 2003
+++ edited/drivers/block/elevator.c	Sun Feb 16 11:32:35 2003
@@ -399,7 +399,7 @@
 	elevator_t *e = &q->elevator;
 
 	if (e->elevator_former_req_fn)
-		return e->elevator_latter_req_fn(q, rq);
+		return e->elevator_former_req_fn(q, rq);
 
 	prev = rq->queuelist.prev;
 	if (prev != &q->queue_head && prev != &rq->queuelist)

-- 
Jens Axboe


  reply	other threads:[~2003-02-16 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-16  0:12 Andrew Morton
2003-02-16  9:32 ` Jens Axboe
2003-02-16 11:59   ` Jens Axboe [this message]
2003-02-16 12:29     ` Andrew Morton
2003-02-16 12:53     ` Anton Blanchard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030216115908.GY26738@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@digeo.com \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®