]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/scsi-dh-emc-rw-mismatch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / scsi-dh-emc-rw-mismatch
1 From: Hannes Reinecke <hare@suse.de>
2 Subject: Server crashes when path failures occur against EMC storage
3 Reference: bnc#474482
4
5 When cable pulls, SP reboots, or other events take place that would interfere
6 with IO running to EMC storage the server crashes trying to resolve the path
7 failure.
8
9 Proglem is that we're latching on MODE_SELECT when deciding the
10 read/write mode for blk_get_request(). However, for newer arrays
11 we're using MODE_SELECT_10, thus causing a mismatch.
12
13 Signed-off-by: Hannes Reinecke <hare@suse.de>
14
15 diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
16 index 436957a..2505237 100644
17 --- a/drivers/scsi/device_handler/scsi_dh_emc.c
18 +++ b/drivers/scsi/device_handler/scsi_dh_emc.c
19 @@ -272,7 +272,7 @@ static struct request *get_req(struct scsi_device *sdev, int cmd,
20 int len = 0;
21
22 rq = blk_get_request(sdev->request_queue,
23 - (cmd == MODE_SELECT) ? WRITE : READ, GFP_NOIO);
24 + (cmd != INQUIRY) ? WRITE : READ, GFP_NOIO);
25 if (!rq) {
26 sdev_printk(KERN_INFO, sdev, "get_req: blk_get_request failed");
27 return NULL;