Lines Matching refs:STps
618 struct st_partstat * STps = &(STp->ps[STp->partition]);
698 STps->eof = ST_FM_HIT;
714 STps->eof = ST_EOD_1;
734 STps->eof = ST_NOEOF;
1103 struct st_partstat * STps = &(STp->ps[STp->partition]);
1109 if (STps->rw != ST_READING) { /* Initialize read operation */
1110 if (STps->rw == ST_WRITING || STp->dirty) {
1115 STps->rw = ST_READING;
1141 struct st_partstat * STps = &(STp->ps[STp->partition]);
1156 return (STps->eof);
1257 if (debugging || STps->eof)
1260 name, frame_seq_number, STp->frame_seq_number, STps->eof);
1264 return (STps->eof);
1269 struct st_partstat * STps = &(STp->ps[STp->partition]);
1282 if (STps->drv_block >= 0) {
1306 if (STps->eof == ST_FM_HIT)
1334 STps->drv_file = ntohl(STp->buffer->aux->filemark_cnt);
1335 if (STps->eof == ST_FM_HIT) {
1336 STps->drv_file++;
1337 STps->drv_block = 0;
1339 STps->drv_block = ntohl(STp->buffer->aux->last_mark_lbn)?
1341 (STps->drv_file ? ntohl(STp->buffer->aux->last_mark_lbn) + 1 : 0):
1344 STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_NOEOF;
1408 struct st_partstat * STps = &(STp->ps[STp->partition]);
1421 STp->frame_seq_number = STp->logical_blk_num = STps->drv_file = STps->drv_block = 0;
1442 STps->drv_file = ntohl(STp->buffer->aux->filemark_cnt);
1443 if (STps->eof == ST_FM_HIT) {
1444 STps->drv_file++;
1445 STps->drv_block = 0;
1447 STps->drv_block = ntohl(STp->buffer->aux->last_mark_lbn)?
1449 (STps->drv_file ? ntohl(STp->buffer->aux->last_mark_lbn) + 1 : 0):
1452 STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_NOEOF;
1457 STps->drv_file, STps->drv_block, STp->buffer->read_pointer, STps->eof);
1773 struct st_partstat * STps = & STp->ps[STp->partition];
1779 rw_state = STps->rw;
1845 STps->rw = rw_state;
2971 struct st_partstat * STps;
2978 STps = &(STp->ps[STp->partition]);
3018 STps->eof = ST_NOEOF;
3019 STps->at_sm = 0;
3020 STps->rw = ST_IDLE;
3027 struct st_partstat * STps = &(STp->ps[STp->partition]);
3037 if (STps->drv_file >= 0)
3038 STps->drv_file++ ;
3039 STps->drv_block = 0;
3044 STps->eof = ST_FM;
3059 struct st_partstat * STps;
3091 STps = &(STp->ps[STp->partition]);
3092 STps->rw = ST_WRITING;
3166 STps->drv_block = (-1);
3185 struct st_partstat * STps;
3201 STps = &(STp->ps[STp->partition]);
3202 if (STps->rw == ST_WRITING || STp->dirty) { /* Writing */
3222 if (STps->eof == ST_FM_HIT) {
3225 STps->eof = ST_NOEOF;
3227 if (STps->drv_file >= 0)
3228 STps->drv_file++;
3229 STps->drv_block = 0;
3235 else if (STps->eof == ST_FM_HIT) {
3236 if (STps->drv_file >= 0)
3237 STps->drv_file++;
3238 STps->drv_block = 0;
3239 STps->eof = ST_NOEOF;
3351 struct st_partstat *STps;
3355 STps = &(STp->ps[i]);
3356 STps->rw = ST_IDLE;
3357 STps->eof = ST_NOEOF;
3358 STps->at_sm = 0;
3359 STps->last_block_valid = 0;
3360 STps->drv_block = -1;
3361 STps->drv_file = -1;
3379 struct st_partstat * STps;
3454 STps = &(STp->ps[STp->partition]);
3456 if (STps->rw == ST_READING) {
3459 STps->drv_file, STps->drv_block);
3464 STps->rw = ST_IDLE;
3466 if (STps->rw != ST_WRITING) {
3469 (STp->first_frame_position == STp->first_data_ppos && STps->drv_block < 0) ||
3470 (STps->drv_file == 0 && STps->drv_block == 0)) {
3477 STps->drv_file = STps->drv_block = 0;
3482 STps->drv_file < 0 || STps->drv_block < 0) {
3484 STps->drv_file = STp->filemark_cnt;
3485 STps->drv_block = 0;
3497 if ((STps->drv_file + STps->drv_block) > 0 && STps->drv_file < STp->filemark_cnt) {
3498 STp->filemark_cnt = STps->drv_file;
3503 name, STps->drv_file, STp->wrt_pass_cntr);
3534 STps->eof = ST_EOM_OK;
3536 STps->eof = ST_EOM_ERROR;
3539 if (STps->eof == ST_EOM_OK) {
3543 else if (STps->eof == ST_EOM_ERROR) {
3568 name, (int) count, STps->drv_file, STps->drv_block,
3596 if (STps->drv_block >= 0) {
3597 STps->drv_block += (do_count - transfer) / STp->block_size;
3599 STps->eof = ST_EOM_OK;
3608 STps->eof = ST_EOM_ERROR;
3609 STps->drv_block = (-1); /* Too cautious? */
3635 if (STps->drv_block >= 0) {
3636 STps->drv_block += blks;
3651 if (STps->drv_block >= 0) {
3652 STps->drv_block += blks;
3677 STps->at_sm &= (total == 0);
3679 STps->eof = ST_NOEOF;
3699 struct st_partstat * STps;
3747 STps = &(STp->ps[STp->partition]);
3748 if (STps->rw == ST_WRITING) {
3752 STps->rw = ST_IDLE;
3762 if (debugging && STps->eof != ST_NOEOF)
3764 STps->eof, (STp->buffer)->buffer_bytes);
3767 STps->eof >= ST_EOD_1) {
3768 if (STps->eof < ST_EOD) {
3769 STps->eof += 1;
3792 if (STps->eof == ST_FM_HIT)
3805 if (debugging && STps->eof != ST_NOEOF)
3807 STps->eof, (STp->buffer)->buffer_bytes, (int) (count - total));
3828 STps->drv_block += transfer / STp->block_size;
3847 if (STps->eof == ST_FM_HIT) {
3848 STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD_2:ST_FM;
3849 STps->drv_block = 0;
3850 if (STps->drv_file >= 0)
3851 STps->drv_file++;
3853 else if (STps->eof == ST_EOD_1) {
3854 STps->eof = ST_EOD_2;
3855 if (STps->drv_block > 0 && STps->drv_file >= 0)
3856 STps->drv_file++;
3857 STps->drv_block = 0;
3859 else if (STps->eof == ST_EOD_2)
3860 STps->eof = ST_EOD;
3862 else if (STps->eof == ST_FM)
3863 STps->eof = ST_NOEOF;
4065 struct st_partstat * STps;
4077 STps = &(STp->ps[STp->partition]);
4078 fileno = STps->drv_file;
4079 blkno = STps->drv_block;
4080 at_sm = STps->at_sm;
4129 fileno = STps->drv_file;
4130 blkno = STps->drv_block;
4172 if ((STps->rw == ST_WRITING || STp->dirty) && !STp->pos_unknown) {
4297 if ((STps->drv_block == 0 ) &&
4366 STps->drv_block = blkno;
4367 STps->drv_file = fileno;
4368 STps->at_sm = at_sm;
4371 STps->eof = ST_EOD;
4372 else if ((cmd_in == MTFSFM || cmd_in == MTBSF) && STps->eof == ST_FM_HIT) {
4374 STps->drv_block++;
4381 STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_FM;
4383 STps->eof = ST_NOEOF;
4403 STps->drv_file = STps->drv_block = -1;
4405 STps->drv_file = STps->drv_block = 0;
4406 STps->eof = ST_NOEOF;
4409 STps->drv_file = STps->drv_block = -1;
4411 STps->drv_file = STp->filemark_cnt;
4412 STps->drv_block = 0;
4414 STps->eof = ST_EOD;
4416 STps->drv_file = STps->drv_block = (-1);
4417 STps->eof = ST_NOEOF;
4423 STps->eof = ST_EOM_OK;
4424 STps->drv_block = 0;
4427 STps->eof = ST_NOEOF;
4430 STps->eof = ST_EOD;
4450 struct st_partstat * STps;
4539 STps = &(STp->ps[i]);
4540 STps->rw = ST_IDLE;
4599 STps = &(STp->ps[i]);
4600 STps->rw = ST_IDLE;
4601 STps->eof = ST_NOEOF;
4602 STps->at_sm = 0;
4603 STps->last_block_valid = 0;
4604 STps->drv_block = 0;
4605 STps->drv_file = 0 ;
4708 STps = &(STp->ps[i]);
4709 STps->rw = ST_IDLE;
4710 STps->eof = ST_NOEOF;
4711 STps->at_sm = 0;
4712 STps->last_block_valid = 0;
4713 STps->drv_block = 0;
4714 STps->drv_file = 0 ;
4827 struct st_partstat * STps = &(STp->ps[STp->partition]);
4834 if ((STps->rw == ST_WRITING || STp->dirty) && !STp->pos_unknown) {
4840 if ( STps->rw >= ST_WRITING && !STp->pos_unknown) {
4858 STps = &(STp->ps[STp->partition]);
4859 if (!STm->sysv || STps->rw != ST_READING) {
4862 else if (STps->eof == ST_FM_HIT) {
4865 if (STps->drv_file >= 0)
4866 STps->drv_file++;
4867 STps->drv_block = 0;
4868 STps->eof = ST_FM;
4871 STps->eof = ST_NOEOF;
4874 else if ((STps->eof == ST_NOEOF &&
4876 STps->eof == ST_FM_HIT) {
4877 if (STps->drv_file >= 0)
4878 STps->drv_file++;
4879 STps->drv_block = 0;
4880 STps->eof = ST_FM;
4887 STps->drv_file = STps->drv_block = STp->frame_seq_number = STp->logical_blk_num = 0;
4943 struct st_partstat * STps;
4963 STps = &(STp->ps[STp->partition]);
5010 if (STps->eof == ST_FM_HIT) {
5013 if (STps->drv_file >= 0)
5014 STps->drv_file += 1;
5018 if (STps->drv_file >= 0)
5019 STps->drv_file += 1;
5075 STps->rw >= ST_WRITING ? "write" : STps->rw == ST_READING ? "read" : "idle",
5077 STp->logical_blk_num, STps->drv_file, STps->drv_block );
5079 if (STps->rw >= ST_WRITING && STp->first_frame_position >= STp->eod_frame_ppos) {
5087 STp->frame_seq_number, STp->logical_blk_num, STps->drv_file, STps->drv_block );
5094 STps->rw = ST_IDLE;
5133 STps->drv_block = STps->drv_file = 0;
5189 mt_status.mt_blkno = STps->drv_block;
5190 mt_status.mt_fileno = STps->drv_file;
5192 if (STps->rw == ST_WRITING)
5194 else if (STps->rw == ST_READING)
5209 if (STps->eof == ST_EOM_OK || STps->eof == ST_EOM_ERROR)
5211 else if (STps->eof >= ST_EOM_OK)
5223 if (STps->at_sm)
5837 struct st_partstat * STps;
5951 STps = &(tpnt->ps[i]);
5952 STps->rw = ST_IDLE;
5953 STps->eof = ST_NOEOF;
5954 STps->at_sm = 0;
5955 STps->last_block_valid = 0;
5956 STps->drv_block = (-1);
5957 STps->drv_file = (-1);