]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] Enhanced handling of failed termination requests.
authorHorst Hummel <horst.hummel@de.ibm.com>
Mon, 4 Dec 2006 14:40:15 +0000 (15:40 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 4 Dec 2006 14:40:15 +0000 (15:40 +0100)
In case a request timed out and termination did not work, the console was
flooded with retry messages (every 1/10s). Now we use a 5s delay per retry and
generate a more precise message.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c

index 79ffef6bfaf8a02a802659392e599bbd11f1e468..a2cef57d7bcb2e72bc26366902c41c6b461f498e 100644 (file)
@@ -1264,15 +1264,21 @@ __dasd_check_expire(struct dasd_device * device)
        if (list_empty(&device->ccw_queue))
                return;
        cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list);
-       if (cqr->status == DASD_CQR_IN_IO && cqr->expires != 0) {
-               if (time_after_eq(jiffies, cqr->expires + cqr->starttime)) {
+       if ((cqr->status == DASD_CQR_IN_IO && cqr->expires != 0) &&
+           (time_after_eq(jiffies, cqr->expires + cqr->starttime))) {
+               if (device->discipline->term_IO(cqr) != 0) {
+                       /* Hmpf, try again in 5 sec */
+                       dasd_set_timer(device, 5*HZ);
+                       DEV_MESSAGE(KERN_ERR, device,
+                                   "internal error - timeout (%is) expired "
+                                   "for cqr %p, termination failed, "
+                                   "retrying in 5s",
+                                   (cqr->expires/HZ), cqr);
+               } else {
                        DEV_MESSAGE(KERN_ERR, device,
                                    "internal error - timeout (%is) expired "
                                    "for cqr %p (%i retries left)",
                                    (cqr->expires/HZ), cqr, cqr->retries);
-                       if (device->discipline->term_IO(cqr) != 0)
-                               /* Hmpf, try again in 1/10 sec */
-                               dasd_set_timer(device, 10);
                }
        }
 }