android_kernel_xiaomi_sm8350/block
Jens Axboe 5044eed488 cfq-iosched: fix alias + front merge bug
There's a really rare and obscure bug in CFQ, that causes a crash in
cfq_dispatch_insert() due to rq == NULL.  One example of the resulting
oops is seen here:

	http://lkml.org/lkml/2007/4/15/41

Neil correctly diagnosed the situation for how this can happen: if two
concurrent requests with the exact same sector number (due to direct IO
or aliasing between MD and the raw device access), the alias handling
will add the request to the sortlist, but next_rq remains NULL.

Read the more complete analysis at:

	http://lkml.org/lkml/2007/4/25/57

This looks like it requires md to trigger, even though it should
potentially be possible to due with O_DIRECT (at least if you edit the
kernel and doctor some of the unplug calls).

The fix is to move the ->next_rq update to when we add a request to the
rbtree. Then we remove the possibility for a request to exist in the
rbtree code, but not have ->next_rq correctly updated.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-25 08:41:48 -07:00
..
as-iosched.c
blktrace.c [PATCH] mark struct file_operations const 3 2007-02-12 09:48:45 -08:00
cfq-iosched.c cfq-iosched: fix alias + front merge bug 2007-04-25 08:41:48 -07:00
deadline-iosched.c
elevator.c make elv_register() output atomic 2007-03-27 08:53:04 +02:00
genhd.c [PATCH] remove protection of LANANA-reserved majors 2007-04-04 21:12:47 -07:00
ioctl.c [PATCH] lockdep: annotate BLKPG_DEL_PARTITION 2007-02-20 17:10:16 -08:00
Kconfig
Kconfig.iosched update I/O sched Kconfig help texts - CFQ is now default, not AS. 2007-02-17 20:08:22 +01:00
ll_rw_blk.c block: blk_max_pfn is somtimes wrong 2007-03-27 08:52:47 +02:00
Makefile
noop-iosched.c
scsi_ioctl.c