raid5: set bio bi_vcnt 0 for discard request
authorShaohua Li <shli@kernel.org>
Sat, 19 Oct 2013 06:50:28 +0000 (14:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Nov 2013 03:05:31 +0000 (12:05 +0900)
commit7e44a92662ce582268c4f35e68aad1f632ada8f8
tree9f2fa1ce56fdab09ad6035326cdce3e613809571
parent4053771449476d9c323bd00c0c87bbd390588e55
raid5: set bio bi_vcnt 0 for discard request

commit 37c61ff31e9b5e3fcf3cc6579f5c68f6ad40c4b1 upstream.

SCSI layer will add new payload for discard request. If two bios are merged
to one, the second bio has bi_vcnt 1 which is set in raid5. This will confuse
SCSI and cause oops.

Suitable for backport to 3.7+

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid5.c