aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2006-04-11 01:53:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:18:38 -0400
commit25ee4cf831fcc2855927c175d246a25e5ebe5902 (patch)
tree8338c521644eef239912230543fafbdaa1eee22e /drivers
parentdafd87aaef7d95a6ad3ff92e0d512e5b166c0716 (diff)
[PATCH] s390: fail-fast requests on quiesced devices
Using the fail-fast flag in i/o requests on a dasd disk which has been quiesced leads to kernel panics. Modify the request start function to only work on requests in a valid state. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/block/dasd.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 170aae004ceb..a3bfebcf31ef 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1257,25 +1257,28 @@ __dasd_start_head(struct dasd_device * device)
1257 if (list_empty(&device->ccw_queue)) 1257 if (list_empty(&device->ccw_queue))
1258 return; 1258 return;
1259 cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list); 1259 cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list);
1260 /* check FAILFAST */ 1260 if (cqr->status != DASD_CQR_QUEUED)
1261 return;
1262 /* Non-temporary stop condition will trigger fail fast */
1261 if (device->stopped & ~DASD_STOPPED_PENDING && 1263 if (device->stopped & ~DASD_STOPPED_PENDING &&
1262 test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) && 1264 test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) &&
1263 (!dasd_eer_enabled(device))) { 1265 (!dasd_eer_enabled(device))) {
1264 cqr->status = DASD_CQR_FAILED; 1266 cqr->status = DASD_CQR_FAILED;
1265 dasd_schedule_bh(device); 1267 dasd_schedule_bh(device);
1268 return;
1266 } 1269 }
1267 if ((cqr->status == DASD_CQR_QUEUED) && 1270 /* Don't try to start requests if device is stopped */
1268 (!device->stopped)) { 1271 if (device->stopped)
1269 /* try to start the first I/O that can be started */ 1272 return;
1270 rc = device->discipline->start_IO(cqr); 1273
1271 if (rc == 0) 1274 rc = device->discipline->start_IO(cqr);
1272 dasd_set_timer(device, cqr->expires); 1275 if (rc == 0)
1273 else if (rc == -EACCES) { 1276 dasd_set_timer(device, cqr->expires);
1274 dasd_schedule_bh(device); 1277 else if (rc == -EACCES) {
1275 } else 1278 dasd_schedule_bh(device);
1276 /* Hmpf, try again in 1/2 sec */ 1279 } else
1277 dasd_set_timer(device, 50); 1280 /* Hmpf, try again in 1/2 sec */
1278 } 1281 dasd_set_timer(device, 50);
1279} 1282}
1280 1283
1281/* 1284/*