linux/block
Adrian Hunter f281fb5fe5 block: prevent merges of discard and write requests
Add logic to prevent two I/O requests being merged if
only one of them is a discard.  Ditto secure discard.

Without this fix, it is possible for write requests
to transform into discard requests.  For example:

  Submit bio 1 to discard 8 sectors from sector n
  Submit bio 2 to write 8 sectors from sector n + 16
  Submit bio 3 to write 8 sectors from sector n + 8

Bio 1 becomes request 1.  Bio 2 becomes request 2.
Bio 3 is merged with request 2, and then subsequently
request 2 is merged with request 1 resulting in just
one I/O request which discards all 24 sectors.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>

(Moved the checks above the position checks /Jens)

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-09-25 12:42:55 +02:00
..
blk-barrier.c
blk-cgroup.c
blk-cgroup.h
blk-core.c BLOCK: fix bio.bi_rw handling 2010-08-23 12:33:10 +02:00
blk-exec.c
blk-integrity.c
blk-ioc.c
blk-iopoll.c
blk-lib.c
blk-map.c block: fix blk_rq_map_kern bio direction flag 2010-09-21 11:49:17 +02:00
blk-merge.c block: prevent merges of discard and write requests 2010-09-25 12:42:55 +02:00
blk-settings.c
blk-softirq.c
blk-sysfs.c block: put dev->kobj in blk_register_queue fail path 2010-08-23 12:30:29 +02:00
blk-tag.c
blk-timeout.c
blk.h block: Range check cpu in blk_cpu_to_group 2010-09-10 09:03:21 +02:00
bsg.c
cfq-iosched.c cfq-iosched: fix a kernel OOPs when usb key is inserted 2010-09-21 11:49:17 +02:00
cfq.h
compat_ioctl.c
deadline-iosched.c
elevator.c block: add function call to switch the IO scheduler from a driver 2010-08-23 13:52:19 +02:00
genhd.c
ioctl.c
Kconfig
Kconfig.iosched
Makefile
noop-iosched.c
scsi_ioctl.c