OpenCloudOS-Kernel/block
Jens Axboe bc1c116974 [PATCH] elevator switching race
There's a race between shutting down one io scheduler and firing up the
next, in which a new io could enter and cause the io scheduler to be
invoked with bad or NULL data.

To fix this, we need to maintain the queue lock for a bit longer.
Unfortunately we cannot do that, since the elevator init requires to be
run without the lock held.  This isn't easily fixable, without also
changing the mempool API.  So split the initialization into two parts,
and alloc-init operation and an attach operation.  Then we can
preallocate the io scheduler and related structures, and run the attach
inside the lock after we detach the old one.

This patch has survived 30 minutes of 1 second io scheduler switching
with a very busy io load.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-08 15:14:23 -07:00
..
Kconfig [PATCH] config: fix CONFIG_LFS option 2006-03-31 12:18:55 -08:00
Kconfig.iosched [BLOCK] iosched: fix setting of default io scheduler 2005-11-04 08:44:58 +01:00
Makefile [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
as-iosched.c [PATCH] elevator switching race 2006-06-08 15:14:23 -07:00
blktrace.c [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
cfq-iosched.c [PATCH] elevator switching race 2006-06-08 15:14:23 -07:00
deadline-iosched.c [PATCH] elevator switching race 2006-06-08 15:14:23 -07:00
elevator.c [PATCH] elevator switching race 2006-06-08 15:14:23 -07:00
genhd.c Revert "[BLOCK] Fix oops on removal of SD/MMC card" 2006-05-12 12:08:46 -07:00
ioctl.c [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
ll_rw_blk.c [PATCH] blk: fix gendisk->in_flight accounting during barrier sequence 2006-05-23 10:39:43 -07:00
noop-iosched.c [PATCH] elevator switching race 2006-06-08 15:14:23 -07:00
scsi_ioctl.c [SCSI] unify SCSI_IOCTL_SEND_COMMAND implementations 2006-04-13 10:13:15 -05:00