public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] Two fixups for the block IO merge
@ 2011-03-25 16:07 Jens Axboe
  2011-03-25 17:09 ` Chris Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2011-03-25 16:07 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Chris Mason, Markus Trippelsdorf, Sergey Senozhatsky,
	linux-kernel@vger.kernel.org

Hi Linus,

An embarassing bug made the block IO merge a bit less enjoyable for some
people than it should have.

- The oops problem (with CFQ), or potential corruption (with noop) due
  to a bad insertion type for some requests.

- A warning spew on virt_io using blk_stop_queue() inside it's callback.

Please pull these two fixes, so hopefully we can put this behind us.
Thanks a lot to the people involved with fixing the first issue.

  git://git.kernel.dk/linux-2.6-block.git for-linus

Jens Axboe (2):
      block: fix bug with inserting flush requests as sort/merge
      block: fix issue with calling blk_stop_queue() from the request_fn handler

 block/blk-core.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 59b5c00..e0a0623 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -271,7 +271,7 @@ EXPORT_SYMBOL(blk_start_queue);
  **/
 void blk_stop_queue(struct request_queue *q)
 {
-	cancel_delayed_work(&q->delay_work);
+	__cancel_delayed_work(&q->delay_work);
 	queue_flag_set(QUEUE_FLAG_STOPPED, q);
 }
 EXPORT_SYMBOL(blk_stop_queue);
@@ -2702,7 +2702,10 @@ static void flush_plug_list(struct blk_plug *plug)
 		/*
 		 * rq is already accounted, so use raw insert
 		 */
-		__elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE);
+		if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA))
+			__elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH);
+		else
+			__elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE);
 	}
 
 	if (q) {

-- 
Jens Axboe


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

* Re: [GIT PULL] Two fixups for the block IO merge
  2011-03-25 16:07 [GIT PULL] Two fixups for the block IO merge Jens Axboe
@ 2011-03-25 17:09 ` Chris Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Mason @ 2011-03-25 17:09 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Linus Torvalds, Markus Trippelsdorf, Sergey Senozhatsky,
	linux-kernel@vger.kernel.org

Excerpts from Jens Axboe's message of 2011-03-25 12:07:07 -0400:
> Hi Linus,
> 
> An embarassing bug made the block IO merge a bit less enjoyable for some
> people than it should have.
> 
> - The oops problem (with CFQ), or potential corruption (with noop) due
>   to a bad insertion type for some requests.
> 
> - A warning spew on virt_io using blk_stop_queue() inside it's callback.
> 
> Please pull these two fixes, so hopefully we can put this behind us.
> Thanks a lot to the people involved with fixing the first issue.
> 
>   git://git.kernel.dk/linux-2.6-block.git for-linus
> 
> Jens Axboe (2):
>       block: fix bug with inserting flush requests as sort/merge
>       block: fix issue with calling blk_stop_queue() from the request_fn handler

A quick stress test on this is going well on my box.  Before this pull
it would crash within 5 minutes.

-chris

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

end of thread, other threads:[~2011-03-25 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 16:07 [GIT PULL] Two fixups for the block IO merge Jens Axboe
2011-03-25 17:09 ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox