Lines Matching refs:STps
596 struct st_partstat *STps;
620 STps = &(STp->ps[STp->partition]);
621 if (STps->drv_block >= 0) {
623 STps->drv_block++;
625 STps->drv_block += STbuffer->writing / STp->block_size;
641 STps->drv_block = -1;
696 struct st_partstat *STps;
723 STps = &(STp->ps[STp->partition]);
735 if (STps->drv_block >= 0)
736 STps->drv_block += blks;
741 STps->drv_block = (-1);
745 if (STps->drv_block >= 0)
746 STps->drv_block += blks;
763 struct st_partstat *STps;
776 STps = &(STp->ps[STp->partition]);
777 if (STps->rw == ST_WRITING) /* Writing */
791 if (STps->eof == ST_FM_HIT) {
794 STps->eof = ST_NOEOF;
796 if (STps->drv_file >= 0)
797 STps->drv_file++;
798 STps->drv_block = 0;
803 } else if (STps->eof == ST_FM_HIT) {
804 if (STps->drv_file >= 0)
805 STps->drv_file++;
806 STps->drv_block = 0;
807 STps->eof = ST_NOEOF;
873 struct st_partstat *STps;
877 STps = &(STp->ps[i]);
878 STps->rw = ST_IDLE;
879 STps->eof = ST_NOEOF;
880 STps->at_sm = 0;
881 STps->last_block_valid = 0;
882 STps->drv_block = -1;
883 STps->drv_file = -1;
984 struct st_partstat *STps;
1015 STps = &(STp->ps[i]);
1016 STps->rw = ST_IDLE;
1017 STps->eof = ST_NOEOF;
1018 STps->at_sm = 0;
1019 STps->last_block_valid = 0;
1020 STps->drv_block = 0;
1021 STps->drv_file = 0;
1183 struct st_partstat *STps;
1237 STps = &(STp->ps[i]);
1238 STps->rw = ST_IDLE;
1278 struct st_partstat *STps = &(STp->ps[STp->partition]);
1284 if (STps->rw == ST_WRITING && !STp->pos_unknown) {
1303 if (STps->rw == ST_WRITING && !STp->pos_unknown) {
1331 if (STps->drv_file >= 0)
1332 STps->drv_file++;
1333 STps->drv_block = 0;
1336 STps->eof = ST_FM;
1349 STps = &(STp->ps[STp->partition]);
1350 if (!STm->sysv || STps->rw != ST_READING) {
1353 else if (STps->eof == ST_FM_HIT) {
1356 if (STps->drv_file >= 0)
1357 STps->drv_file++;
1358 STps->drv_block = 0;
1359 STps->eof = ST_FM;
1361 STps->eof = ST_NOEOF;
1363 } else if ((STps->eof == ST_NOEOF &&
1365 STps->eof == ST_FM_HIT) {
1366 if (STps->drv_file >= 0)
1367 STps->drv_file++;
1368 STps->drv_block = 0;
1369 STps->eof = ST_FM;
1559 struct st_partstat *STps;
1579 STps = &(STp->ps[STp->partition]);
1587 if (STps->rw == ST_READING) {
1591 STps->rw = ST_WRITING;
1592 } else if (STps->rw != ST_WRITING &&
1593 STps->drv_file == 0 && STps->drv_block == 0) {
1613 STps->eof = ST_EOM_OK;
1615 STps->eof = ST_EOM_ERROR;
1618 if (STps->eof == ST_EOM_OK) {
1619 STps->eof = ST_EOD_1; /* allow next write */
1623 else if (STps->eof == ST_EOM_ERROR) {
1648 STps->rw = ST_WRITING;
1676 STm->do_async_writes && STps->eof < ST_EOM_OK;
1679 !(STp->try_dio_now && try_wdio) && STps->eof < ST_EOM_OK &&
1740 STps->eof = ST_EOM_OK;
1758 if (STps->drv_block >= 0) {
1759 STps->drv_block += (transfer - undone) /
1762 STps->eof = ST_EOM_OK;
1773 STps->eof = ST_EOM_ERROR;
1774 STps->drv_block = (-1); /* Too cautious? */
1783 STps->drv_block = (-1); /* Too cautious? */
1789 if (STps->drv_block >= 0) {
1791 STps->drv_block += (do_count > 0);
1793 STps->drv_block += blks;
1806 if (STps->eof == ST_EOD_1)
1807 STps->eof = ST_EOM_OK;
1808 else if (STps->eof != ST_EOM_OK)
1809 STps->eof = ST_NOEOF;
1835 struct st_partstat *STps;
1844 STps = &(STp->ps[STp->partition]);
1845 if (STps->eof == ST_FM_HIT)
1883 STps->at_sm = 0;
1918 if (STps->drv_block >= 0)
1919 STps->drv_block += 1;
1929 if (STps->drv_block >= 0)
1930 STps->drv_block += blks - transfer + 1;
1940 if (STps->drv_block >= 0)
1941 STps->drv_block += 1;
1946 if (STps->eof != ST_FM_HIT)
1947 STps->eof = ST_FM_HIT;
1949 STps->eof = ST_EOD_2;
1959 if (STps->eof == ST_FM)
1960 STps->eof = ST_EOD_1;
1962 STps->eof = ST_EOM_OK;
1977 STps->drv_block = (-1);
1978 if (STps->eof == ST_FM &&
1983 STps->eof = ST_EOD_2; /* First BLANK_CHECK after FM */
2004 if (STps->drv_block >= 0) {
2006 STps->drv_block++;
2008 STps->drv_block += STbp->buffer_bytes / STp->block_size;
2026 struct st_partstat *STps;
2046 STps = &(STp->ps[STp->partition]);
2047 if (STps->rw == ST_WRITING) {
2051 STps->rw = ST_READING;
2054 if (debugging && STps->eof != ST_NOEOF)
2056 STps->eof, STbp->buffer_bytes);
2065 STps->eof >= ST_EOD_1) {
2066 if (STps->eof < ST_EOD) {
2067 STps->eof += 1;
2087 STps->rw = ST_READING;
2105 if (debugging && STps->eof != ST_NOEOF)
2108 STps->eof, STbp->buffer_bytes,
2132 if (STps->eof == ST_FM_HIT) {
2133 STps->eof = ST_FM;
2134 STps->drv_block = 0;
2135 if (STps->drv_file >= 0)
2136 STps->drv_file++;
2137 } else if (STps->eof == ST_EOD_1) {
2138 STps->eof = ST_EOD_2;
2139 STps->drv_block = 0;
2140 if (STps->drv_file >= 0)
2141 STps->drv_file++;
2142 } else if (STps->eof == ST_EOD_2)
2143 STps->eof = ST_EOD;
2144 } else if (STps->eof == ST_FM)
2145 STps->eof = ST_NOEOF;
2518 struct st_partstat *STps;
2578 STps = &(STp->ps[STp->partition]);
2579 STps->drv_file = STps->drv_block = (-1);
2612 struct st_partstat *STps;
2625 STps = &(STp->ps[STp->partition]);
2626 fileno = STps->drv_file;
2627 blkno = STps->drv_block;
2628 at_sm = STps->at_sm;
2760 fileno = STps->drv_file;
2761 if (STps->eof >= ST_EOD_1)
2867 STps->drv_block = blkno;
2868 STps->drv_file = fileno;
2869 STps->at_sm = at_sm;
2891 STps->eof = ST_EOD;
2893 STps->eof = ST_FM;
2895 STps->eof = ST_NOEOF;
2898 STps->rw = ST_IDLE;
2906 STps->eof = ST_EOM_OK;
2907 STps->drv_block = 0;
2921 STps->eof = ST_NOEOF;
2926 STps->eof = ST_NOEOF;
2928 STps->drv_file = fileno;
2931 STps->drv_file = fileno - undone;
2933 STps->drv_file = fileno;
2934 STps->drv_block = -1;
2935 STps->eof = ST_NOEOF;
2939 if (STps->drv_file >= 0)
2940 STps->drv_file = fileno + undone;
2941 STps->drv_block = 0;
2942 STps->eof = ST_NOEOF;
2945 if (STps->drv_file >= 0)
2946 STps->drv_file++;
2947 STps->drv_block = 0;
2948 STps->eof = ST_FM;
2951 STps->drv_block = blkno - undone;
2953 STps->drv_block = (-1);
2954 STps->eof = ST_NOEOF;
2958 STps->drv_file--;
2959 STps->drv_block = (-1);
2963 if (STps->drv_block >= 0)
2964 STps->drv_block = blkno + undone;
2966 STps->eof = ST_NOEOF;
2968 STps->drv_file = (-1);
2969 STps->drv_block = (-1);
2970 STps->eof = ST_EOD;
2985 STps->eof = ST_NOEOF;
2988 STps->eof = ST_EOD;
3066 struct st_partstat *STps;
3077 STps = &(STp->ps[STp->partition]);
3090 STps->last_block_valid = 0;
3092 STps->last_block_valid = 1;
3093 STps->last_block_visited = blk;
3133 STps->drv_block = STps->drv_file = (-1);
3134 STps->eof = ST_NOEOF;
3144 STps = &(STp->ps[partition]);
3145 if (!STps->last_block_valid ||
3146 STps->last_block_visited != block) {
3147 STps->at_sm = 0;
3148 STps->rw = ST_IDLE;
3151 STps->at_sm = 0;
3153 STps->drv_block = STps->drv_file = 0;
3182 struct st_partstat *STps;
3186 STps = &(STp->ps[STp->new_partition]);
3187 if (!STps->last_block_valid)
3188 STps->last_block_visited = 0;
3189 return set_location(STp, STps->last_block_visited, STp->new_partition, 1);
3322 struct st_partstat *STps;
3337 STps = &(STp->ps[STp->partition]);
3383 if (STps->eof == ST_FM_HIT) {
3387 if (STps->drv_file >= 0)
3388 STps->drv_file += 1;
3391 if (STps->drv_file >= 0)
3392 STps->drv_file += 1;
3414 if (STps->rw == ST_WRITING &&
3425 STps->rw = ST_IDLE;
3451 STps->rw = ST_IDLE; /* Prevent automatic WEOF and fsf */
3499 STps->drv_block = STps->drv_file = 0;
3566 mt_status.mt_blkno = STps->drv_block;
3567 mt_status.mt_fileno = STps->drv_file;
3569 if (STps->rw == ST_WRITING)
3572 else if (STps->rw == ST_READING)
3589 if (STps->eof == ST_EOM_OK || STps->eof == ST_EOM_ERROR)
3591 else if (STps->eof >= ST_EOM_OK)
3603 if (STps->at_sm)
3990 struct st_partstat *STps;
4118 STps = &(tpnt->ps[i]);
4119 STps->rw = ST_IDLE;
4120 STps->eof = ST_NOEOF;
4121 STps->at_sm = 0;
4122 STps->last_block_valid = 0;
4123 STps->drv_block = (-1);
4124 STps->drv_file = (-1);