Переглянути джерело

s390/dasd: fix statistics for recovered requests

When a recovery cqr is cleaned up, copy the start time, stop time,
and start device to the original cqr. These times are needed later
when the original request is finalized and counted in the DASD
statistics.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Stefan Weinhuber 12 роки тому
батько
коміт
fbd70035fb
1 змінених файлів з 8 додано та 0 видалено
  1. 8 0
      drivers/s390/block/dasd_erp.c

+ 8 - 0
drivers/s390/block/dasd_erp.c

@@ -124,10 +124,15 @@ dasd_default_erp_action(struct dasd_ccw_req *cqr)
 struct dasd_ccw_req *dasd_default_erp_postaction(struct dasd_ccw_req *cqr)
 struct dasd_ccw_req *dasd_default_erp_postaction(struct dasd_ccw_req *cqr)
 {
 {
 	int success;
 	int success;
+	unsigned long long startclk, stopclk;
+	struct dasd_device *startdev;
 
 
 	BUG_ON(cqr->refers == NULL || cqr->function == NULL);
 	BUG_ON(cqr->refers == NULL || cqr->function == NULL);
 
 
 	success = cqr->status == DASD_CQR_DONE;
 	success = cqr->status == DASD_CQR_DONE;
+	startclk = cqr->startclk;
+	stopclk = cqr->stopclk;
+	startdev = cqr->startdev;
 
 
 	/* free all ERPs - but NOT the original cqr */
 	/* free all ERPs - but NOT the original cqr */
 	while (cqr->refers != NULL) {
 	while (cqr->refers != NULL) {
@@ -142,6 +147,9 @@ struct dasd_ccw_req *dasd_default_erp_postaction(struct dasd_ccw_req *cqr)
 	}
 	}
 
 
 	/* set corresponding status to original cqr */
 	/* set corresponding status to original cqr */
+	cqr->startclk = startclk;
+	cqr->stopclk = stopclk;
+	cqr->startdev = startdev;
 	if (success)
 	if (success)
 		cqr->status = DASD_CQR_DONE;
 		cqr->status = DASD_CQR_DONE;
 	else {
 	else {