]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
elevator: move clearing of unplug flag earlier
authorLinas Vepstas <linas@austin.ibm.com>
Fri, 20 Apr 2007 22:13:30 +0000 (00:13 +0200)
committerAdrian Bunk <bunk@stusta.de>
Fri, 20 Apr 2007 22:13:30 +0000 (00:13 +0200)
commit908991f13837d34a445fc313e44fd7b6dbb5c5c9
tree5d6aa160296977dc386146522aa351be08d7e2d7
parentcfef930041a5dba4d3c8eb03d9d24fae9b129b08
elevator: move clearing of unplug flag earlier

A flag was recently added to the elevator code to avoid
performing an unplug when reuests are being re-queued.
The goal of this flag was to avoid a deep recursion that
can occur when re-queueing requests after a SCSI device/host
reset.  See http://lkml.org/lkml/2006/5/17/254

However, that fix added the flag near the bottom of a case
statement, where an earlier break (in an if statement) could
transport one out of the case, without setting the flag.
This patch sets the flag earlier in the case statement.

I re-discovered the deep recursion recently during testing;
I was told that it was a known problem, and the fix to it was
in the kernel I was testing. Indeed it was ... but it didn't
fix the bug. With the patch below, I no longer see the bug.

Signed-off by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
block/elevator.c