Lines 119-124
Link Here
|
119 |
sc->sc_wrotebytes += bp->bio_length; |
119 |
sc->sc_wrotebytes += bp->bio_length; |
120 |
failprob = sc->sc_wfailprob; |
120 |
failprob = sc->sc_wfailprob; |
121 |
break; |
121 |
break; |
|
|
122 |
case BIO_DELETE: |
123 |
sc->sc_deletes++; |
124 |
break; |
125 |
case BIO_GETATTR: |
126 |
sc->sc_getattrs++; |
127 |
break; |
128 |
case BIO_FLUSH: |
129 |
sc->sc_flushes++; |
130 |
break; |
131 |
case BIO_CMD0: |
132 |
sc->sc_cmd0s++; |
133 |
break; |
134 |
case BIO_CMD1: |
135 |
sc->sc_cmd1s++; |
136 |
break; |
137 |
case BIO_CMD2: |
138 |
sc->sc_cmd2s++; |
139 |
break; |
122 |
} |
140 |
} |
123 |
mtx_unlock(&sc->sc_lock); |
141 |
mtx_unlock(&sc->sc_lock); |
124 |
if (failprob > 0) { |
142 |
if (failprob > 0) { |
Lines 224-229
Link Here
|
224 |
sc->sc_wfailprob = wfailprob; |
242 |
sc->sc_wfailprob = wfailprob; |
225 |
sc->sc_reads = 0; |
243 |
sc->sc_reads = 0; |
226 |
sc->sc_writes = 0; |
244 |
sc->sc_writes = 0; |
|
|
245 |
sc->sc_deletes = 0; |
246 |
sc->sc_getattrs = 0; |
247 |
sc->sc_flushes = 0; |
248 |
sc->sc_cmd0s = 0; |
249 |
sc->sc_cmd1s = 0; |
250 |
sc->sc_cmd2s = 0; |
227 |
sc->sc_readbytes = 0; |
251 |
sc->sc_readbytes = 0; |
228 |
sc->sc_wrotebytes = 0; |
252 |
sc->sc_wrotebytes = 0; |
229 |
mtx_init(&sc->sc_lock, "gnop lock", NULL, MTX_DEF); |
253 |
mtx_init(&sc->sc_lock, "gnop lock", NULL, MTX_DEF); |
Lines 566-571
Link Here
|
566 |
sc = pp->geom->softc; |
590 |
sc = pp->geom->softc; |
567 |
sc->sc_reads = 0; |
591 |
sc->sc_reads = 0; |
568 |
sc->sc_writes = 0; |
592 |
sc->sc_writes = 0; |
|
|
593 |
sc->sc_deletes = 0; |
594 |
sc->sc_getattrs = 0; |
595 |
sc->sc_flushes = 0; |
596 |
sc->sc_cmd0s = 0; |
597 |
sc->sc_cmd1s = 0; |
598 |
sc->sc_cmd2s = 0; |
569 |
sc->sc_readbytes = 0; |
599 |
sc->sc_readbytes = 0; |
570 |
sc->sc_wrotebytes = 0; |
600 |
sc->sc_wrotebytes = 0; |
571 |
} |
601 |
} |
Lines 623-628
Link Here
|
623 |
sbuf_printf(sb, "%s<Error>%d</Error>\n", indent, sc->sc_error); |
653 |
sbuf_printf(sb, "%s<Error>%d</Error>\n", indent, sc->sc_error); |
624 |
sbuf_printf(sb, "%s<Reads>%ju</Reads>\n", indent, sc->sc_reads); |
654 |
sbuf_printf(sb, "%s<Reads>%ju</Reads>\n", indent, sc->sc_reads); |
625 |
sbuf_printf(sb, "%s<Writes>%ju</Writes>\n", indent, sc->sc_writes); |
655 |
sbuf_printf(sb, "%s<Writes>%ju</Writes>\n", indent, sc->sc_writes); |
|
|
656 |
sbuf_printf(sb, "%s<Deletes>%ju</Deletes>\n", indent, sc->sc_deletes); |
657 |
sbuf_printf(sb, "%s<Getattrs>%ju</Getattrs>\n", indent, sc->sc_getattrs); |
658 |
sbuf_printf(sb, "%s<Flushes>%ju</Flushes>\n", indent, sc->sc_flushes); |
659 |
sbuf_printf(sb, "%s<Cmd0s>%ju</Cmd0s>\n", indent, sc->sc_cmd0s); |
660 |
sbuf_printf(sb, "%s<Cmd1s>%ju</Cmd1s>\n", indent, sc->sc_cmd1s); |
661 |
sbuf_printf(sb, "%s<Cmd2s>%ju</Cmd2s>\n", indent, sc->sc_cmd2s); |
626 |
sbuf_printf(sb, "%s<ReadBytes>%ju</ReadBytes>\n", indent, |
662 |
sbuf_printf(sb, "%s<ReadBytes>%ju</ReadBytes>\n", indent, |
627 |
sc->sc_readbytes); |
663 |
sc->sc_readbytes); |
628 |
sbuf_printf(sb, "%s<WroteBytes>%ju</WroteBytes>\n", indent, |
664 |
sbuf_printf(sb, "%s<WroteBytes>%ju</WroteBytes>\n", indent, |