rf_states.c revision 1.9 1 /* $NetBSD: rf_states.c,v 1.9 1999/12/07 02:40:28 oster Exp $ */
2 /*
3 * Copyright (c) 1995 Carnegie-Mellon University.
4 * All rights reserved.
5 *
6 * Author: Mark Holland, William V. Courtright II, Robby Findler
7 *
8 * Permission to use, copy, modify and distribute this software and
9 * its documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation.
13 *
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
15 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
16 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 *
18 * Carnegie Mellon requests users of this software to return to
19 *
20 * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
24 *
25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes.
27 */
28
29 #include <sys/errno.h>
30
31 #include "rf_archs.h"
32 #include "rf_threadstuff.h"
33 #include "rf_raid.h"
34 #include "rf_dag.h"
35 #include "rf_desc.h"
36 #include "rf_aselect.h"
37 #include "rf_threadid.h"
38 #include "rf_general.h"
39 #include "rf_states.h"
40 #include "rf_dagutils.h"
41 #include "rf_driver.h"
42 #include "rf_engine.h"
43 #include "rf_map.h"
44 #include "rf_etimer.h"
45
46 /* prototypes for some of the available states.
47
48 States must:
49
50 - not block.
51
52 - either schedule rf_ContinueRaidAccess as a callback and return
53 RF_TRUE, or complete all of their work and return RF_FALSE.
54
55 - increment desc->state when they have finished their work.
56 */
57
58 static char *
59 StateName(RF_AccessState_t state)
60 {
61 switch (state) {
62 case rf_QuiesceState:return "QuiesceState";
63 case rf_MapState:
64 return "MapState";
65 case rf_LockState:
66 return "LockState";
67 case rf_CreateDAGState:
68 return "CreateDAGState";
69 case rf_ExecuteDAGState:
70 return "ExecuteDAGState";
71 case rf_ProcessDAGState:
72 return "ProcessDAGState";
73 case rf_CleanupState:
74 return "CleanupState";
75 case rf_LastState:
76 return "LastState";
77 case rf_IncrAccessesCountState:
78 return "IncrAccessesCountState";
79 case rf_DecrAccessesCountState:
80 return "DecrAccessesCountState";
81 default:
82 return "!!! UnnamedState !!!";
83 }
84 }
85
86 void
87 rf_ContinueRaidAccess(RF_RaidAccessDesc_t * desc)
88 {
89 int suspended = RF_FALSE;
90 int current_state_index = desc->state;
91 RF_AccessState_t current_state = desc->states[current_state_index];
92
93 do {
94
95 current_state_index = desc->state;
96 current_state = desc->states[current_state_index];
97
98 switch (current_state) {
99
100 case rf_QuiesceState:
101 suspended = rf_State_Quiesce(desc);
102 break;
103 case rf_IncrAccessesCountState:
104 suspended = rf_State_IncrAccessCount(desc);
105 break;
106 case rf_MapState:
107 suspended = rf_State_Map(desc);
108 break;
109 case rf_LockState:
110 suspended = rf_State_Lock(desc);
111 break;
112 case rf_CreateDAGState:
113 suspended = rf_State_CreateDAG(desc);
114 break;
115 case rf_ExecuteDAGState:
116 suspended = rf_State_ExecuteDAG(desc);
117 break;
118 case rf_ProcessDAGState:
119 suspended = rf_State_ProcessDAG(desc);
120 break;
121 case rf_CleanupState:
122 suspended = rf_State_Cleanup(desc);
123 break;
124 case rf_DecrAccessesCountState:
125 suspended = rf_State_DecrAccessCount(desc);
126 break;
127 case rf_LastState:
128 suspended = rf_State_LastState(desc);
129 break;
130 }
131
132 /* after this point, we cannot dereference desc since desc may
133 * have been freed. desc is only freed in LastState, so if we
134 * renter this function or loop back up, desc should be valid. */
135
136 if (rf_printStatesDebug) {
137 int tid;
138 rf_get_threadid(tid);
139
140 printf("[%d] State: %-24s StateIndex: %3i desc: 0x%ld %s\n",
141 tid, StateName(current_state), current_state_index, (long) desc,
142 suspended ? "callback scheduled" : "looping");
143 }
144 } while (!suspended && current_state != rf_LastState);
145
146 return;
147 }
148
149
150 void
151 rf_ContinueDagAccess(RF_DagList_t * dagList)
152 {
153 RF_AccTraceEntry_t *tracerec = &(dagList->desc->tracerec);
154 RF_RaidAccessDesc_t *desc;
155 RF_DagHeader_t *dag_h;
156 RF_Etimer_t timer;
157 int i;
158
159 desc = dagList->desc;
160
161 timer = tracerec->timer;
162 RF_ETIMER_STOP(timer);
163 RF_ETIMER_EVAL(timer);
164 tracerec->specific.user.exec_us = RF_ETIMER_VAL_US(timer);
165 RF_ETIMER_START(tracerec->timer);
166
167 /* skip to dag which just finished */
168 dag_h = dagList->dags;
169 for (i = 0; i < dagList->numDagsDone; i++) {
170 dag_h = dag_h->next;
171 }
172
173 /* check to see if retry is required */
174 if (dag_h->status == rf_rollBackward) {
175 /* when a dag fails, mark desc status as bad and allow all
176 * other dags in the desc to execute to completion. then,
177 * free all dags and start over */
178 desc->status = 1; /* bad status */
179 {
180 printf("[%d] DAG failure: %c addr 0x%lx (%ld) nblk 0x%x (%d) buf 0x%lx\n",
181 desc->tid, desc->type, (long) desc->raidAddress,
182 (long) desc->raidAddress, (int) desc->numBlocks,
183 (int) desc->numBlocks, (unsigned long) (desc->bufPtr));
184 }
185 }
186 dagList->numDagsDone++;
187 rf_ContinueRaidAccess(desc);
188 }
189
190 int
191 rf_State_LastState(RF_RaidAccessDesc_t * desc)
192 {
193 void (*callbackFunc) (RF_CBParam_t) = desc->callbackFunc;
194 RF_CBParam_t callbackArg;
195
196 callbackArg.p = desc->callbackArg;
197
198 /*
199 * If this is not an async request, wake up the caller
200 */
201 if (desc->async_flag == 0)
202 wakeup(desc->bp);
203
204 /*
205 * Wakeup any requests waiting to go.
206 */
207
208 RF_LOCK_MUTEX(((RF_Raid_t *) desc->raidPtr)->mutex);
209 ((RF_Raid_t *) desc->raidPtr)->openings++;
210 wakeup(&(((RF_Raid_t *) desc->raidPtr)->openings));
211 RF_UNLOCK_MUTEX(((RF_Raid_t *) desc->raidPtr)->mutex);
212
213
214 /* printf("Calling biodone on 0x%x\n",desc->bp); */
215 biodone(desc->bp); /* access came through ioctl */
216
217 if (callbackFunc)
218 callbackFunc(callbackArg);
219 rf_FreeRaidAccDesc(desc);
220
221 return RF_FALSE;
222 }
223
224 int
225 rf_State_IncrAccessCount(RF_RaidAccessDesc_t * desc)
226 {
227 RF_Raid_t *raidPtr;
228
229 raidPtr = desc->raidPtr;
230 /* Bummer. We have to do this to be 100% safe w.r.t. the increment
231 * below */
232 RF_LOCK_MUTEX(raidPtr->access_suspend_mutex);
233 raidPtr->accs_in_flight++; /* used to detect quiescence */
234 RF_UNLOCK_MUTEX(raidPtr->access_suspend_mutex);
235
236 desc->state++;
237 return RF_FALSE;
238 }
239
240 int
241 rf_State_DecrAccessCount(RF_RaidAccessDesc_t * desc)
242 {
243 RF_Raid_t *raidPtr;
244
245 raidPtr = desc->raidPtr;
246
247 RF_LOCK_MUTEX(raidPtr->access_suspend_mutex);
248 raidPtr->accs_in_flight--;
249 if (raidPtr->accesses_suspended && raidPtr->accs_in_flight == 0) {
250 rf_SignalQuiescenceLock(raidPtr, raidPtr->reconDesc);
251 }
252 rf_UpdateUserStats(raidPtr, RF_ETIMER_VAL_US(desc->timer), desc->numBlocks);
253 RF_UNLOCK_MUTEX(raidPtr->access_suspend_mutex);
254
255 desc->state++;
256 return RF_FALSE;
257 }
258
259 int
260 rf_State_Quiesce(RF_RaidAccessDesc_t * desc)
261 {
262 RF_AccTraceEntry_t *tracerec = &desc->tracerec;
263 RF_Etimer_t timer;
264 int suspended = RF_FALSE;
265 RF_Raid_t *raidPtr;
266
267 raidPtr = desc->raidPtr;
268
269 RF_ETIMER_START(timer);
270 RF_ETIMER_START(desc->timer);
271
272 RF_LOCK_MUTEX(raidPtr->access_suspend_mutex);
273 if (raidPtr->accesses_suspended) {
274 RF_CallbackDesc_t *cb;
275 cb = rf_AllocCallbackDesc();
276 /* XXX the following cast is quite bogus...
277 * rf_ContinueRaidAccess takes a (RF_RaidAccessDesc_t *) as an
278 * argument.. GO */
279 cb->callbackFunc = (void (*) (RF_CBParam_t)) rf_ContinueRaidAccess;
280 cb->callbackArg.p = (void *) desc;
281 cb->next = raidPtr->quiesce_wait_list;
282 raidPtr->quiesce_wait_list = cb;
283 suspended = RF_TRUE;
284 }
285 RF_UNLOCK_MUTEX(raidPtr->access_suspend_mutex);
286
287 RF_ETIMER_STOP(timer);
288 RF_ETIMER_EVAL(timer);
289 tracerec->specific.user.suspend_ovhd_us += RF_ETIMER_VAL_US(timer);
290
291 if (suspended && rf_quiesceDebug)
292 printf("Stalling access due to quiescence lock\n");
293
294 desc->state++;
295 return suspended;
296 }
297
298 int
299 rf_State_Map(RF_RaidAccessDesc_t * desc)
300 {
301 RF_Raid_t *raidPtr = desc->raidPtr;
302 RF_AccTraceEntry_t *tracerec = &desc->tracerec;
303 RF_Etimer_t timer;
304
305 RF_ETIMER_START(timer);
306
307 if (!(desc->asmap = rf_MapAccess(raidPtr, desc->raidAddress, desc->numBlocks,
308 desc->bufPtr, RF_DONT_REMAP)))
309 RF_PANIC();
310
311 RF_ETIMER_STOP(timer);
312 RF_ETIMER_EVAL(timer);
313 tracerec->specific.user.map_us = RF_ETIMER_VAL_US(timer);
314
315 desc->state++;
316 return RF_FALSE;
317 }
318
319 int
320 rf_State_Lock(RF_RaidAccessDesc_t * desc)
321 {
322 RF_AccTraceEntry_t *tracerec = &desc->tracerec;
323 RF_Raid_t *raidPtr = desc->raidPtr;
324 RF_AccessStripeMapHeader_t *asmh = desc->asmap;
325 RF_AccessStripeMap_t *asm_p;
326 RF_Etimer_t timer;
327 int suspended = RF_FALSE;
328
329 RF_ETIMER_START(timer);
330 if (!(raidPtr->Layout.map->flags & RF_NO_STRIPE_LOCKS)) {
331 RF_StripeNum_t lastStripeID = -1;
332
333 /* acquire each lock that we don't already hold */
334 for (asm_p = asmh->stripeMap; asm_p; asm_p = asm_p->next) {
335 RF_ASSERT(RF_IO_IS_R_OR_W(desc->type));
336 if (!rf_suppressLocksAndLargeWrites &&
337 asm_p->parityInfo &&
338 !(desc->flags & RF_DAG_SUPPRESS_LOCKS) &&
339 !(asm_p->flags & RF_ASM_FLAGS_LOCK_TRIED)) {
340 asm_p->flags |= RF_ASM_FLAGS_LOCK_TRIED;
341 RF_ASSERT(asm_p->stripeID > lastStripeID); /* locks must be
342 * acquired
343 * hierarchically */
344 lastStripeID = asm_p->stripeID;
345 /* XXX the cast to (void (*)(RF_CBParam_t))
346 * below is bogus! GO */
347 RF_INIT_LOCK_REQ_DESC(asm_p->lockReqDesc, desc->type,
348 (void (*) (struct buf *)) rf_ContinueRaidAccess, desc, asm_p,
349 raidPtr->Layout.dataSectorsPerStripe);
350 if (rf_AcquireStripeLock(raidPtr->lockTable, asm_p->stripeID,
351 &asm_p->lockReqDesc)) {
352 suspended = RF_TRUE;
353 break;
354 }
355 }
356 if (desc->type == RF_IO_TYPE_WRITE &&
357 raidPtr->status[asm_p->physInfo->row] == rf_rs_reconstructing) {
358 if (!(asm_p->flags & RF_ASM_FLAGS_FORCE_TRIED)) {
359 int val;
360
361 asm_p->flags |= RF_ASM_FLAGS_FORCE_TRIED;
362 /* XXX the cast below is quite
363 * bogus!!! XXX GO */
364 val = rf_ForceOrBlockRecon(raidPtr, asm_p,
365 (void (*) (RF_Raid_t *, void *)) rf_ContinueRaidAccess, desc);
366 if (val == 0) {
367 asm_p->flags |= RF_ASM_FLAGS_RECON_BLOCKED;
368 } else {
369 suspended = RF_TRUE;
370 break;
371 }
372 } else {
373 if (rf_pssDebug) {
374 printf("[%d] skipping force/block because already done, psid %ld\n",
375 desc->tid, (long) asm_p->stripeID);
376 }
377 }
378 } else {
379 if (rf_pssDebug) {
380 printf("[%d] skipping force/block because not write or not under recon, psid %ld\n",
381 desc->tid, (long) asm_p->stripeID);
382 }
383 }
384 }
385
386 RF_ETIMER_STOP(timer);
387 RF_ETIMER_EVAL(timer);
388 tracerec->specific.user.lock_us += RF_ETIMER_VAL_US(timer);
389
390 if (suspended)
391 return (RF_TRUE);
392 }
393 desc->state++;
394 return (RF_FALSE);
395 }
396 /*
397 * the following three states create, execute, and post-process dags
398 * the error recovery unit is a single dag.
399 * by default, SelectAlgorithm creates an array of dags, one per parity stripe
400 * in some tricky cases, multiple dags per stripe are created
401 * - dags within a parity stripe are executed sequentially (arbitrary order)
402 * - dags for distinct parity stripes are executed concurrently
403 *
404 * repeat until all dags complete successfully -or- dag selection fails
405 *
406 * while !done
407 * create dag(s) (SelectAlgorithm)
408 * if dag
409 * execute dag (DispatchDAG)
410 * if dag successful
411 * done (SUCCESS)
412 * else
413 * !done (RETRY - start over with new dags)
414 * else
415 * done (FAIL)
416 */
417 int
418 rf_State_CreateDAG(RF_RaidAccessDesc_t * desc)
419 {
420 RF_AccTraceEntry_t *tracerec = &desc->tracerec;
421 RF_Etimer_t timer;
422 RF_DagHeader_t *dag_h;
423 int i, selectStatus;
424
425 /* generate a dag for the access, and fire it off. When the dag
426 * completes, we'll get re-invoked in the next state. */
427 RF_ETIMER_START(timer);
428 /* SelectAlgorithm returns one or more dags */
429 selectStatus = rf_SelectAlgorithm(desc, desc->flags | RF_DAG_SUPPRESS_LOCKS);
430 if (rf_printDAGsDebug)
431 for (i = 0; i < desc->numStripes; i++)
432 rf_PrintDAGList(desc->dagArray[i].dags);
433 RF_ETIMER_STOP(timer);
434 RF_ETIMER_EVAL(timer);
435 /* update time to create all dags */
436 tracerec->specific.user.dag_create_us = RF_ETIMER_VAL_US(timer);
437
438 desc->status = 0; /* good status */
439
440 if (selectStatus) {
441 /* failed to create a dag */
442 /* this happens when there are too many faults or incomplete
443 * dag libraries */
444 printf("[Failed to create a DAG\n]");
445 RF_PANIC();
446 } else {
447 /* bind dags to desc */
448 for (i = 0; i < desc->numStripes; i++) {
449 dag_h = desc->dagArray[i].dags;
450 while (dag_h) {
451 dag_h->bp = (struct buf *) desc->bp;
452 dag_h->tracerec = tracerec;
453 dag_h = dag_h->next;
454 }
455 }
456 desc->flags |= RF_DAG_DISPATCH_RETURNED;
457 desc->state++; /* next state should be rf_State_ExecuteDAG */
458 }
459 return RF_FALSE;
460 }
461
462
463
464 /* the access has an array of dagLists, one dagList per parity stripe.
465 * fire the first dag in each parity stripe (dagList).
466 * dags within a stripe (dagList) must be executed sequentially
467 * - this preserves atomic parity update
468 * dags for independents parity groups (stripes) are fired concurrently */
469
470 int
471 rf_State_ExecuteDAG(RF_RaidAccessDesc_t * desc)
472 {
473 int i;
474 RF_DagHeader_t *dag_h;
475 RF_DagList_t *dagArray = desc->dagArray;
476
477 /* next state is always rf_State_ProcessDAG important to do this
478 * before firing the first dag (it may finish before we leave this
479 * routine) */
480 desc->state++;
481
482 /* sweep dag array, a stripe at a time, firing the first dag in each
483 * stripe */
484 for (i = 0; i < desc->numStripes; i++) {
485 RF_ASSERT(dagArray[i].numDags > 0);
486 RF_ASSERT(dagArray[i].numDagsDone == 0);
487 RF_ASSERT(dagArray[i].numDagsFired == 0);
488 RF_ETIMER_START(dagArray[i].tracerec.timer);
489 /* fire first dag in this stripe */
490 dag_h = dagArray[i].dags;
491 RF_ASSERT(dag_h);
492 dagArray[i].numDagsFired++;
493 /* XXX Yet another case where we pass in a conflicting
494 * function pointer :-( XXX GO */
495 rf_DispatchDAG(dag_h, (void (*) (void *)) rf_ContinueDagAccess, &dagArray[i]);
496 }
497
498 /* the DAG will always call the callback, even if there was no
499 * blocking, so we are always suspended in this state */
500 return RF_TRUE;
501 }
502
503
504
505 /* rf_State_ProcessDAG is entered when a dag completes.
506 * first, check to all dags in the access have completed
507 * if not, fire as many dags as possible */
508
509 int
510 rf_State_ProcessDAG(RF_RaidAccessDesc_t * desc)
511 {
512 RF_AccessStripeMapHeader_t *asmh = desc->asmap;
513 RF_Raid_t *raidPtr = desc->raidPtr;
514 RF_DagHeader_t *dag_h;
515 int i, j, done = RF_TRUE;
516 RF_DagList_t *dagArray = desc->dagArray;
517 RF_Etimer_t timer;
518
519 /* check to see if this is the last dag */
520 for (i = 0; i < desc->numStripes; i++)
521 if (dagArray[i].numDags != dagArray[i].numDagsDone)
522 done = RF_FALSE;
523
524 if (done) {
525 if (desc->status) {
526 /* a dag failed, retry */
527 RF_ETIMER_START(timer);
528 /* free all dags */
529 for (i = 0; i < desc->numStripes; i++) {
530 rf_FreeDAG(desc->dagArray[i].dags);
531 }
532 rf_MarkFailuresInASMList(raidPtr, asmh);
533 /* back up to rf_State_CreateDAG */
534 desc->state = desc->state - 2;
535 return RF_FALSE;
536 } else {
537 /* move on to rf_State_Cleanup */
538 desc->state++;
539 }
540 return RF_FALSE;
541 } else {
542 /* more dags to execute */
543 /* see if any are ready to be fired. if so, fire them */
544 /* don't fire the initial dag in a list, it's fired in
545 * rf_State_ExecuteDAG */
546 for (i = 0; i < desc->numStripes; i++) {
547 if ((dagArray[i].numDagsDone < dagArray[i].numDags)
548 && (dagArray[i].numDagsDone == dagArray[i].numDagsFired)
549 && (dagArray[i].numDagsFired > 0)) {
550 RF_ETIMER_START(dagArray[i].tracerec.timer);
551 /* fire next dag in this stripe */
552 /* first, skip to next dag awaiting execution */
553 dag_h = dagArray[i].dags;
554 for (j = 0; j < dagArray[i].numDagsDone; j++)
555 dag_h = dag_h->next;
556 dagArray[i].numDagsFired++;
557 /* XXX and again we pass a different function
558 * pointer.. GO */
559 rf_DispatchDAG(dag_h, (void (*) (void *)) rf_ContinueDagAccess,
560 &dagArray[i]);
561 }
562 }
563 return RF_TRUE;
564 }
565 }
566 /* only make it this far if all dags complete successfully */
567 int
568 rf_State_Cleanup(RF_RaidAccessDesc_t * desc)
569 {
570 RF_AccTraceEntry_t *tracerec = &desc->tracerec;
571 RF_AccessStripeMapHeader_t *asmh = desc->asmap;
572 RF_Raid_t *raidPtr = desc->raidPtr;
573 RF_AccessStripeMap_t *asm_p;
574 RF_DagHeader_t *dag_h;
575 RF_Etimer_t timer;
576 int tid, i;
577
578 desc->state++;
579
580 rf_get_threadid(tid);
581
582 timer = tracerec->timer;
583 RF_ETIMER_STOP(timer);
584 RF_ETIMER_EVAL(timer);
585 tracerec->specific.user.dag_retry_us = RF_ETIMER_VAL_US(timer);
586
587 /* the RAID I/O is complete. Clean up. */
588 tracerec->specific.user.dag_retry_us = 0;
589
590 RF_ETIMER_START(timer);
591 if (desc->flags & RF_DAG_RETURN_DAG) {
592 /* copy dags into paramDAG */
593 *(desc->paramDAG) = desc->dagArray[0].dags;
594 dag_h = *(desc->paramDAG);
595 for (i = 1; i < desc->numStripes; i++) {
596 /* concatenate dags from remaining stripes */
597 RF_ASSERT(dag_h);
598 while (dag_h->next)
599 dag_h = dag_h->next;
600 dag_h->next = desc->dagArray[i].dags;
601 }
602 } else {
603 /* free all dags */
604 for (i = 0; i < desc->numStripes; i++) {
605 rf_FreeDAG(desc->dagArray[i].dags);
606 }
607 }
608
609 RF_ETIMER_STOP(timer);
610 RF_ETIMER_EVAL(timer);
611 tracerec->specific.user.cleanup_us = RF_ETIMER_VAL_US(timer);
612
613 RF_ETIMER_START(timer);
614 if (!(raidPtr->Layout.map->flags & RF_NO_STRIPE_LOCKS)) {
615 for (asm_p = asmh->stripeMap; asm_p; asm_p = asm_p->next) {
616 if (!rf_suppressLocksAndLargeWrites &&
617 asm_p->parityInfo &&
618 !(desc->flags & RF_DAG_SUPPRESS_LOCKS)) {
619 RF_ASSERT_VALID_LOCKREQ(&asm_p->lockReqDesc);
620 rf_ReleaseStripeLock(raidPtr->lockTable, asm_p->stripeID,
621 &asm_p->lockReqDesc);
622 }
623 if (asm_p->flags & RF_ASM_FLAGS_RECON_BLOCKED) {
624 rf_UnblockRecon(raidPtr, asm_p);
625 }
626 }
627 }
628 RF_ETIMER_STOP(timer);
629 RF_ETIMER_EVAL(timer);
630 tracerec->specific.user.lock_us += RF_ETIMER_VAL_US(timer);
631
632 RF_ETIMER_START(timer);
633 if (desc->flags & RF_DAG_RETURN_ASM)
634 *(desc->paramASM) = asmh;
635 else
636 rf_FreeAccessStripeMap(asmh);
637 RF_ETIMER_STOP(timer);
638 RF_ETIMER_EVAL(timer);
639 tracerec->specific.user.cleanup_us += RF_ETIMER_VAL_US(timer);
640
641 RF_ETIMER_STOP(desc->timer);
642 RF_ETIMER_EVAL(desc->timer);
643
644 timer = desc->tracerec.tot_timer;
645 RF_ETIMER_STOP(timer);
646 RF_ETIMER_EVAL(timer);
647 desc->tracerec.total_us = RF_ETIMER_VAL_US(timer);
648
649 rf_LogTraceRec(raidPtr, tracerec);
650
651 desc->flags |= RF_DAG_ACCESS_COMPLETE;
652
653 return RF_FALSE;
654 }
655