Commit 25ee4cf8 authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Linus Torvalds

[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: default avatarPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dafd87aa
...@@ -1257,25 +1257,28 @@ __dasd_start_head(struct dasd_device * device) ...@@ -1257,25 +1257,28 @@ __dasd_start_head(struct dasd_device * device)
if (list_empty(&device->ccw_queue)) if (list_empty(&device->ccw_queue))
return; return;
cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list); cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list);
/* check FAILFAST */ if (cqr->status != DASD_CQR_QUEUED)
return;
/* Non-temporary stop condition will trigger fail fast */
if (device->stopped & ~DASD_STOPPED_PENDING && if (device->stopped & ~DASD_STOPPED_PENDING &&
test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) && test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) &&
(!dasd_eer_enabled(device))) { (!dasd_eer_enabled(device))) {
cqr->status = DASD_CQR_FAILED; cqr->status = DASD_CQR_FAILED;
dasd_schedule_bh(device); dasd_schedule_bh(device);
return;
} }
if ((cqr->status == DASD_CQR_QUEUED) && /* Don't try to start requests if device is stopped */
(!device->stopped)) { if (device->stopped)
/* try to start the first I/O that can be started */ return;
rc = device->discipline->start_IO(cqr);
if (rc == 0) rc = device->discipline->start_IO(cqr);
dasd_set_timer(device, cqr->expires); if (rc == 0)
else if (rc == -EACCES) { dasd_set_timer(device, cqr->expires);
dasd_schedule_bh(device); else if (rc == -EACCES) {
} else dasd_schedule_bh(device);
/* Hmpf, try again in 1/2 sec */ } else
dasd_set_timer(device, 50); /* Hmpf, try again in 1/2 sec */
} dasd_set_timer(device, 50);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment