• Home
  • Raw
  • Download

Lines Matching refs:target

67 unsigned short action_in_use(const test_env_t * env, const action_t target)  in action_in_use()  argument
72 if ((target.lba == env->action_list[i].lba) /* attempting same transfer start lba */ in action_in_use()
73 …||((target.lba < env->action_list[i].lba) && (target.lba + target.trsiz - 1) >= env->action_list[i… in action_in_use()
80 switch (target.oper) { in action_in_use()
100 const action_t target) in add_action() argument
109 env->action_list[env->action_list_entry++] = target; in add_action()
112 void remove_action(test_env_t * env, const action_t target) in remove_action() argument
124 while (target.lba != env->action_list[i].lba) { in remove_action()
142 const action_t target) in decrement_io_count() argument
145 remove_action(env, target); in decrement_io_count()
147 if (target.oper == WRITER) { in decrement_io_count()
235 action_t target = { NONE, 0, 0 }; in get_next_action() local
239 target.oper = env->lastAction.oper; in get_next_action()
241 target.oper = TST_OPER(args->test_state); in get_next_action()
246 target.oper = READER; in get_next_action()
248 target.oper = WRITER; in get_next_action()
260 target.oper = in get_next_action()
263 } else if (target.oper == NONE) { in get_next_action()
265 target.oper = (args->flags & CLD_FLG_W) ? WRITER : READER; in get_next_action()
270 target.trsiz = args->ltrsiz; in get_next_action()
275 (env->lastAction.trsiz != 0) && (target.oper == READER)) { in get_next_action()
276 target.trsiz = env->lastAction.trsiz; in get_next_action()
279 target.trsiz = (rand() & 0xFFF) + args->ltrsiz; in get_next_action()
284 } while (target.trsiz > args->htrsiz); in get_next_action()
290 target.lba = args->start_lba + args->offset; in get_next_action()
293 (target.oper == in get_next_action()
296 if ((target.oper == WRITER) && TST_wFST_TIME(args->test_state)) { in get_next_action()
298 } else if ((target.oper == READER) in get_next_action()
302 && ((*(tmpLBA) + (target.trsiz - 1)) <= in get_next_action()
310 && (target.oper == WRITER)) { in get_next_action()
311 target.oper = NONE; in get_next_action()
318 (OFF_T) direct *(OFF_T) target.trsiz; in get_next_action()
320 target.oper = NONE; in get_next_action()
324 target.lba = *(tmpLBA); in get_next_action()
329 && (target.oper == READER)) { in get_next_action()
330 target.lba = env->lastAction.lba; in get_next_action()
333 target.lba = in get_next_action()
335 } while (target.lba > args->stop_lba); in get_next_action()
338 ALIGN(target.lba, target.trsiz) + args->offset; in get_next_action()
340 target.lba = guessLBA = args->stop_lba; in get_next_action()
342 if (target.lba != guessLBA) { in get_next_action()
343 if ((target.lba - guessLBA) <= in get_next_action()
344 ((guessLBA + target.trsiz) - target.lba)) { in get_next_action()
345 target.lba = guessLBA; in get_next_action()
346 } else if ((guessLBA + target.trsiz) > in get_next_action()
348 target.lba = guessLBA; in get_next_action()
350 target.lba = guessLBA + target.trsiz; in get_next_action()
353 if ((target.lba + (target.trsiz - 1)) > args->stop_lba) { in get_next_action()
354 target.lba -= target.trsiz; in get_next_action()
358 if ((args->flags & CLD_FLG_LBA_SYNC) && (action_in_use(env, target))) { in get_next_action()
359 target.oper = RETRY; in get_next_action()
366 if (((target.oper == WRITER) ? env->wcount : env->rcount) >= in get_next_action()
368 target.oper = NONE; in get_next_action()
375 target.oper = NONE; in get_next_action()
387 for (i = 0; i < target.trsiz; i++) { in get_next_action()
390 (((target.lba - args->offset - args->start_lba) + in get_next_action()
391 i) / 8)) & (0x80 >> (((target.lba - in get_next_action()
402 if ((target.oper == NONE) || (target.oper == RETRY)) ; in get_next_action()
406 else if ((target.oper == WRITER) && (args->flags & CLD_FLG_WRITE_ONCE) in get_next_action()
409 else if ((target.oper == WRITER) in get_next_action()
412 else if ((target.oper == READER) && blk_written) ; in get_next_action()
427 (target.oper == READER)) { in get_next_action()
430 target.lba = *(tmpLBA); in get_next_action()
436 target.oper = RETRY; in get_next_action()
439 } else if ((target.oper == READER) && (args->flags & CLD_FLG_CMPR) in get_next_action()
442 target.oper = WRITER; in get_next_action()
446 && (action_in_use(env, target))) { in get_next_action()
447 target.oper = RETRY; in get_next_action()
451 target.oper = READER; in get_next_action()
466 if (target.oper == WRITER) { in get_next_action()
470 *(pVal1 + OFF_WLBA) += (OFF_T) direct *(OFF_T) target.trsiz; in get_next_action()
473 env->lastAction = target; in get_next_action()
475 add_action(env, args, target); in get_next_action()
478 if (target.oper == READER) { in get_next_action()
480 *(pVal1 + OFF_RLBA) += (OFF_T) direct *(OFF_T) target.trsiz; in get_next_action()
483 env->lastAction = target; in get_next_action()
485 add_action(env, args, target); in get_next_action()
489 return target; in get_next_action()
545 const action_t target) in complete_io() argument
550 if (target.oper == WRITER) { in complete_io()
551 (env->hbeat_stats.wbytes) += target.trsiz * BLK_SIZE; in complete_io()
553 for (i = 0; i < target.trsiz; i++) { in complete_io()
555 (((target.lba - args->offset - args->start_lba) + in complete_io()
557 0x80 >> (((target.lba - args->offset - args->start_lba) + i) % in complete_io()
561 (env->hbeat_stats.rbytes) += target.trsiz * BLK_SIZE; in complete_io()
565 remove_action(env, target); in complete_io()
594 action_t target = { NONE, 0, 0 }; in ChildMain() local
633 target.oper = TST_OPER(args->test_state); in ChildMain()
689 this_thread_id, target.oper, target.lba, in ChildMain()
690 target.trsiz); in ChildMain()
700 target = get_next_action(args, env, mask); in ChildMain()
703 if (target.oper == RETRY) { in ChildMain()
706 …} while ((env->bContinue) && (target.oper == RETRY)); /* we failed to get an action, and were aske… in ChildMain()
711 this_thread_id, target.oper, target.lba, in ChildMain()
712 target.trsiz); in ChildMain()
740 if (target.oper == NONE) { /* nothing left to do */ in ChildMain()
747 if (target.oper == NONE) { in ChildMain()
760 TargetBytePos = (OFF_T) (target.lba * BLK_SIZE); in ChildMain()
765 (target.oper == in ChildMain()
767 target.lba, TargetBytePos, ActualBytePos, in ChildMain()
781 decrement_io_count(args, env, target); in ChildMain()
787 if (target.oper == WRITER) { in ChildMain()
789 fill_buffer(buf2, target.trsiz, &(target.lba), in ChildMain()
793 target.trsiz * BLK_SIZE); in ChildMain()
796 mark_buffer(buf2, target.trsiz * BLK_SIZE, in ChildMain()
797 &(target.lba), args, env); in ChildMain()
804 tcnt = Write(fd, buf2, target.trsiz * BLK_SIZE); in ChildMain()
807 tcnt = Write(fd, buf2, target.trsiz * BLK_SIZE); in ChildMain()
839 target); in ChildMain()
850 if (target.oper == READER) { in ChildMain()
851 memset(buf1, SET_CHAR, target.trsiz * BLK_SIZE); in ChildMain()
857 tcnt = Read(fd, buf1, target.trsiz * BLK_SIZE); in ChildMain()
860 tcnt = Read(fd, buf1, target.trsiz * BLK_SIZE); in ChildMain()
869 if (tcnt != (long)target.trsiz * BLK_SIZE) { in ChildMain()
872 (target.oper) ? "Read" : "Write", in ChildMain()
873 (target.oper) ? (env->rcount) : (env->wcount), in ChildMain()
874 target.lba, target.lba, tcnt, in ChildMain()
875 target.trsiz * BLK_SIZE, ulLastError); in ChildMain()
888 decrement_io_count(args, env, target); in ChildMain()
895 if ((target.oper == READER) && (args->flags & CLD_FLG_CMPR)) { in ChildMain()
898 || (args->cmp_lng > target.trsiz * BLK_SIZE)) { in ChildMain()
899 args->cmp_lng = target.trsiz * BLK_SIZE; in ChildMain()
902 fill_buffer(buf2, target.trsiz, &(target.lba), in ChildMain()
906 target.trsiz * BLK_SIZE); in ChildMain()
909 mark_buffer(buf2, target.trsiz * BLK_SIZE, in ChildMain()
910 &(target.lba), args, env); in ChildMain()
916 target.lba, target.lba); in ChildMain()
927 target.lba, i, EXP, in ChildMain()
931 target.lba, i, ACT, in ChildMain()
938 target.trsiz * BLK_SIZE); in ChildMain()
944 target.trsiz * in ChildMain()
954 (long)target.trsiz * in ChildMain()
962 (target. in ChildMain()
966 target.lba, in ChildMain()
967 target.lba, tcnt, in ChildMain()
968 target.trsiz * in ChildMain()
974 target.lba, i, in ChildMain()
983 (target.oper == in ChildMain()
987 target.lba, TargetBytePos, in ChildMain()
998 decrement_io_count(args, env, target); in ChildMain()
1006 complete_io(env, args, target); in ChildMain()