bin/chio/chio.c
915
char f, sep, *bp;
bin/chio/chio.c
918
bp = buf;
bin/chio/chio.c
926
(void) snprintf(bp, sizeof(buf) - (size_t)(bp - &buf[0]),
bin/chio/chio.c
928
bp += strlen(bp);
bin/chio/chio.c
932
*bp = '>';
bin/ed/main.c
1066
line_t *bp, *ep;
bin/ed/main.c
1069
bp = get_addressed_line_node(from);
bin/ed/main.c
1070
for (; bp != ep; bp = bp->q_forw) {
bin/ed/main.c
1071
if ((s = get_sbuf_line(bp)) == NULL)
bin/ed/main.c
1073
REALLOC(buf, n, size + bp->len, ERR);
bin/ed/main.c
1074
memcpy(buf + size, s, bp->len);
bin/ed/main.c
1075
size += bp->len;
bin/ed/main.c
1203
line_t *bp;
bin/ed/main.c
1212
bp = get_addressed_line_node(from);
bin/ed/main.c
1213
for (; bp != ep; bp = bp->q_forw) {
bin/ed/main.c
1214
if ((s = get_sbuf_line(bp)) == NULL)
bin/ed/main.c
1216
if (put_tty_line(s, bp->len, current_addr = from++, gflag) < 0)
bin/kenv/kenv.c
149
char *buf, *bp, *cp;
bin/kenv/kenv.c
171
for (bp = buf; *bp != '\0'; bp += strlen(bp) + 1) {
bin/kenv/kenv.c
173
if (strncmp(bp, "hint.", 5) != 0)
bin/kenv/kenv.c
176
cp = strchr(bp, '=');
bin/kenv/kenv.c
181
printf("%s\n", bp);
bin/kenv/kenv.c
183
printf("%s=\"%s\"\n", bp, cp);
bin/kenv/kenv.c
184
bp = cp;
bin/ls/ls.c
241
char *bp = tcapbuf, *term;
bin/ls/ls.c
509
ansi_fgcol = tgetstr("AF", &bp);
bin/ls/ls.c
510
ansi_bgcol = tgetstr("AB", &bp);
bin/ls/ls.c
511
attrs_off = tgetstr("me", &bp);
bin/ls/ls.c
512
enter_bold = tgetstr("md", &bp);
bin/ls/ls.c
513
enter_underline = tgetstr("us", &bp);
bin/ls/ls.c
518
ansi_coloff = tgetstr("op", &bp);
bin/ls/ls.c
520
ansi_coloff = tgetstr("oc", &bp);
bin/mv/mv.c
260
static char *bp = NULL;
bin/mv/mv.c
270
if (bp == NULL && (bp = malloc(blen)) == NULL) {
bin/mv/mv.c
283
while ((nread = read(from_fd, bp, blen)) > 0)
bin/mv/mv.c
284
if (write(to_fd, bp, (size_t)nread) != nread) {
bin/ps/print.c
737
printval(void *bp, const VAR *v)
bin/ps/print.c
755
(void)asprintf(&str, ofmt, *(char *)bp);
bin/ps/print.c
758
(void)asprintf(&str, ofmt, *(signed char *)bp);
bin/ps/print.c
761
(void)asprintf(&str, ofmt, *(u_char *)bp);
bin/ps/print.c
764
(void)asprintf(&str, ofmt, *(short *)bp);
bin/ps/print.c
767
(void)asprintf(&str, ofmt, *(u_short *)bp);
bin/ps/print.c
770
(void)asprintf(&str, ofmt, *(int *)bp);
bin/ps/print.c
773
(void)asprintf(&str, ofmt, CHKINF127(*(u_int *)bp));
bin/ps/print.c
776
(void)asprintf(&str, ofmt, *(long *)bp);
bin/ps/print.c
779
(void)asprintf(&str, ofmt, *(u_long *)bp);
bin/ps/print.c
782
(void)asprintf(&str, ofmt, *(u_long *)bp);
bin/ps/print.c
785
(void)asprintf(&str, ofmt, ps_pgtok(*(u_long *)bp));
bin/sh/exec.c
474
const unsigned char *bp;
bin/sh/exec.c
478
for (bp = builtincmd ; *bp ; bp += 2 + bp[0]) {
bin/sh/exec.c
479
if (bp[0] == len && memcmp(bp + 2, name, len) == 0) {
bin/sh/exec.c
480
*special = (bp[1] & BUILTIN_SPECIAL) != 0;
bin/sh/exec.c
481
return bp[1] & ~BUILTIN_SPECIAL;
bin/sh/histedit.c
665
for (const unsigned char *bp = builtincmd; *bp != 0; bp += 2 + bp[0]) {
bin/sh/histedit.c
666
if (curpos > bp[0] || memcmp(bp + 2, text, curpos) != 0)
bin/sh/histedit.c
668
rmatches = add_match(matches, ++i, &size, strndup(bp + 2, bp[0]));
bin/stty/print.c
256
char *bp;
bin/stty/print.c
264
bp = buf;
bin/stty/print.c
266
*bp++ = 'M';
bin/stty/print.c
267
*bp++ = '-';
bin/stty/print.c
271
*bp++ = '^';
bin/stty/print.c
272
*bp++ = '?';
bin/stty/print.c
275
*bp++ = '^';
bin/stty/print.c
276
*bp++ = c + '@';
bin/stty/print.c
279
*bp++ = c;
bin/stty/print.c
280
*bp = '\0';
crypto/heimdal/appl/rcp/rcp.c
154
char *bp, *host, *src, *suser, *thost, *tuser;
crypto/heimdal/appl/rcp/rcp.c
190
ret = asprintf(&bp,
crypto/heimdal/appl/rcp/rcp.c
198
ret = asprintf(&bp,
crypto/heimdal/appl/rcp/rcp.c
207
susystem(bp);
crypto/heimdal/appl/rcp/rcp.c
208
free(bp);
crypto/heimdal/appl/rcp/rcp.c
211
if (asprintf(&bp, "%s -t %s", cmd, targ) == -1)
crypto/heimdal/appl/rcp/rcp.c
215
if (do_cmd(host, tuser, bp, &remin, &remout) < 0)
crypto/heimdal/appl/rcp/rcp.c
220
free(bp);
crypto/heimdal/appl/rcp/rcp.c
231
char *bp, *host, *src, *suser;
crypto/heimdal/appl/rcp/rcp.c
237
ret = asprintf(&bp, "exec %s%s%s %s %s", _PATH_CP,
crypto/heimdal/appl/rcp/rcp.c
242
if (susystem(bp))
crypto/heimdal/appl/rcp/rcp.c
244
free(bp);
crypto/heimdal/appl/rcp/rcp.c
261
ret = asprintf(&bp, "%s -f %s", cmd, src);
crypto/heimdal/appl/rcp/rcp.c
264
if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
crypto/heimdal/appl/rcp/rcp.c
265
free(bp);
crypto/heimdal/appl/rcp/rcp.c
269
free(bp);
crypto/heimdal/appl/rcp/rcp.c
281
BUF *bp;
crypto/heimdal/appl/rcp/rcp.c
327
if ((bp = allocbuf(&buffer, fd, BUFSIZ)) == NULL) {
crypto/heimdal/appl/rcp/rcp.c
333
for (haderr = i = 0; i < stb.st_size; i += bp->cnt) {
crypto/heimdal/appl/rcp/rcp.c
334
amt = bp->cnt;
crypto/heimdal/appl/rcp/rcp.c
338
result = read(fd, bp->buf, (size_t)amt);
crypto/heimdal/appl/rcp/rcp.c
343
write(remout, bp->buf, amt);
crypto/heimdal/appl/rcp/rcp.c
345
result = write(remout, bp->buf, (size_t)amt);
crypto/heimdal/appl/rcp/rcp.c
419
BUF *bp;
crypto/heimdal/appl/rcp/rcp.c
569
if ((bp = allocbuf(&buffer, ofd, BUFSIZ)) == NULL) {
crypto/heimdal/appl/rcp/rcp.c
573
cp = bp->buf;
crypto/heimdal/appl/rcp/rcp.c
587
if (count == bp->cnt) {
crypto/heimdal/appl/rcp/rcp.c
590
j = write(ofd, bp->buf, (size_t)count);
crypto/heimdal/appl/rcp/rcp.c
597
cp = bp->buf;
crypto/heimdal/appl/rcp/rcp.c
601
(j = write(ofd, bp->buf, (size_t)count)) != count) {
crypto/heimdal/appl/rcp/util.c
146
allocbuf(bp, fd, blksize)
crypto/heimdal/appl/rcp/util.c
147
BUF *bp;
crypto/heimdal/appl/rcp/util.c
161
if (bp->cnt >= size)
crypto/heimdal/appl/rcp/util.c
162
return (bp);
crypto/heimdal/appl/rcp/util.c
163
if ((p = realloc(bp->buf, size)) == NULL) {
crypto/heimdal/appl/rcp/util.c
164
if (bp->buf)
crypto/heimdal/appl/rcp/util.c
165
free(bp->buf);
crypto/heimdal/appl/rcp/util.c
166
bp->buf = NULL;
crypto/heimdal/appl/rcp/util.c
167
bp->cnt = 0;
crypto/heimdal/appl/rcp/util.c
172
bp->buf = p;
crypto/heimdal/appl/rcp/util.c
173
bp->cnt = size;
crypto/heimdal/appl/rcp/util.c
174
return (bp);
crypto/heimdal/lib/roken/getcap.c
1009
while (*bp != ':' && *bp != '\0') {
crypto/heimdal/lib/roken/getcap.c
1016
*mp++ = *bp++;
crypto/heimdal/lib/roken/getcap.c
1057
const char *bp;
crypto/heimdal/lib/roken/getcap.c
1062
bp = cgetcap(buf, cap, '#');
crypto/heimdal/lib/roken/getcap.c
1063
if (bp == NULL)
crypto/heimdal/lib/roken/getcap.c
1072
if (*bp == '0') {
crypto/heimdal/lib/roken/getcap.c
1073
bp++;
crypto/heimdal/lib/roken/getcap.c
1074
if (*bp == 'x' || *bp == 'X') {
crypto/heimdal/lib/roken/getcap.c
1075
bp++;
crypto/heimdal/lib/roken/getcap.c
1087
if ('0' <= *bp && *bp <= '9')
crypto/heimdal/lib/roken/getcap.c
1088
digit = *bp - '0';
crypto/heimdal/lib/roken/getcap.c
1089
else if ('a' <= *bp && *bp <= 'f')
crypto/heimdal/lib/roken/getcap.c
1090
digit = 10 + *bp - 'a';
crypto/heimdal/lib/roken/getcap.c
1091
else if ('A' <= *bp && *bp <= 'F')
crypto/heimdal/lib/roken/getcap.c
1092
digit = 10 + *bp - 'A';
crypto/heimdal/lib/roken/getcap.c
1100
bp++;
crypto/heimdal/lib/roken/getcap.c
159
char *bp;
crypto/heimdal/lib/roken/getcap.c
162
bp = buf;
crypto/heimdal/lib/roken/getcap.c
170
if (*bp == '\0')
crypto/heimdal/lib/roken/getcap.c
173
if (*bp++ == ':')
crypto/heimdal/lib/roken/getcap.c
179
for (cp = cap; *cp == *bp && *bp != '\0'; cp++, bp++)
crypto/heimdal/lib/roken/getcap.c
183
if (*bp == '@')
crypto/heimdal/lib/roken/getcap.c
186
if (*bp != '\0' && *bp != ':')
crypto/heimdal/lib/roken/getcap.c
188
return(bp);
crypto/heimdal/lib/roken/getcap.c
190
if (*bp != type)
crypto/heimdal/lib/roken/getcap.c
192
bp++;
crypto/heimdal/lib/roken/getcap.c
193
return (*bp == '@' ? NULL : bp);
crypto/heimdal/lib/roken/getcap.c
333
char *b_end, *bp, *cp;
crypto/heimdal/lib/roken/getcap.c
346
bp = buf;
crypto/heimdal/lib/roken/getcap.c
357
if (bp >= b_end) {
crypto/heimdal/lib/roken/getcap.c
374
bp = buf;
crypto/heimdal/lib/roken/getcap.c
377
c = *bp++;
crypto/heimdal/lib/roken/getcap.c
618
cdbget(DB *capdbp, char **bp, const char *name)
crypto/heimdal/lib/roken/getcap.c
644
*bp = (char *)data.data + 1;
crypto/heimdal/lib/roken/getcap.c
656
const char *np, *bp;
crypto/heimdal/lib/roken/getcap.c
661
bp = buf;
crypto/heimdal/lib/roken/getcap.c
669
if (*bp == '|' || *bp == ':' || *bp == '\0')
crypto/heimdal/lib/roken/getcap.c
674
if (*bp++ != *np++)
crypto/heimdal/lib/roken/getcap.c
680
bp--; /* a '|' or ':' may have stopped the match */
crypto/heimdal/lib/roken/getcap.c
682
if (*bp == '\0' || *bp == ':')
crypto/heimdal/lib/roken/getcap.c
685
if (*bp++ == '|')
crypto/heimdal/lib/roken/getcap.c
723
cgetnext(char **bp, char **db_array)
crypto/heimdal/lib/roken/getcap.c
831
status = getent(bp, &dummy, db_array, -1, buf, 0, NULL);
crypto/heimdal/lib/roken/getcap.c
854
const char *bp;
crypto/heimdal/lib/roken/getcap.c
864
bp = cgetcap(buf, cap, '=');
crypto/heimdal/lib/roken/getcap.c
865
if (bp == NULL)
crypto/heimdal/lib/roken/getcap.c
879
while (*bp != ':' && *bp != '\0') {
crypto/heimdal/lib/roken/getcap.c
886
if (*bp == '^') {
crypto/heimdal/lib/roken/getcap.c
887
bp++;
crypto/heimdal/lib/roken/getcap.c
888
if (*bp == ':' || *bp == '\0')
crypto/heimdal/lib/roken/getcap.c
890
*mp++ = *bp++ & 037;
crypto/heimdal/lib/roken/getcap.c
891
} else if (*bp == '\\') {
crypto/heimdal/lib/roken/getcap.c
892
bp++;
crypto/heimdal/lib/roken/getcap.c
893
if (*bp == ':' || *bp == '\0')
crypto/heimdal/lib/roken/getcap.c
895
if ('0' <= *bp && *bp <= '7') {
crypto/heimdal/lib/roken/getcap.c
901
n = n * 8 + (*bp++ - '0');
crypto/heimdal/lib/roken/getcap.c
902
} while (--i && '0' <= *bp && *bp <= '7');
crypto/heimdal/lib/roken/getcap.c
905
else switch (*bp++) {
crypto/heimdal/lib/roken/getcap.c
93
int cgetnext(char **bp, char **db_array);
crypto/heimdal/lib/roken/getcap.c
932
*mp++ = *(bp-1);
crypto/heimdal/lib/roken/getcap.c
936
*mp++ = *bp++;
crypto/heimdal/lib/roken/getcap.c
987
const char *bp;
crypto/heimdal/lib/roken/getcap.c
995
if ((bp = cgetcap(buf, cap, '=')) == NULL)
crypto/krb5/src/clients/klist/klist.c
591
char *bp = buf;
crypto/krb5/src/clients/klist/klist.c
595
deplen = strlcpy(bp, "DEPRECATED:", buflen);
crypto/krb5/src/clients/klist/klist.c
597
bp += deplen;
crypto/krb5/src/clients/klist/klist.c
600
if (krb5_enctype_to_name(enctype, FALSE, bp, buflen))
crypto/krb5/src/clients/klist/klist.c
601
snprintf(bp, buflen, "etype %d", enctype);
crypto/krb5/src/lib/crypto/krb/prng.c
73
unsigned char *bp;
crypto/krb5/src/lib/crypto/krb/prng.c
85
for (bp = buf, left = len; left > 0;) {
crypto/krb5/src/lib/crypto/krb/prng.c
86
count = read(fd, bp, left);
crypto/krb5/src/lib/crypto/krb/prng.c
90
bp += count;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
101
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain)) {
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
113
*buffer = bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
157
krb5_octet *bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
161
bp = *buffer;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
165
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
171
err = g_seqstate_internalize(argp, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
176
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain)) {
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
186
*buffer = bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
319
krb5_octet *bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
328
bp = *buffer;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
336
(void) krb5_ser_pack_int32(KG_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
340
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
342
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
344
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
346
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
348
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
351
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
353
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
355
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
357
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
359
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
361
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
363
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
365
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
367
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
369
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
371
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
377
kret = kg_oid_externalize(ctx->mech_used, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
381
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
385
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
389
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
393
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
397
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
400
kret = kg_seqstate_externalize(ctx->seqstate, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
403
kret = k5_externalize_context(ctx->k5_context, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
407
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
411
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
414
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
417
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
420
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
424
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
433
kret = krb5_ser_pack_int32(i, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
438
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
451
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
456
kret = krb5_ser_pack_int32(KG_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
458
*buffer = bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
468
intern_key(krb5_key *key, krb5_octet **bp, size_t *sp)
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
473
ret = k5_internalize_keyblock(&keyblock, bp, sp);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
491
krb5_octet *bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
500
bp = *buffer;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
505
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
521
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
523
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
525
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
527
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
529
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
533
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
534
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
536
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
538
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
540
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
542
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
544
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
546
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
548
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
551
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
553
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
561
kret = kg_oid_internalize(&tmp, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
568
kret = k5_internalize_principal(&princ, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
577
kret = k5_internalize_principal(&princ, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
587
(kret = intern_key(&ctx->subkey, &bp, &remain))) {
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
592
(kret = intern_key(&ctx->enc, &bp, &remain))) {
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
597
(kret = intern_key(&ctx->seq, &bp, &remain))) {
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
603
kret = kg_seqstate_internalize(&ctx->seqstate, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
609
kret = k5_internalize_context(&ctx->k5_context, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
613
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
616
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
619
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
622
(kret = intern_key(&ctx->acceptor_subkey, &bp, &remain))) {
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
627
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
630
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
634
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
646
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
661
&bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
668
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
67
krb5_octet *bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
673
*buffer = bp;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
70
bp = *buffer;
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
74
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
83
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain)) {
crypto/krb5/src/lib/gssapi/krb5/ser_sctx.c
94
oid->length, &bp, &remain)) {
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
225
uint8_t *bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
234
ret = krb5_ser_pack_int32(count, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
240
ret = krb5_ser_pack_int32(aictx->indicators[i]->length, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
244
aictx->indicators[i]->length, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
249
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
263
uint8_t *bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
268
ret = krb5_ser_unpack_int32(&count, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
283
ret = krb5_ser_unpack_int32(&len, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
298
ret = krb5_ser_unpack_bytes((uint8_t *)inds[i]->data, len, &bp,
crypto/krb5/src/lib/krb5/krb/ai_authdata.c
308
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
1056
krb5_octet *contents, *bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
1074
bp = contents;
crypto/krb5/src/lib/krb5/krb/authdata.c
1081
&bp,
crypto/krb5/src/lib/krb5/krb/authdata.c
1088
remain = (bp - contents);
crypto/krb5/src/lib/krb5/krb/authdata.c
1089
bp = contents;
crypto/krb5/src/lib/krb5/krb/authdata.c
1095
&bp,
crypto/krb5/src/lib/krb5/krb/authdata.c
1177
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
1180
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/authdata.c
1184
code = krb5_ser_pack_int32(KV5M_AUTHDATA_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
1190
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
1195
code = krb5_ser_pack_int32(KV5M_AUTHDATA_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
1199
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
1216
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
1219
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/authdata.c
1222
code = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
1234
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
1240
code = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
1249
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
209
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
212
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/authdata.c
216
code = krb5_ser_pack_int32(0, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
240
code = krb5_ser_pack_int32((krb5_int32)namelen, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
245
namelen, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
253
&bp,
crypto/krb5/src/lib/krb5/krb/authdata.c
265
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
318
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
321
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/authdata.c
324
code = krb5_ser_unpack_int32(&count, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
333
code = krb5_ser_unpack_int32(&namelen, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
343
name.data = (char *)bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
351
bp += namelen;
crypto/krb5/src/lib/krb5/krb/authdata.c
358
&bp,
crypto/krb5/src/lib/krb5/krb/authdata.c
365
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
491
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
494
bp = (krb5_octet *)attrs->data;
crypto/krb5/src/lib/krb5/krb/authdata.c
497
return k5_ad_internalize(kcontext, context, usage, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
931
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/authdata.c
951
bp = (krb5_octet *)attrs->data;
crypto/krb5/src/lib/krb5/krb/authdata.c
954
code = k5_ad_externalize(kcontext, context, AD_USAGE_MASK, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/authdata.c
960
attrs->length = (bp - (krb5_octet *)attrs->data);
crypto/krb5/src/lib/krb5/krb/pac.c
1161
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/pac.c
1164
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/pac.c
1171
krb5_ser_pack_int32(pacctx->pac->data.length, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/pac.c
1174
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/pac.c
1175
krb5_ser_pack_int32(pacctx->pac->verified, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/pac.c
1180
krb5_ser_pack_int32(0, &bp, &remain); /* length */
crypto/krb5/src/lib/krb5/krb/pac.c
1181
krb5_ser_pack_int32(0, &bp, &remain); /* verified */
crypto/krb5/src/lib/krb5/krb/pac.c
1184
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/pac.c
1198
uint8_t *bp;
crypto/krb5/src/lib/krb5/krb/pac.c
1202
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/pac.c
1206
ret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/pac.c
1211
ret = krb5_pac_parse(context, bp, ibuf, &pac);
crypto/krb5/src/lib/krb5/krb/pac.c
1215
bp += ibuf;
crypto/krb5/src/lib/krb5/krb/pac.c
1220
ret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/pac.c
1234
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_actx.c
130
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_actx.c
134
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_actx.c
143
(void) krb5_ser_pack_int32(KV5M_AUTH_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
145
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
147
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
149
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
151
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
153
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
156
(void) krb5_ser_pack_int32(auth_context->cstate.length, &bp,
crypto/krb5/src/lib/krb5/krb/ser_actx.c
160
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
166
(void) krb5_ser_pack_int32(TOKEN_RADDR, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
168
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
173
(void) krb5_ser_pack_int32(TOKEN_RPORT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
175
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
180
(void) krb5_ser_pack_int32(TOKEN_LADDR, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
182
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
187
(void) krb5_ser_pack_int32(TOKEN_LPORT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
189
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
194
(void) krb5_ser_pack_int32(TOKEN_KEYBLOCK, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
196
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
201
(void) krb5_ser_pack_int32(TOKEN_LSKBLOCK, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
204
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
209
(void) krb5_ser_pack_int32(TOKEN_RSKBLOCK, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
212
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
218
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
226
(void) krb5_ser_pack_int32(KV5M_AUTH_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
227
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_actx.c
237
intern_key(krb5_key *key, krb5_octet **bp, size_t *sp)
crypto/krb5/src/lib/krb5/krb/ser_actx.c
242
ret = k5_internalize_keyblock(&keyblock, bp, sp);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
257
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_actx.c
262
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_actx.c
266
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/krb5/krb/ser_actx.c
277
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
281
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
285
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
289
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
293
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
297
(void) krb5_ser_unpack_int32(&cstate_len, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
304
cstate_len, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
313
kret = krb5_ser_unpack_int32(&tag, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
318
&bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_actx.c
319
kret = krb5_ser_unpack_int32(&tag, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
325
&bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_actx.c
326
kret = krb5_ser_unpack_int32(&tag, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
332
&bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_actx.c
333
kret = krb5_ser_unpack_int32(&tag, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
339
&bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_actx.c
340
kret = krb5_ser_unpack_int32(&tag, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
345
if (!(kret = intern_key(&auth_context->key, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_actx.c
346
kret = krb5_ser_unpack_int32(&tag, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
352
&bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_actx.c
353
kret = krb5_ser_unpack_int32(&tag, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
360
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
367
bp -= sizeof(krb5_int32);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
375
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
382
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_actx.c
387
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_adata.c
104
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_adata.c
107
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_adata.c
111
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/krb5/krb/ser_adata.c
121
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_adata.c
125
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_adata.c
133
&bp, &remain))) {
crypto/krb5/src/lib/krb5/krb/ser_adata.c
134
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_adata.c
138
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_adata.c
61
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_adata.c
65
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_adata.c
72
(void) krb5_ser_pack_int32(KV5M_AUTHDATA, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_adata.c
76
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_adata.c
80
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_adata.c
85
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_adata.c
88
(void) krb5_ser_pack_int32(KV5M_AUTHDATA, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_adata.c
90
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_addr.c
105
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_addr.c
108
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_addr.c
112
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/krb5/krb/ser_addr.c
124
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_addr.c
128
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_addr.c
135
&bp, &remain))) {
crypto/krb5/src/lib/krb5/krb/ser_addr.c
137
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_addr.c
142
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_addr.c
61
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_addr.c
65
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_addr.c
72
(void) krb5_ser_pack_int32(KV5M_ADDRESS, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_addr.c
76
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_addr.c
80
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_addr.c
85
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_addr.c
88
(void) krb5_ser_pack_int32(KV5M_ADDRESS, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_addr.c
91
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_auth.c
103
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
107
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
111
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
116
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
123
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
128
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
136
(void) krb5_ser_pack_int32((krb5_int32) i, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
144
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
154
(void) krb5_ser_pack_int32(KV5M_AUTHENTICATOR, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
155
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_auth.c
170
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_auth.c
176
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_auth.c
180
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/krb5/krb/ser_auth.c
191
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
195
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
199
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
206
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
213
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
221
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
227
if (!(kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain))) {
crypto/krb5/src/lib/krb5/krb/ser_auth.c
237
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
242
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_auth.c
251
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_auth.c
86
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_auth.c
91
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_auth.c
99
(void) krb5_ser_pack_int32(KV5M_AUTHENTICATOR, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
105
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
108
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
112
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
121
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
125
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
134
&bp, &remain)))) {
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
137
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
140
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
61
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
65
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
72
(void) krb5_ser_pack_int32(KV5M_CHECKSUM, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
76
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
80
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
85
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
88
(void) krb5_ser_pack_int32(KV5M_CHECKSUM, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_cksum.c
91
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
102
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
116
kret = krb5_ser_pack_int32(KV5M_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
123
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
131
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
137
kret = krb5_ser_pack_int32(etypes_len(context->tgs_etypes), &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
144
kret = krb5_ser_pack_int32(context->tgs_etypes[i], &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
152
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
158
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
164
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
170
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
176
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
181
kret = externalize_oscontext(&context->os_context, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
187
kret = profile_ser_externalize(context->profile, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
196
kret = krb5_ser_pack_int32(KV5M_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
200
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
213
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
217
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
221
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
233
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
244
(size_t) ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
252
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
262
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
271
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
276
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
281
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
286
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
291
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
300
kret = internalize_oscontext(&osp, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
311
kret = profile_ser_internalize(&context->profile, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
316
if ((kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain)))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
325
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
355
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
359
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
365
(void) krb5_ser_pack_int32(KV5M_OS_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
366
(void) krb5_ser_pack_int32(os_ctx->time_offset, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
367
(void) krb5_ser_pack_int32(os_ctx->usec_offset, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
368
(void) krb5_ser_pack_int32(os_ctx->os_flags, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
369
(void) krb5_ser_pack_int32(KV5M_OS_CONTEXT, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
374
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
389
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
392
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
397
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
409
(void) krb5_ser_unpack_int32(&os_ctx->time_offset, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
410
(void) krb5_ser_unpack_int32(&os_ctx->usec_offset, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
411
(void) krb5_ser_unpack_int32(&os_ctx->os_flags, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
412
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
417
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_ctx.c
97
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_key.c
101
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_key.c
104
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_key.c
108
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
crypto/krb5/src/lib/krb5/krb/ser_key.c
117
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
121
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
128
&bp, &remain))) {
crypto/krb5/src/lib/krb5/krb/ser_key.c
129
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
132
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_key.c
57
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_key.c
61
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_key.c
68
(void) krb5_ser_pack_int32(KV5M_KEYBLOCK, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
72
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
76
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
81
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
84
(void) krb5_ser_pack_int32(KV5M_KEYBLOCK, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_key.c
87
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_princ.c
103
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain) || ibuf != KV5M_PRINCIPAL)
crypto/krb5/src/lib/krb5/krb/ser_princ.c
107
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_princ.c
112
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_princ.c
125
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain) || ibuf != KV5M_PRINCIPAL) {
crypto/krb5/src/lib/krb5/krb/ser_princ.c
130
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_princ.c
58
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_princ.c
63
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/ser_princ.c
71
(void) krb5_ser_pack_int32(KV5M_PRINCIPAL, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_princ.c
73
&bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_princ.c
75
strlen(fname), &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_princ.c
76
(void) krb5_ser_pack_int32(KV5M_PRINCIPAL, &bp, &remain);
crypto/krb5/src/lib/krb5/krb/ser_princ.c
77
*buffer = bp;
crypto/krb5/src/lib/krb5/krb/ser_princ.c
94
krb5_octet *bp;
crypto/krb5/src/lib/krb5/krb/ser_princ.c
99
bp = *buffer;
crypto/krb5/src/lib/krb5/krb/strptime.c
116
if (!(bp = strptime(bp, _ctloc(d_t_fmt), tm)))
crypto/krb5/src/lib/krb5/krb/strptime.c
122
if (!(bp = strptime(bp, "%m/%d/%y", tm)))
crypto/krb5/src/lib/krb5/krb/strptime.c
128
if (!(bp = strptime(bp, "%H:%M", tm)))
crypto/krb5/src/lib/krb5/krb/strptime.c
134
if (!(bp = strptime(bp, _ctloc(t_fmt_ampm), tm)))
crypto/krb5/src/lib/krb5/krb/strptime.c
140
if (!(bp = strptime(bp, "%H:%M:%S", tm)))
crypto/krb5/src/lib/krb5/krb/strptime.c
146
if (!(bp = strptime(bp, _ctloc(t_fmt), tm)))
crypto/krb5/src/lib/krb5/krb/strptime.c
152
if (!(bp = strptime(bp, _ctloc(d_fmt), tm)))
crypto/krb5/src/lib/krb5/krb/strptime.c
165
if (strncasecmp(_ctloc(day[i]), bp, len) == 0)
crypto/krb5/src/lib/krb5/krb/strptime.c
170
if (strncasecmp(_ctloc(abday[i]), bp, len) == 0)
crypto/krb5/src/lib/krb5/krb/strptime.c
179
bp += len;
crypto/krb5/src/lib/krb5/krb/strptime.c
189
if (strncasecmp(_ctloc(mon[i]), bp, len) == 0)
crypto/krb5/src/lib/krb5/krb/strptime.c
194
if (strncasecmp(_ctloc(abmon[i]), bp, len) == 0)
crypto/krb5/src/lib/krb5/krb/strptime.c
203
bp += len;
crypto/krb5/src/lib/krb5/krb/strptime.c
208
if (!(conv_num(&bp, &i, 0, 99)))
crypto/krb5/src/lib/krb5/krb/strptime.c
222
if (!(conv_num(&bp, &tm->tm_mday, 1, 31)))
crypto/krb5/src/lib/krb5/krb/strptime.c
231
if (!(conv_num(&bp, &tm->tm_hour, 0, 23)))
crypto/krb5/src/lib/krb5/krb/strptime.c
240
if (!(conv_num(&bp, &tm->tm_hour, 1, 12)))
crypto/krb5/src/lib/krb5/krb/strptime.c
248
if (!(conv_num(&bp, &i, 1, 366)))
crypto/krb5/src/lib/krb5/krb/strptime.c
255
if (!(conv_num(&bp, &tm->tm_min, 0, 59)))
crypto/krb5/src/lib/krb5/krb/strptime.c
261
if (!(conv_num(&bp, &i, 1, 12)))
crypto/krb5/src/lib/krb5/krb/strptime.c
269
if (strcasecmp(_ctloc(am_pm[0]), bp) == 0) {
crypto/krb5/src/lib/krb5/krb/strptime.c
273
bp += strlen(_ctloc(am_pm[0]));
crypto/krb5/src/lib/krb5/krb/strptime.c
277
else if (strcasecmp(_ctloc(am_pm[1]), bp) == 0) {
crypto/krb5/src/lib/krb5/krb/strptime.c
282
bp += strlen(_ctloc(am_pm[1]));
crypto/krb5/src/lib/krb5/krb/strptime.c
291
if (!(conv_num(&bp, &tm->tm_sec, 0, 61)))
crypto/krb5/src/lib/krb5/krb/strptime.c
304
if (!(conv_num(&bp, &i, 0, 53)))
crypto/krb5/src/lib/krb5/krb/strptime.c
310
if (!(conv_num(&bp, &tm->tm_wday, 0, 6)))
crypto/krb5/src/lib/krb5/krb/strptime.c
316
if (!(conv_num(&bp, &i, 0, 9999)))
crypto/krb5/src/lib/krb5/krb/strptime.c
324
if (!(conv_num(&bp, &i, 0, 99)))
crypto/krb5/src/lib/krb5/krb/strptime.c
344
while (isspace(*bp))
crypto/krb5/src/lib/krb5/krb/strptime.c
345
bp++;
crypto/krb5/src/lib/krb5/krb/strptime.c
357
return ((char *)bp);
crypto/krb5/src/lib/krb5/krb/strptime.c
67
const char *bp;
crypto/krb5/src/lib/krb5/krb/strptime.c
71
bp = buf;
crypto/krb5/src/lib/krb5/krb/strptime.c
79
while (isspace(*bp))
crypto/krb5/src/lib/krb5/krb/strptime.c
80
bp++;
crypto/krb5/src/lib/krb5/krb/strptime.c
93
if (c != *bp++)
crypto/krb5/src/lib/krb5/krb/t_ser.c
102
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
104
check(k5_externalize_auth_context(actx, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
105
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
107
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
109
check(k5_internalize_auth_context(&actx2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
110
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
116
bp = erep2;
crypto/krb5/src/lib/krb5/krb/t_ser.c
118
check(k5_externalize_auth_context(actx2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
119
assert(bp == erep2 + elen2 && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
130
uint8_t *erep, *erep2, *bp;
crypto/krb5/src/lib/krb5/krb/t_ser.c
137
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
139
check(k5_externalize_principal(princ, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
140
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
142
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
144
check(k5_internalize_principal(&princ2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
145
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
151
bp = erep2;
crypto/krb5/src/lib/krb5/krb/t_ser.c
153
check(k5_externalize_principal(princ2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
154
assert(bp == erep2 + elen2 && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
165
uint8_t *erep, *erep2, *bp;
crypto/krb5/src/lib/krb5/krb/t_ser.c
172
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
174
check(k5_externalize_checksum(cksum, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
175
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
177
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
179
check(k5_internalize_checksum(&cksum2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
180
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
186
bp = erep2;
crypto/krb5/src/lib/krb5/krb/t_ser.c
188
check(k5_externalize_checksum(cksum2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
189
assert(bp == erep2 + elen2 && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
60
uint8_t *erep, *erep2, *bp;
crypto/krb5/src/lib/krb5/krb/t_ser.c
67
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
69
check(k5_externalize_context(ctx, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
70
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
72
bp = erep;
crypto/krb5/src/lib/krb5/krb/t_ser.c
74
check(k5_internalize_context(&ctx2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
75
assert(bp == erep + elen && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
81
bp = erep2;
crypto/krb5/src/lib/krb5/krb/t_ser.c
83
check(k5_externalize_context(ctx2, &bp, &blen));
crypto/krb5/src/lib/krb5/krb/t_ser.c
84
assert(bp == erep2 + elen2 && blen == 0);
crypto/krb5/src/lib/krb5/krb/t_ser.c
95
uint8_t *erep, *erep2, *bp;
crypto/krb5/src/lib/rpc/xdr.c
321
xdr_bool(XDR *xdrs, bool_t *bp)
crypto/krb5/src/lib/rpc/xdr.c
328
VALGRIND_CHECK_DEFINED(*bp);
crypto/krb5/src/lib/rpc/xdr.c
329
lb = *bp ? XDR_TRUE : XDR_FALSE;
crypto/krb5/src/lib/rpc/xdr.c
336
*bp = (lb == XDR_FALSE) ? FALSE : TRUE;
crypto/krb5/src/lib/rpc/xdr_sizeof.c
54
x_putbytes(XDR *xdrs, char *bp, u_int len)
crypto/krb5/src/plugins/authdata/greet_client/greet.c
312
krb5_octet *bp;
crypto/krb5/src/plugins/authdata/greet_client/greet.c
315
bp = *buffer;
crypto/krb5/src/plugins/authdata/greet_client/greet.c
319
code = krb5_ser_unpack_int32(&length, &bp, &remain);
crypto/krb5/src/plugins/authdata/greet_client/greet.c
329
code = krb5_ser_unpack_bytes(contents, (size_t)length, &bp, &remain);
crypto/krb5/src/plugins/authdata/greet_client/greet.c
337
code = krb5_ser_unpack_int32(&verified, &bp, &remain);
crypto/krb5/src/plugins/authdata/greet_client/greet.c
348
*buffer = bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
112
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
126
if ((bp = mpool_bkt(mp)) == NULL)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
130
bp->pgno = *pgnoaddr;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
132
bp->pgno = *pgnoaddr = mp->npages++;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
134
bp->flags = MPOOL_PINNED | MPOOL_INUSE;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
136
head = &mp->hqh[HASHKEY(bp->pgno)];
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
137
TAILQ_INSERT_HEAD(head, bp, hq);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
138
TAILQ_INSERT_TAIL(&mp->lqh, bp, q);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
139
return (bp->page);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
146
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
148
bp = (void *)((char *)page - sizeof(BKT));
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
151
if (!(bp->flags & MPOOL_PINNED)) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
153
"mpool_delete: page %d not pinned\n", bp->pgno);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
159
head = &mp->hqh[HASHKEY(bp->pgno)];
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
160
TAILQ_REMOVE(head, bp, hq);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
161
TAILQ_REMOVE(&mp->lqh, bp, q);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
163
free(bp);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
175
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
184
if ((bp = mpool_look(mp, pgno)) != NULL) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
186
if (!(flags & MPOOL_IGNOREPIN) && bp->flags & MPOOL_PINNED) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
188
"mpool_get: page %d already pinned\n", bp->pgno);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
196
head = &mp->hqh[HASHKEY(bp->pgno)];
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
197
TAILQ_REMOVE(head, bp, hq);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
198
TAILQ_INSERT_HEAD(head, bp, hq);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
199
TAILQ_REMOVE(&mp->lqh, bp, q);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
200
TAILQ_INSERT_TAIL(&mp->lqh, bp, q);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
204
bp->flags |= MPOOL_PINNED;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
205
return (bp->page);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
209
if ((bp = mpool_bkt(mp)) == NULL)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
226
if ((nr = read(mp->fd, bp->page, mp->pagesize)) !=
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
237
memset(bp->page, 0, mp->pagesize);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
242
bp->pgno = pgno;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
244
bp->flags = MPOOL_PINNED;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
245
bp->flags |= MPOOL_INUSE;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
251
head = &mp->hqh[HASHKEY(bp->pgno)];
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
252
TAILQ_INSERT_HEAD(head, bp, hq);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
253
TAILQ_INSERT_TAIL(&mp->lqh, bp, q);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
257
(mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
259
return (bp->page);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
269
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
274
bp = (void *)((char *)page - sizeof(BKT));
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
276
if (!(bp->flags & MPOOL_PINNED)) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
278
"mpool_put: page %d not pinned\n", bp->pgno);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
282
bp->flags &= ~MPOOL_PINNED;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
284
bp->flags |= flags & MPOOL_DIRTY;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
295
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
298
while ((bp = mp->lqh.tqh_first) != NULL) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
300
free(bp);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
315
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
318
for (bp = mp->lqh.tqh_first; bp != NULL; bp = bp->q.tqe_next)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
319
if (bp->flags & MPOOL_DIRTY &&
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
320
mpool_write(mp, bp) == RET_ERROR)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
335
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
347
for (bp = mp->lqh.tqh_first; bp != NULL; bp = bp->q.tqe_next)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
348
if (!(bp->flags & MPOOL_PINNED)) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
350
if (bp->flags & MPOOL_DIRTY &&
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
351
mpool_write(mp, bp) == RET_ERROR)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
357
head = &mp->hqh[HASHKEY(bp->pgno)];
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
358
TAILQ_REMOVE(head, bp, hq);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
359
TAILQ_REMOVE(&mp->lqh, bp, q);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
362
spage = bp->page;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
363
memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
364
bp->page = spage;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
367
bp->flags = 0;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
368
return (bp);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
371
new: if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
377
memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
379
bp->page = (char *)bp + sizeof(BKT);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
380
bp->flags = 0;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
382
return (bp);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
390
mpool_write(MPOOL *mp, BKT *bp)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
400
(mp->pgout)(mp->pgcookie, bp->pgno, bp->page);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
402
off = mp->pagesize * bp->pgno;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
403
if (off / mp->pagesize != bp->pgno) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
411
if (write(mp->fd, bp->page, mp->pagesize) !=
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
422
(mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
423
bp->flags &= ~MPOOL_DIRTY;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
435
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
438
for (bp = head->tqh_first; bp != NULL; bp = bp->hq.tqe_next)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
439
if ((bp->pgno == pgno) && (bp->flags & MPOOL_INUSE)) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
443
return (bp);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
459
BKT *bp;
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
481
for (bp = mp->lqh.tqh_first; bp != NULL; bp = bp->q.tqe_next) {
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
482
(void)fprintf(stderr, "%s%d", sep, bp->pgno);
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
483
if (bp->flags & MPOOL_DIRTY)
crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/mpool.c
485
if (bp->flags & MPOOL_PINNED)
crypto/krb5/src/util/profile/prof_init.c
558
unsigned char *bp;
crypto/krb5/src/util/profile/prof_init.c
564
bp = *bufpp;
crypto/krb5/src/util/profile/prof_init.c
574
pack_int32(PROF_MAGIC_PROFILE, &bp, &remain);
crypto/krb5/src/util/profile/prof_init.c
575
pack_int32(fcount, &bp, &remain);
crypto/krb5/src/util/profile/prof_init.c
578
pack_int32(slen, &bp, &remain);
crypto/krb5/src/util/profile/prof_init.c
580
memcpy(bp, pfp->data->filespec, (size_t) slen);
crypto/krb5/src/util/profile/prof_init.c
581
bp += slen;
crypto/krb5/src/util/profile/prof_init.c
585
pack_int32(PROF_MAGIC_PROFILE, &bp, &remain);
crypto/krb5/src/util/profile/prof_init.c
587
*bufpp = bp;
crypto/krb5/src/util/profile/prof_init.c
611
unsigned char *bp;
crypto/krb5/src/util/profile/prof_init.c
617
bp = *bufpp;
crypto/krb5/src/util/profile/prof_init.c
622
(void) unpack_int32(&tmp, &bp, &remain);
crypto/krb5/src/util/profile/prof_init.c
631
(void) unpack_int32(&fcount, &bp, &remain);
crypto/krb5/src/util/profile/prof_init.c
640
if (!unpack_int32(&tmp, &bp, &remain)) {
crypto/krb5/src/util/profile/prof_init.c
644
memcpy(flist[i], bp, (size_t) tmp);
crypto/krb5/src/util/profile/prof_init.c
646
bp += tmp;
crypto/krb5/src/util/profile/prof_init.c
651
if (unpack_int32(&tmp, &bp, &remain) ||
crypto/krb5/src/util/profile/prof_init.c
661
*bufpp = bp;
crypto/openssh/openbsd-compat/strptime.c
101
if (c != *bp++)
crypto/openssh/openbsd-compat/strptime.c
126
if (!(bp = _strptime(bp, _ctloc(d_t_fmt), tm, 0)))
crypto/openssh/openbsd-compat/strptime.c
132
if (!(bp = _strptime(bp, "%m/%d/%y", tm, 0)))
crypto/openssh/openbsd-compat/strptime.c
138
if (!(bp = _strptime(bp, "%H:%M", tm, 0)))
crypto/openssh/openbsd-compat/strptime.c
144
if (!(bp = _strptime(bp, "%I:%M:%S %p", tm, 0)))
crypto/openssh/openbsd-compat/strptime.c
150
if (!(bp = _strptime(bp, "%H:%M:%S", tm, 0)))
crypto/openssh/openbsd-compat/strptime.c
156
if (!(bp = _strptime(bp, _ctloc(t_fmt), tm, 0)))
crypto/openssh/openbsd-compat/strptime.c
162
if (!(bp = _strptime(bp, _ctloc(d_fmt), tm, 0)))
crypto/openssh/openbsd-compat/strptime.c
176
if (strncasecmp(_ctloc(day[i]), bp, len) == 0)
crypto/openssh/openbsd-compat/strptime.c
181
if (strncasecmp(_ctloc(abday[i]), bp, len) == 0)
crypto/openssh/openbsd-compat/strptime.c
190
bp += len;
crypto/openssh/openbsd-compat/strptime.c
200
if (strncasecmp(_ctloc(mon[i]), bp, len) == 0)
crypto/openssh/openbsd-compat/strptime.c
205
if (strncasecmp(_ctloc(abmon[i]), bp, len) == 0)
crypto/openssh/openbsd-compat/strptime.c
214
bp += len;
crypto/openssh/openbsd-compat/strptime.c
220
if (!(_conv_num(&bp, &i, 0, 99)))
crypto/openssh/openbsd-compat/strptime.c
229
if (!(_conv_num(&bp, &tm->tm_mday, 1, 31)))
crypto/openssh/openbsd-compat/strptime.c
238
if (!(_conv_num(&bp, &tm->tm_hour, 0, 23)))
crypto/openssh/openbsd-compat/strptime.c
247
if (!(_conv_num(&bp, &tm->tm_hour, 1, 12)))
crypto/openssh/openbsd-compat/strptime.c
253
if (!(_conv_num(&bp, &tm->tm_yday, 1, 366)))
crypto/openssh/openbsd-compat/strptime.c
260
if (!(_conv_num(&bp, &tm->tm_min, 0, 59)))
crypto/openssh/openbsd-compat/strptime.c
266
if (!(_conv_num(&bp, &tm->tm_mon, 1, 12)))
crypto/openssh/openbsd-compat/strptime.c
276
if (strncasecmp(_ctloc(am_pm[0]), bp, len) == 0) {
crypto/openssh/openbsd-compat/strptime.c
282
bp += len;
crypto/openssh/openbsd-compat/strptime.c
287
if (strncasecmp(_ctloc(am_pm[1]), bp, len) == 0) {
crypto/openssh/openbsd-compat/strptime.c
293
bp += len;
crypto/openssh/openbsd-compat/strptime.c
302
if (!(_conv_num(&bp, &tm->tm_sec, 0, 61)))
crypto/openssh/openbsd-compat/strptime.c
315
if (!(_conv_num(&bp, &i, 0, 53)))
crypto/openssh/openbsd-compat/strptime.c
321
if (!(_conv_num(&bp, &tm->tm_wday, 0, 6)))
crypto/openssh/openbsd-compat/strptime.c
327
if (!(_conv_num(&bp, &i, 0, 9999)))
crypto/openssh/openbsd-compat/strptime.c
336
if (!(_conv_num(&bp, &relyear, 0, 99)))
crypto/openssh/openbsd-compat/strptime.c
346
while (isspace(*bp))
crypto/openssh/openbsd-compat/strptime.c
347
bp++;
crypto/openssh/openbsd-compat/strptime.c
373
return ((char *)bp);
crypto/openssh/openbsd-compat/strptime.c
70
const unsigned char *bp;
crypto/openssh/openbsd-compat/strptime.c
80
bp = (unsigned char *)buf;
crypto/openssh/openbsd-compat/strptime.c
87
while (isspace(*bp))
crypto/openssh/openbsd-compat/strptime.c
88
bp++;
crypto/openssh/scp.c
1042
char *bp, *tuser, *thost, *targ;
crypto/openssh/scp.c
1129
xasprintf(&bp, "%s -f %s%s", cmd,
crypto/openssh/scp.c
1132
bp, &remin, &remout, &do_cmd_pid) < 0)
crypto/openssh/scp.c
1134
free(bp);
crypto/openssh/scp.c
1135
xasprintf(&bp, "%s -t %s%s", cmd,
crypto/openssh/scp.c
1137
if (do_cmd2(thost, tuser, tport, bp,
crypto/openssh/scp.c
1140
free(bp);
crypto/openssh/scp.c
1212
xasprintf(&bp, "%s -t %s%s", cmd,
crypto/openssh/scp.c
1215
bp, &remin, &remout, &do_cmd_pid) < 0)
crypto/openssh/scp.c
1219
free(bp);
crypto/openssh/scp.c
1238
char *bp, *host = NULL, *src = NULL, *suser = NULL;
crypto/openssh/scp.c
1296
xasprintf(&bp, "%s -f %s%s",
crypto/openssh/scp.c
1298
if (do_cmd(ssh_program, host, suser, sport, 0, bp,
crypto/openssh/scp.c
1300
free(bp);
crypto/openssh/scp.c
1304
free(bp);
crypto/openssh/scp.c
1396
BUF *bp;
crypto/openssh/scp.c
1455
if ((bp = allocbuf(&buffer, fd, COPY_BUFLEN)) == NULL) {
crypto/openssh/scp.c
1465
for (haderr = i = 0; i < stb.st_size; i += bp->cnt) {
crypto/openssh/scp.c
1466
amt = bp->cnt;
crypto/openssh/scp.c
1471
bp->buf, amt)) != amt) {
crypto/openssh/scp.c
1473
memset(bp->buf + nr, 0, amt - nr);
crypto/openssh/scp.c
1478
(void)atomicio(vwrite, remout, bp->buf, amt);
crypto/openssh/scp.c
1479
memset(bp->buf, 0, amt);
crypto/openssh/scp.c
1482
if (atomicio6(vwrite, remout, bp->buf, amt, scpio,
crypto/openssh/scp.c
1666
BUF *bp;
crypto/openssh/scp.c
1883
if ((bp = allocbuf(&buffer, ofd, COPY_BUFLEN)) == NULL) {
crypto/openssh/scp.c
1887
cp = bp->buf;
crypto/openssh/scp.c
1899
for (count = i = 0; i < size; i += bp->cnt) {
crypto/openssh/scp.c
1900
amt = bp->cnt;
crypto/openssh/scp.c
1917
if (count == bp->cnt) {
crypto/openssh/scp.c
1920
if (atomicio(vwrite, ofd, bp->buf,
crypto/openssh/scp.c
1928
cp = bp->buf;
crypto/openssh/scp.c
1933
atomicio(vwrite, ofd, bp->buf, count) != count) {
crypto/openssh/scp.c
2228
allocbuf(BUF *bp, int fd, int blksize)
crypto/openssh/scp.c
2244
if (bp->cnt >= size)
crypto/openssh/scp.c
2245
return (bp);
crypto/openssh/scp.c
2246
bp->buf = xrecallocarray(bp->buf, bp->cnt, size, 1);
crypto/openssh/scp.c
2247
bp->cnt = size;
crypto/openssh/scp.c
2248
return (bp);
crypto/openssh/sftp.c
943
const char *bp = sort_glob->gl_pathv[b];
crypto/openssh/sftp.c
950
return (rmul * strcmp(ap, bp));
crypto/openssh/sshsig.c
406
hash_buffer(const struct sshbuf *m, const char *hashalg, struct sshbuf **bp)
crypto/openssh/sshsig.c
412
*bp = NULL;
crypto/openssh/sshsig.c
437
*bp = b;
crypto/openssh/sshsig.c
506
hash_file(int fd, const char *hashalg, struct sshbuf **bp)
crypto/openssh/sshsig.c
514
*bp = NULL;
crypto/openssh/sshsig.c
562
*bp = b;
crypto/openssl/apps/ca.c
140
static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext);
crypto/openssl/apps/ca.c
1986
static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext)
crypto/openssl/apps/ca.c
1990
(void)i2d_X509_bio(bp, x);
crypto/openssl/apps/ca.c
1994
X509_print(bp, x);
crypto/openssl/apps/ca.c
1995
PEM_write_bio_X509(bp, x);
crypto/openssl/apps/dgst.c
30
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, int xoflen,
crypto/openssl/apps/dgst.c
638
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, int xoflen,
crypto/openssl/apps/dgst.c
647
while (BIO_pending(bp) || !BIO_eof(bp)) {
crypto/openssl/apps/dgst.c
648
i = BIO_read(bp, (char *)buf, BUFSIZE);
crypto/openssl/apps/dgst.c
658
BIO_get_md_ctx(bp, &ctx);
crypto/openssl/apps/dgst.c
669
BIO_get_md_ctx(bp, &ctx);
crypto/openssl/apps/dgst.c
692
BIO_get_md_ctx(bp, &ctx);
crypto/openssl/apps/dgst.c
699
len = BIO_gets(bp, (char *)buf, BUFSIZE);
crypto/openssl/apps/lib/apps.c
1939
char *bp = work;
crypto/openssl/apps/lib/apps.c
1940
char *typestr = bp;
crypto/openssl/apps/lib/apps.c
1949
*bp++ = *cp++;
crypto/openssl/apps/lib/apps.c
1950
*bp++ = '\0';
crypto/openssl/apps/lib/apps.c
1960
valstr = (unsigned char *)bp;
crypto/openssl/apps/lib/apps.c
1961
for (; *cp != '\0' && *cp != '/'; *bp++ = *cp++) {
crypto/openssl/apps/lib/apps.c
1974
*bp++ = '\0';
crypto/openssl/apps/lib/s_cb.c
661
const unsigned char *bp = buf;
crypto/openssl/apps/lib/s_cb.c
675
switch (bp[0]) {
crypto/openssl/apps/lib/s_cb.c
683
str_details2 = lookup((int)bp[1], alert_types, " ???");
crypto/openssl/apps/lib/s_cb.c
691
str_details1 = lookup((int)bp[0], handshakes, "???");
crypto/openssl/apps/rehash.c
126
BUCKET *bp;
crypto/openssl/apps/rehash.c
130
for (bp = hash_table[ndx]; bp; bp = bp->next)
crypto/openssl/apps/rehash.c
131
if (bp->type == type && bp->hash == hash)
crypto/openssl/apps/rehash.c
133
if (bp == NULL) {
crypto/openssl/apps/rehash.c
134
bp = app_malloc(sizeof(*bp), "hash bucket");
crypto/openssl/apps/rehash.c
135
*bp = nilbucket;
crypto/openssl/apps/rehash.c
136
bp->next = hash_table[ndx];
crypto/openssl/apps/rehash.c
137
bp->type = type;
crypto/openssl/apps/rehash.c
138
bp->hash = hash;
crypto/openssl/apps/rehash.c
139
hash_table[ndx] = bp;
crypto/openssl/apps/rehash.c
142
for (ep = bp->first_entry; ep; ep = ep->next) {
crypto/openssl/apps/rehash.c
158
if (bp->num_needed >= MAX_COLLISIONS) {
crypto/openssl/apps/rehash.c
174
if (bp->last_entry)
crypto/openssl/apps/rehash.c
175
bp->last_entry->next = ep;
crypto/openssl/apps/rehash.c
176
if (bp->first_entry == NULL)
crypto/openssl/apps/rehash.c
177
bp->first_entry = ep;
crypto/openssl/apps/rehash.c
178
bp->last_entry = ep;
crypto/openssl/apps/rehash.c
185
bp->num_needed++;
crypto/openssl/apps/rehash.c
350
BUCKET *bp, *nextbp;
crypto/openssl/apps/rehash.c
415
for (bp = hash_table[i]; bp; bp = nextbp) {
crypto/openssl/apps/rehash.c
416
nextbp = bp->next;
crypto/openssl/apps/rehash.c
418
memset(idmask, 0, (bp->num_needed + 7) / 8);
crypto/openssl/apps/rehash.c
419
for (ep = bp->first_entry; ep; ep = ep->next)
crypto/openssl/apps/rehash.c
420
if (ep->old_id < bp->num_needed)
crypto/openssl/apps/rehash.c
423
for (ep = bp->first_entry; ep; ep = nextep) {
crypto/openssl/apps/rehash.c
425
if (ep->old_id < bp->num_needed) {
crypto/openssl/apps/rehash.c
427
BIO_snprintf(buf, buflen, "%08x.%s%d", bp->hash,
crypto/openssl/apps/rehash.c
428
suffixes[bp->type], ep->old_id);
crypto/openssl/apps/rehash.c
438
dirname, pathsep, bp->hash,
crypto/openssl/apps/rehash.c
439
suffixes[bp->type], nextid);
crypto/openssl/apps/rehash.c
460
dirname, pathsep, bp->hash,
crypto/openssl/apps/rehash.c
461
suffixes[bp->type], ep->old_id);
crypto/openssl/apps/rehash.c
475
OPENSSL_free(bp);
crypto/openssl/apps/s_server.c
263
static int ebcdic_gets(BIO *bp, char *buf, int size);
crypto/openssl/apps/s_server.c
264
static int ebcdic_puts(BIO *bp, const char *str);
crypto/openssl/apps/s_server.c
388
static int ebcdic_gets(BIO *bp, char *buf, int size)
crypto/openssl/apps/s_server.c
391
BIO *next = BIO_next(bp);
crypto/openssl/apps/s_server.c
397
ret = ebcdic_read(bp, &buf[i], 1);
crypto/openssl/apps/s_server.c
410
static int ebcdic_puts(BIO *bp, const char *str)
crypto/openssl/apps/s_server.c
412
if (BIO_next(bp) == NULL)
crypto/openssl/apps/s_server.c
414
return ebcdic_write(bp, str, strlen(str));
crypto/openssl/apps/s_server.c
67
static void print_stats(BIO *bp, SSL_CTX *ctx);
crypto/openssl/crypto/asn1/a_gentm.c
81
int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)
crypto/openssl/crypto/asn1/a_gentm.c
85
return ASN1_TIME_print(bp, tm);
crypto/openssl/crypto/asn1/a_object.c
181
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a)
crypto/openssl/crypto/asn1/a_object.c
187
return BIO_write(bp, "NULL", 4);
crypto/openssl/crypto/asn1/a_object.c
199
i = BIO_write(bp, "<INVALID>", 9);
crypto/openssl/crypto/asn1/a_object.c
201
i += BIO_dump(bp, (const char *)a->data, a->length);
crypto/openssl/crypto/asn1/a_object.c
204
BIO_write(bp, p, i);
crypto/openssl/crypto/asn1/a_print.c
69
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v)
crypto/openssl/crypto/asn1/a_print.c
86
if (BIO_write(bp, buf, n) <= 0)
crypto/openssl/crypto/asn1/a_print.c
92
if (BIO_write(bp, buf, n) <= 0)
crypto/openssl/crypto/asn1/a_time.c
476
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm)
crypto/openssl/crypto/asn1/a_time.c
478
return ASN1_TIME_print_ex(bp, tm, ASN1_DTFLGS_RFC822);
crypto/openssl/crypto/asn1/a_time.c
482
int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags)
crypto/openssl/crypto/asn1/a_time.c
484
return ossl_asn1_time_print_ex(bp, tm, flags) > 0;
crypto/openssl/crypto/asn1/a_time.c
489
int ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags)
crypto/openssl/crypto/asn1/a_time.c
498
return BIO_write(bp, "Bad time value", 14) ? -1 : 0;
crypto/openssl/crypto/asn1/a_time.c
521
return BIO_printf(bp, "%4d-%02d-%02d %02d:%02d:%02d.%.*sZ",
crypto/openssl/crypto/asn1/a_time.c
527
return BIO_printf(bp, "%s %2d %02d:%02d:%02d.%.*s %d GMT",
crypto/openssl/crypto/asn1/a_time.c
536
return BIO_printf(bp, "%4d-%02d-%02d %02d:%02d:%02dZ",
crypto/openssl/crypto/asn1/a_time.c
542
return BIO_printf(bp, "%s %2d %02d:%02d:%02d %d GMT",
crypto/openssl/crypto/asn1/a_utctm.c
100
return ASN1_TIME_print(bp, tm);
crypto/openssl/crypto/asn1/a_utctm.c
96
int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm)
crypto/openssl/crypto/asn1/asn1_parse.c
111
BIO_puts(bp, "BAD RECURSION DEPTH\n");
crypto/openssl/crypto/asn1/asn1_parse.c
122
BIO_puts(bp, "Error in encoding\n");
crypto/openssl/crypto/asn1/asn1_parse.c
130
if (!asn1_print_info(bp, (long)offset + (long)(op - *pp), depth,
crypto/openssl/crypto/asn1/asn1_parse.c
137
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
140
BIO_printf(bp, "length is greater than %ld\n", length);
crypto/openssl/crypto/asn1/asn1_parse.c
145
r = asn1_parse2(bp, &p, (long)(tot - p),
crypto/openssl/crypto/asn1/asn1_parse.c
160
r = asn1_parse2(bp, &p, tmp,
crypto/openssl/crypto/asn1/asn1_parse.c
170
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
175
if (BIO_write(bp, ":", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
177
if ((len > 0) && BIO_write(bp, (const char *)p, (int)len) != (int)len)
crypto/openssl/crypto/asn1/asn1_parse.c
182
if (BIO_write(bp, ":", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
184
i2a_ASN1_OBJECT(bp, o);
crypto/openssl/crypto/asn1/asn1_parse.c
186
if (BIO_puts(bp, ":BAD OBJECT") <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
192
if (BIO_puts(bp, ":BAD BOOLEAN") <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
197
BIO_printf(bp, ":%u", p[0]);
crypto/openssl/crypto/asn1/asn1_parse.c
20
static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
crypto/openssl/crypto/asn1/asn1_parse.c
219
if (BIO_write(bp, ":", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
22
static int asn1_print_info(BIO *bp, long offset, int depth, int hl, long len,
crypto/openssl/crypto/asn1/asn1_parse.c
221
if (BIO_write(bp, (const char *)opp, os->length) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
228
if (BIO_write(bp, "[HEX DUMP]:", 11) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
231
if (BIO_printf(bp, "%02X", opp[i]) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
238
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
241
if (BIO_dump_indent(bp,
crypto/openssl/crypto/asn1/asn1_parse.c
258
if (BIO_write(bp, ":", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
261
if (BIO_write(bp, "-", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
264
if (BIO_printf(bp, "%02X", ai->data[i]) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
268
if (BIO_write(bp, "00", 2) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
272
if (BIO_puts(bp, ":BAD INTEGER") <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
284
if (BIO_write(bp, ":", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
287
if (BIO_write(bp, "-", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
290
if (BIO_printf(bp, "%02X", ae->data[i]) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
294
if (BIO_write(bp, "00", 2) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
298
if (BIO_puts(bp, ":BAD ENUMERATED") <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
306
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
309
if (BIO_dump_indent(bp, (const char *)p,
crypto/openssl/crypto/asn1/asn1_parse.c
319
if (BIO_puts(bp, ":[") <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
322
if (BIO_printf(bp, "%02X", tmp[i]) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
325
if (BIO_puts(bp, "]") <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
331
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
47
if (bp != NULL) {
crypto/openssl/crypto/asn1/asn1_parse.c
48
if (BIO_set_prefix(bp, str) <= 0) {
crypto/openssl/crypto/asn1/asn1_parse.c
50
|| (bp = BIO_push(bio, bp)) == NULL)
crypto/openssl/crypto/asn1/asn1_parse.c
54
saved_indent = BIO_get_indent(bp);
crypto/openssl/crypto/asn1/asn1_parse.c
55
if (BIO_set_prefix(bp, str) <= 0 || BIO_set_indent(bp, indent) <= 0)
crypto/openssl/crypto/asn1/asn1_parse.c
75
i = (BIO_printf(bp, "%-18s", p) > 0);
crypto/openssl/crypto/asn1/asn1_parse.c
78
BIO_set_indent(bp, saved_indent);
crypto/openssl/crypto/asn1/asn1_parse.c
80
BIO_pop(bp);
crypto/openssl/crypto/asn1/asn1_parse.c
85
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent)
crypto/openssl/crypto/asn1/asn1_parse.c
87
return asn1_parse2(bp, &pp, len, 0, 0, indent, 0);
crypto/openssl/crypto/asn1/asn1_parse.c
90
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
crypto/openssl/crypto/asn1/asn1_parse.c
93
return asn1_parse2(bp, &pp, len, 0, 0, indent, dump);
crypto/openssl/crypto/asn1/asn1_parse.c
96
static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
crypto/openssl/crypto/asn1/f_int.c
127
bufsize = BIO_gets(bp, buf, size);
crypto/openssl/crypto/asn1/f_int.c
140
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a)
crypto/openssl/crypto/asn1/f_int.c
142
return i2a_ASN1_INTEGER(bp, a);
crypto/openssl/crypto/asn1/f_int.c
145
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size)
crypto/openssl/crypto/asn1/f_int.c
147
int rv = a2i_ASN1_INTEGER(bp, bs, buf, size);
crypto/openssl/crypto/asn1/f_int.c
16
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a)
crypto/openssl/crypto/asn1/f_int.c
25
if (BIO_write(bp, "-", 1) != 1)
crypto/openssl/crypto/asn1/f_int.c
31
if (BIO_write(bp, "00", 2) != 2)
crypto/openssl/crypto/asn1/f_int.c
37
if (BIO_write(bp, "\\\n", 2) != 2)
crypto/openssl/crypto/asn1/f_int.c
42
if (BIO_write(bp, buf, 2) != 2)
crypto/openssl/crypto/asn1/f_int.c
52
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
crypto/openssl/crypto/asn1/f_int.c
61
bufsize = BIO_gets(bp, buf, size);
crypto/openssl/crypto/asn1/f_string.c
120
bufsize = BIO_gets(bp, buf, size);
crypto/openssl/crypto/asn1/f_string.c
16
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type)
crypto/openssl/crypto/asn1/f_string.c
25
if (BIO_write(bp, "0", 1) != 1)
crypto/openssl/crypto/asn1/f_string.c
31
if (BIO_write(bp, "\\\n", 2) != 2)
crypto/openssl/crypto/asn1/f_string.c
36
if (BIO_write(bp, buf, 2) != 2)
crypto/openssl/crypto/asn1/f_string.c
46
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
crypto/openssl/crypto/asn1/f_string.c
53
bufsize = BIO_gets(bp, buf, size);
crypto/openssl/crypto/asn1/i2d_evp.c
91
int i2d_KeyParams_bio(BIO *bp, const EVP_PKEY *pkey)
crypto/openssl/crypto/asn1/i2d_evp.c
93
return ASN1_i2d_bio_of(EVP_PKEY, i2d_KeyParams, bp, pkey);
crypto/openssl/crypto/asn1/t_pkey.c
21
int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int indent)
crypto/openssl/crypto/asn1/t_pkey.c
27
if (i > 0 && BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/asn1/t_pkey.c
29
if (!BIO_indent(bp, indent, ASN1_PRINT_MAX_INDENT))
crypto/openssl/crypto/asn1/t_pkey.c
36
if (BIO_printf(bp, "%02x%s", buf[i],
crypto/openssl/crypto/asn1/t_pkey.c
41
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/asn1/t_pkey.c
46
int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
crypto/openssl/crypto/asn1/t_pkey.c
57
if (!BIO_indent(bp, indent, ASN1_PRINT_MAX_INDENT))
crypto/openssl/crypto/asn1/t_pkey.c
60
if (BIO_printf(bp, "%s 0\n", number) <= 0)
crypto/openssl/crypto/asn1/t_pkey.c
66
if (BIO_printf(bp, "%s %s%lu (%s0x%lx)\n", number, neg,
crypto/openssl/crypto/asn1/t_pkey.c
79
if (BIO_printf(bp, "%s%s\n", number,
crypto/openssl/crypto/asn1/t_pkey.c
90
if (ASN1_buf_print(bp, tmp, n, indent + 4) == 0)
crypto/openssl/crypto/bio/bf_nbio.c
177
static int nbiof_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/bio/bf_nbio.c
179
if (bp->next_bio == NULL)
crypto/openssl/crypto/bio/bf_nbio.c
181
return BIO_gets(bp->next_bio, buf, size);
crypto/openssl/crypto/bio/bf_nbio.c
184
static int nbiof_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bf_nbio.c
186
if (bp->next_bio == NULL)
crypto/openssl/crypto/bio/bf_nbio.c
188
return BIO_puts(bp->next_bio, str);
crypto/openssl/crypto/bio/bf_null.c
101
static int nullf_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/bio/bf_null.c
103
if (bp->next_bio == NULL)
crypto/openssl/crypto/bio/bf_null.c
105
return BIO_gets(bp->next_bio, buf, size);
crypto/openssl/crypto/bio/bf_null.c
108
static int nullf_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bf_null.c
110
if (bp->next_bio == NULL)
crypto/openssl/crypto/bio/bf_null.c
112
return BIO_puts(bp->next_bio, str);
crypto/openssl/crypto/bio/bio_dump.c
116
static int write_bio(const void *data, size_t len, void *bp)
crypto/openssl/crypto/bio/bio_dump.c
118
return BIO_write((BIO *)bp, (const char *)data, len);
crypto/openssl/crypto/bio/bio_dump.c
121
int BIO_dump(BIO *bp, const void *s, int len)
crypto/openssl/crypto/bio/bio_dump.c
123
return BIO_dump_cb(write_bio, bp, s, len);
crypto/openssl/crypto/bio/bio_dump.c
126
int BIO_dump_indent(BIO *bp, const void *s, int len, int indent)
crypto/openssl/crypto/bio/bio_dump.c
128
return BIO_dump_indent_cb(write_bio, bp, s, len, indent);
crypto/openssl/crypto/bio/bss_acpt.c
559
static int acpt_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_acpt.c
564
ret = acpt_write(bp, str, n);
crypto/openssl/crypto/bio/bss_conn.c
736
static int conn_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_conn.c
741
ret = conn_write(bp, str, n);
crypto/openssl/crypto/bio/bss_dgram.c
1050
static int dgram_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_dgram.c
1055
ret = dgram_write(bp, str, n);
crypto/openssl/crypto/bio/bss_dgram.c
2788
static int dgram_sctp_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_dgram.c
2793
ret = dgram_sctp_write(bp, str, n);
crypto/openssl/crypto/bio/bss_fd.c
199
static int fd_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_fd.c
204
ret = fd_write(bp, str, n);
crypto/openssl/crypto/bio/bss_fd.c
208
static int fd_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/bio/bss_fd.c
214
while (ptr < end && fd_read(bp, ptr, 1) > 0) {
crypto/openssl/crypto/bio/bss_file.c
350
static int file_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/bio/bss_file.c
355
if (bp->flags & BIO_FLAGS_UPLINK_INTERNAL) {
crypto/openssl/crypto/bio/bss_file.c
356
if (!UP_fgets(buf, size, bp->ptr))
crypto/openssl/crypto/bio/bss_file.c
359
if (!fgets(buf, size, (FILE *)bp->ptr))
crypto/openssl/crypto/bio/bss_file.c
368
static int file_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_file.c
373
ret = file_write(bp, str, n);
crypto/openssl/crypto/bio/bss_file.c
387
static int file_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_file.c
391
static int file_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/bio/bss_log.c
192
static int slg_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_log.c
197
ret = slg_write(bp, str, n);
crypto/openssl/crypto/bio/bss_log.c
203
static void xopenlog(BIO *bp, char *name, int level)
crypto/openssl/crypto/bio/bss_log.c
206
bp->ptr = RegisterEventSourceA(NULL, name);
crypto/openssl/crypto/bio/bss_log.c
208
bp->ptr = NULL;
crypto/openssl/crypto/bio/bss_log.c
211
static void xsyslog(BIO *bp, int priority, const char *string)
crypto/openssl/crypto/bio/bss_log.c
217
if (bp->ptr == NULL)
crypto/openssl/crypto/bio/bss_log.c
248
ReportEventA(bp->ptr, evtype, 0, 1024, NULL, 2, 0, lpszStrings, NULL);
crypto/openssl/crypto/bio/bss_log.c
251
static void xcloselog(BIO *bp)
crypto/openssl/crypto/bio/bss_log.c
253
if (bp->ptr)
crypto/openssl/crypto/bio/bss_log.c
254
DeregisterEventSource((HANDLE)(bp->ptr));
crypto/openssl/crypto/bio/bss_log.c
255
bp->ptr = NULL;
crypto/openssl/crypto/bio/bss_log.c
262
static void xopenlog(BIO *bp, char *name, int level)
crypto/openssl/crypto/bio/bss_log.c
267
static void xsyslog(BIO *bp, int priority, const char *string)
crypto/openssl/crypto/bio/bss_log.c
345
static void xcloselog(BIO *bp)
crypto/openssl/crypto/bio/bss_log.c
351
static void xopenlog(BIO *bp, char *name, int level)
crypto/openssl/crypto/bio/bss_log.c
360
static void xsyslog(BIO *bp, int priority, const char *string)
crypto/openssl/crypto/bio/bss_log.c
365
static void xcloselog(BIO *bp)
crypto/openssl/crypto/bio/bss_log.c
85
static void xopenlog(BIO *bp, char *name, int level);
crypto/openssl/crypto/bio/bss_log.c
86
static void xsyslog(BIO *bp, int priority, const char *string);
crypto/openssl/crypto/bio/bss_log.c
87
static void xcloselog(BIO *bp);
crypto/openssl/crypto/bio/bss_mem.c
341
static int mem_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/bio/bss_mem.c
346
BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)bp->ptr;
crypto/openssl/crypto/bio/bss_mem.c
349
if (bp->flags & BIO_FLAGS_MEM_RDONLY)
crypto/openssl/crypto/bio/bss_mem.c
351
BIO_clear_retry_flags(bp);
crypto/openssl/crypto/bio/bss_mem.c
372
i = mem_read(bp, buf, i);
crypto/openssl/crypto/bio/bss_mem.c
379
static int mem_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_mem.c
384
ret = mem_write(bp, str, n);
crypto/openssl/crypto/bio/bss_null.c
75
static int null_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/bio/bss_null.c
80
static int null_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_sock.c
274
static int sock_puts(BIO *bp, const char *str)
crypto/openssl/crypto/bio/bss_sock.c
279
ret = sock_write(bp, str, n);
crypto/openssl/crypto/bn/asm/x86_64-gcc.c
209
BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/asm/x86_64-gcc.c
229
: "r"(rp), "r"(ap), "r"(bp)
crypto/openssl/crypto/bn/asm/x86_64-gcc.c
236
BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/asm/x86_64-gcc.c
256
: "r"(rp), "r"(ap), "r"(bp)
crypto/openssl/crypto/bn/bn_add.c
102
bp = b->d;
crypto/openssl/crypto/bn/bn_add.c
105
carry = bn_add_words(rp, ap, bp, min);
crypto/openssl/crypto/bn/bn_add.c
129
const BN_ULONG *ap, *bp;
crypto/openssl/crypto/bn/bn_add.c
147
bp = b->d;
crypto/openssl/crypto/bn/bn_add.c
150
borrow = bn_sub_words(rp, ap, bp, min);
crypto/openssl/crypto/bn/bn_add.c
79
const BN_ULONG *ap, *bp;
crypto/openssl/crypto/bn/bn_asm.c
1032
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_asm.c
1045
c0 = bn_mul_add_words(tp, ap, num, bp[i]);
crypto/openssl/crypto/bn/bn_asm.c
1073
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_asm.c
891
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_asm.c
903
if (ap == bp)
crypto/openssl/crypto/bn/bn_asm.c
911
ml = bp[0];
crypto/openssl/crypto/bn/bn_asm.c
928
ml = bp[i];
crypto/openssl/crypto/bn/bn_asm.c
986
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_exp.c
793
const void *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_exp.c
795
int bn_mul_mont_t4_8(BN_ULONG *rp, const BN_ULONG *ap, const void *bp,
crypto/openssl/crypto/bn/bn_exp.c
798
const void *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_exp.c
801
const void *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_exp.c
804
const void *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_exp.c
813
const void *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_exp.c
816
const void *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_lib.c
708
BN_ULONG t1, t2, *ap, *bp;
crypto/openssl/crypto/bn/bn_lib.c
711
bp = b->d;
crypto/openssl/crypto/bn/bn_lib.c
718
res = constant_time_select_int(constant_time_lt_bn(ap[i], bp[i]),
crypto/openssl/crypto/bn/bn_lib.c
720
res = constant_time_select_int(constant_time_lt_bn(bp[i], ap[i]),
crypto/openssl/crypto/bn/bn_lib.c
735
t2 = bp[i];
crypto/openssl/crypto/bn/bn_local.h
235
BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_local.h
237
BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_local.h
672
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_mod.c
141
const BN_ULONG *ap, *bp;
crypto/openssl/crypto/bn/bn_mod.c
148
bp = b->d != NULL ? b->d : rp;
crypto/openssl/crypto/bn/bn_mod.c
155
tb = bp[bi] & mask;
crypto/openssl/crypto/bn/bn_mod.c
60
const BN_ULONG *ap, *bp;
crypto/openssl/crypto/bn/bn_mod.c
72
bp = b->d != NULL ? b->d : tp;
crypto/openssl/crypto/bn/bn_mod.c
80
tp[i] = ((bp[bi] & mask) + temp) & BN_MASK2;
crypto/openssl/crypto/bn/bn_nist.c
1000
acc += bp[18 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1001
acc += bp[15 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1002
acc += bp[14 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1003
acc += bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1004
acc -= bp[17 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1009
acc += bp[19 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1010
acc += bp[16 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1011
acc += bp[15 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1012
acc += bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1013
acc -= bp[18 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1018
acc += bp[20 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1019
acc += bp[17 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1020
acc += bp[16 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1021
acc -= bp[19 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1026
acc += bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1027
acc += bp[18 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1028
acc += bp[17 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1029
acc -= bp[20 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1034
acc += bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1035
acc += bp[19 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1036
acc += bp[18 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1037
acc -= bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1042
acc += bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1043
acc += bp[20 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1044
acc += bp[19 - 12];
crypto/openssl/crypto/bn/bn_nist.c
1045
acc -= bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
395
const unsigned int *bp = (const unsigned int *)buf.ui;
crypto/openssl/crypto/bn/bn_nist.c
398
acc += bp[3 * 2 - 6];
crypto/openssl/crypto/bn/bn_nist.c
399
acc += bp[5 * 2 - 6];
crypto/openssl/crypto/bn/bn_nist.c
404
acc += bp[3 * 2 - 5];
crypto/openssl/crypto/bn/bn_nist.c
405
acc += bp[5 * 2 - 5];
crypto/openssl/crypto/bn/bn_nist.c
410
acc += bp[3 * 2 - 6];
crypto/openssl/crypto/bn/bn_nist.c
411
acc += bp[4 * 2 - 6];
crypto/openssl/crypto/bn/bn_nist.c
412
acc += bp[5 * 2 - 6];
crypto/openssl/crypto/bn/bn_nist.c
417
acc += bp[3 * 2 - 5];
crypto/openssl/crypto/bn/bn_nist.c
418
acc += bp[4 * 2 - 5];
crypto/openssl/crypto/bn/bn_nist.c
419
acc += bp[5 * 2 - 5];
crypto/openssl/crypto/bn/bn_nist.c
424
acc += bp[4 * 2 - 6];
crypto/openssl/crypto/bn/bn_nist.c
425
acc += bp[5 * 2 - 6];
crypto/openssl/crypto/bn/bn_nist.c
430
acc += bp[4 * 2 - 5];
crypto/openssl/crypto/bn/bn_nist.c
431
acc += bp[5 * 2 - 5];
crypto/openssl/crypto/bn/bn_nist.c
541
const unsigned int *bp = (const unsigned int *)buf.ui;
crypto/openssl/crypto/bn/bn_nist.c
544
acc -= bp[7 - 7];
crypto/openssl/crypto/bn/bn_nist.c
545
acc -= bp[11 - 7];
crypto/openssl/crypto/bn/bn_nist.c
550
acc -= bp[8 - 7];
crypto/openssl/crypto/bn/bn_nist.c
551
acc -= bp[12 - 7];
crypto/openssl/crypto/bn/bn_nist.c
556
acc -= bp[9 - 7];
crypto/openssl/crypto/bn/bn_nist.c
557
acc -= bp[13 - 7];
crypto/openssl/crypto/bn/bn_nist.c
562
acc += bp[7 - 7];
crypto/openssl/crypto/bn/bn_nist.c
563
acc += bp[11 - 7];
crypto/openssl/crypto/bn/bn_nist.c
564
acc -= bp[10 - 7];
crypto/openssl/crypto/bn/bn_nist.c
569
acc += bp[8 - 7];
crypto/openssl/crypto/bn/bn_nist.c
570
acc += bp[12 - 7];
crypto/openssl/crypto/bn/bn_nist.c
571
acc -= bp[11 - 7];
crypto/openssl/crypto/bn/bn_nist.c
576
acc += bp[9 - 7];
crypto/openssl/crypto/bn/bn_nist.c
577
acc += bp[13 - 7];
crypto/openssl/crypto/bn/bn_nist.c
578
acc -= bp[12 - 7];
crypto/openssl/crypto/bn/bn_nist.c
583
acc += bp[10 - 7];
crypto/openssl/crypto/bn/bn_nist.c
584
acc -= bp[13 - 7];
crypto/openssl/crypto/bn/bn_nist.c
700
const unsigned int *bp = (const unsigned int *)buf.ui;
crypto/openssl/crypto/bn/bn_nist.c
703
acc += bp[8 - 8];
crypto/openssl/crypto/bn/bn_nist.c
704
acc += bp[9 - 8];
crypto/openssl/crypto/bn/bn_nist.c
705
acc -= bp[11 - 8];
crypto/openssl/crypto/bn/bn_nist.c
706
acc -= bp[12 - 8];
crypto/openssl/crypto/bn/bn_nist.c
707
acc -= bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
708
acc -= bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
713
acc += bp[9 - 8];
crypto/openssl/crypto/bn/bn_nist.c
714
acc += bp[10 - 8];
crypto/openssl/crypto/bn/bn_nist.c
715
acc -= bp[12 - 8];
crypto/openssl/crypto/bn/bn_nist.c
716
acc -= bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
717
acc -= bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
718
acc -= bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
723
acc += bp[10 - 8];
crypto/openssl/crypto/bn/bn_nist.c
724
acc += bp[11 - 8];
crypto/openssl/crypto/bn/bn_nist.c
725
acc -= bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
726
acc -= bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
727
acc -= bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
732
acc += bp[11 - 8];
crypto/openssl/crypto/bn/bn_nist.c
733
acc += bp[11 - 8];
crypto/openssl/crypto/bn/bn_nist.c
734
acc += bp[12 - 8];
crypto/openssl/crypto/bn/bn_nist.c
735
acc += bp[12 - 8];
crypto/openssl/crypto/bn/bn_nist.c
736
acc += bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
737
acc -= bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
738
acc -= bp[8 - 8];
crypto/openssl/crypto/bn/bn_nist.c
739
acc -= bp[9 - 8];
crypto/openssl/crypto/bn/bn_nist.c
744
acc += bp[12 - 8];
crypto/openssl/crypto/bn/bn_nist.c
745
acc += bp[12 - 8];
crypto/openssl/crypto/bn/bn_nist.c
746
acc += bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
747
acc += bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
748
acc += bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
749
acc -= bp[9 - 8];
crypto/openssl/crypto/bn/bn_nist.c
750
acc -= bp[10 - 8];
crypto/openssl/crypto/bn/bn_nist.c
755
acc += bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
756
acc += bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
757
acc += bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
758
acc += bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
759
acc += bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
760
acc -= bp[10 - 8];
crypto/openssl/crypto/bn/bn_nist.c
761
acc -= bp[11 - 8];
crypto/openssl/crypto/bn/bn_nist.c
766
acc += bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
767
acc += bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
768
acc += bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
769
acc += bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
770
acc += bp[14 - 8];
crypto/openssl/crypto/bn/bn_nist.c
771
acc += bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
772
acc -= bp[8 - 8];
crypto/openssl/crypto/bn/bn_nist.c
773
acc -= bp[9 - 8];
crypto/openssl/crypto/bn/bn_nist.c
778
acc += bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
779
acc += bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
780
acc += bp[15 - 8];
crypto/openssl/crypto/bn/bn_nist.c
781
acc += bp[8 - 8];
crypto/openssl/crypto/bn/bn_nist.c
782
acc -= bp[10 - 8];
crypto/openssl/crypto/bn/bn_nist.c
783
acc -= bp[11 - 8];
crypto/openssl/crypto/bn/bn_nist.c
784
acc -= bp[12 - 8];
crypto/openssl/crypto/bn/bn_nist.c
785
acc -= bp[13 - 8];
crypto/openssl/crypto/bn/bn_nist.c
933
const unsigned int *bp = (const unsigned int *)buf.ui;
crypto/openssl/crypto/bn/bn_nist.c
936
acc += bp[12 - 12];
crypto/openssl/crypto/bn/bn_nist.c
937
acc += bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
938
acc += bp[20 - 12];
crypto/openssl/crypto/bn/bn_nist.c
939
acc -= bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
944
acc += bp[13 - 12];
crypto/openssl/crypto/bn/bn_nist.c
945
acc += bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
946
acc += bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
947
acc -= bp[12 - 12];
crypto/openssl/crypto/bn/bn_nist.c
948
acc -= bp[20 - 12];
crypto/openssl/crypto/bn/bn_nist.c
953
acc += bp[14 - 12];
crypto/openssl/crypto/bn/bn_nist.c
954
acc += bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
955
acc -= bp[13 - 12];
crypto/openssl/crypto/bn/bn_nist.c
956
acc -= bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
961
acc += bp[15 - 12];
crypto/openssl/crypto/bn/bn_nist.c
962
acc += bp[12 - 12];
crypto/openssl/crypto/bn/bn_nist.c
963
acc += bp[20 - 12];
crypto/openssl/crypto/bn/bn_nist.c
964
acc += bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
965
acc -= bp[14 - 12];
crypto/openssl/crypto/bn/bn_nist.c
966
acc -= bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
967
acc -= bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
972
acc += bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
973
acc += bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
974
acc += bp[16 - 12];
crypto/openssl/crypto/bn/bn_nist.c
975
acc += bp[13 - 12];
crypto/openssl/crypto/bn/bn_nist.c
976
acc += bp[12 - 12];
crypto/openssl/crypto/bn/bn_nist.c
977
acc += bp[20 - 12];
crypto/openssl/crypto/bn/bn_nist.c
978
acc += bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
979
acc -= bp[15 - 12];
crypto/openssl/crypto/bn/bn_nist.c
980
acc -= bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
981
acc -= bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
986
acc += bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
987
acc += bp[22 - 12];
crypto/openssl/crypto/bn/bn_nist.c
988
acc += bp[17 - 12];
crypto/openssl/crypto/bn/bn_nist.c
989
acc += bp[14 - 12];
crypto/openssl/crypto/bn/bn_nist.c
990
acc += bp[13 - 12];
crypto/openssl/crypto/bn/bn_nist.c
991
acc += bp[21 - 12];
crypto/openssl/crypto/bn/bn_nist.c
992
acc += bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
993
acc -= bp[16 - 12];
crypto/openssl/crypto/bn/bn_nist.c
998
acc += bp[23 - 12];
crypto/openssl/crypto/bn/bn_nist.c
999
acc += bp[23 - 12];
crypto/openssl/crypto/bn/bn_ppc.c
15
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_ppc.c
18
int bn_mul_mont_int(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_ppc.c
20
int bn_mul4x_mont_int(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_ppc.c
23
const BN_ULONG *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_ppc.c
26
const BN_ULONG *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_ppc.c
33
return bn_mul4x_mont_int(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/bn/bn_ppc.c
48
return bn_mul_mont_300_fixed_n6(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/bn/bn_ppc.c
50
return bn_mul_mont_fixed_n6(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/bn/bn_ppc.c
55
return bn_mul_mont_int(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/bn/bn_print.c
31
int BN_print(BIO *bp, const BIGNUM *a)
crypto/openssl/crypto/bn/bn_print.c
36
if ((a->neg) && BIO_write(bp, "-", 1) != 1)
crypto/openssl/crypto/bn/bn_print.c
38
if (BN_is_zero(a) && BIO_write(bp, "0", 1) != 1)
crypto/openssl/crypto/bn/bn_print.c
45
if (BIO_write(bp, &Hex[v], 1) != 1)
crypto/openssl/crypto/bn/bn_sparc.c
16
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_sparc.c
19
int bn_mul_mont_vis3(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_sparc.c
21
int bn_mul_mont_fpu(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_sparc.c
23
int bn_mul_mont_int(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_sparc.c
29
const BN_ULONG *bp,
crypto/openssl/crypto/bn/bn_sparc.c
33
const BN_ULONG *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_sparc.c
36
const BN_ULONG *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_sparc.c
39
const BN_ULONG *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_sparc.c
42
const BN_ULONG *bp, const BN_ULONG *np,
crypto/openssl/crypto/bn/bn_sparc.c
50
if ((*worker)(rp, ap, bp, np, n0))
crypto/openssl/crypto/bn/bn_sparc.c
53
if ((*worker)(rp, ap, bp, np, n0))
crypto/openssl/crypto/bn/bn_sparc.c
55
return bn_mul_mont_vis3(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/bn/bn_sparc.c
58
return bn_mul_mont_vis3(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/bn/bn_sparc.c
69
return bn_mul_mont_fpu(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/bn/bn_sparc.c
71
return bn_mul_mont_int(rp, ap, bp, np, n0, num);
crypto/openssl/crypto/cms/cms_io.c
37
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms)
crypto/openssl/crypto/cms/cms_io.c
42
ci = ASN1_item_d2i_bio_ex(ASN1_ITEM_rptr(CMS_ContentInfo), bp, cms,
crypto/openssl/crypto/cms/cms_io.c
53
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms)
crypto/openssl/crypto/cms/cms_io.c
55
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(CMS_ContentInfo), bp, cms);
crypto/openssl/crypto/conf/conf_def.c
68
static int def_load_bio(CONF *conf, BIO *bp, long *eline);
crypto/openssl/crypto/conf/conf_def.c
69
static int def_dump(const CONF *conf, BIO *bp);
crypto/openssl/crypto/conf/conf_lib.c
276
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline)
crypto/openssl/crypto/conf/conf_lib.c
283
return conf->meth->load_bio(conf, bp, eline);
crypto/openssl/crypto/conf/conf_lib.c
84
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
crypto/openssl/crypto/conf/conf_lib.c
92
ret = NCONF_load_bio(&ctmp, bp, eline);
crypto/openssl/crypto/dh/dh_ameth.c
244
static int do_dh_print(BIO *bp, const DH *x, int indent, int ptype)
crypto/openssl/crypto/dh/dh_ameth.c
273
if (!BIO_indent(bp, indent, 128)
crypto/openssl/crypto/dh/dh_ameth.c
274
|| BIO_printf(bp, "%s: (%d bit)\n", ktype, DH_bits(x)) <= 0)
crypto/openssl/crypto/dh/dh_ameth.c
278
if (!ASN1_bn_print(bp, "private-key:", priv_key, NULL, indent))
crypto/openssl/crypto/dh/dh_ameth.c
280
if (!ASN1_bn_print(bp, "public-key:", pub_key, NULL, indent))
crypto/openssl/crypto/dh/dh_ameth.c
283
if (!ossl_ffc_params_print(bp, &x->params, indent))
crypto/openssl/crypto/dh/dh_ameth.c
287
if (!BIO_indent(bp, indent, 128)
crypto/openssl/crypto/dh/dh_ameth.c
288
|| BIO_printf(bp, "recommended-private-length: %d bits\n",
crypto/openssl/crypto/dh/dh_ameth.c
375
static int dh_param_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/dh/dh_ameth.c
378
return do_dh_print(bp, pkey->pkey.dh, indent, 0);
crypto/openssl/crypto/dh/dh_ameth.c
381
static int dh_public_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/dh/dh_ameth.c
384
return do_dh_print(bp, pkey->pkey.dh, indent, 1);
crypto/openssl/crypto/dh/dh_ameth.c
387
static int dh_private_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/dh/dh_ameth.c
390
return do_dh_print(bp, pkey->pkey.dh, indent, 2);
crypto/openssl/crypto/dh/dh_ameth.c
393
int DHparams_print(BIO *bp, const DH *x)
crypto/openssl/crypto/dh/dh_ameth.c
395
return do_dh_print(bp, x, 4, 0);
crypto/openssl/crypto/dsa/dsa_ameth.c
271
static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
crypto/openssl/crypto/dsa/dsa_ameth.c
299
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/dsa/dsa_ameth.c
301
if (BIO_printf(bp, "%s: (%d bit)\n", ktype, mod_len) <= 0)
crypto/openssl/crypto/dsa/dsa_ameth.c
304
if (BIO_printf(bp, "Public-Key: (%d bit)\n", mod_len) <= 0)
crypto/openssl/crypto/dsa/dsa_ameth.c
308
if (!ASN1_bn_print(bp, "priv:", priv_key, NULL, off))
crypto/openssl/crypto/dsa/dsa_ameth.c
310
if (!ASN1_bn_print(bp, "pub: ", pub_key, NULL, off))
crypto/openssl/crypto/dsa/dsa_ameth.c
312
if (!ossl_ffc_params_print(bp, &x->params, off))
crypto/openssl/crypto/dsa/dsa_ameth.c
337
static int dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/dsa/dsa_ameth.c
340
return do_dsa_print(bp, pkey->pkey.dsa, indent, 0);
crypto/openssl/crypto/dsa/dsa_ameth.c
343
static int dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/dsa/dsa_ameth.c
346
return do_dsa_print(bp, pkey->pkey.dsa, indent, 1);
crypto/openssl/crypto/dsa/dsa_ameth.c
349
static int dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/dsa/dsa_ameth.c
352
return do_dsa_print(bp, pkey->pkey.dsa, indent, 2);
crypto/openssl/crypto/dsa/dsa_ameth.c
374
static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
crypto/openssl/crypto/dsa/dsa_ameth.c
381
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/dsa/dsa_ameth.c
394
if (BIO_write(bp, "\n", 1) != 1)
crypto/openssl/crypto/dsa/dsa_ameth.c
397
if (!ASN1_bn_print(bp, "r: ", r, NULL, indent))
crypto/openssl/crypto/dsa/dsa_ameth.c
399
if (!ASN1_bn_print(bp, "s: ", s, NULL, indent))
crypto/openssl/crypto/dsa/dsa_ameth.c
406
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/dsa/dsa_ameth.c
408
return X509_signature_dump(bp, sig, indent);
crypto/openssl/crypto/dsa/dsa_prn.c
53
int DSA_print(BIO *bp, const DSA *x, int off)
crypto/openssl/crypto/dsa/dsa_prn.c
62
ret = EVP_PKEY_print_private(bp, pk, off, NULL);
crypto/openssl/crypto/dsa/dsa_prn.c
67
int DSAparams_print(BIO *bp, const DSA *x)
crypto/openssl/crypto/dsa/dsa_prn.c
76
ret = EVP_PKEY_print_params(bp, pk, 4, NULL);
crypto/openssl/crypto/ec/ec_ameth.c
283
static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, ec_print_t ktype)
crypto/openssl/crypto/ec/ec_ameth.c
315
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/ec/ec_ameth.c
317
if (BIO_printf(bp, "%s: (%d bit)\n", ecstr,
crypto/openssl/crypto/ec/ec_ameth.c
323
if (BIO_printf(bp, "%*spriv:\n", off, "") <= 0)
crypto/openssl/crypto/ec/ec_ameth.c
325
if (ASN1_buf_print(bp, priv, privlen, off + 4) == 0)
crypto/openssl/crypto/ec/ec_ameth.c
330
if (BIO_printf(bp, "%*spub:\n", off, "") <= 0)
crypto/openssl/crypto/ec/ec_ameth.c
332
if (ASN1_buf_print(bp, pub, publen, off + 4) == 0)
crypto/openssl/crypto/ec/ec_ameth.c
336
if (!ECPKParameters_print(bp, group, off))
crypto/openssl/crypto/ec/ec_ameth.c
363
static int eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/ec/ec_ameth.c
366
return do_EC_KEY_print(bp, pkey->pkey.ec, indent, EC_KEY_PRINT_PARAM);
crypto/openssl/crypto/ec/ec_ameth.c
369
static int eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/ec/ec_ameth.c
372
return do_EC_KEY_print(bp, pkey->pkey.ec, indent, EC_KEY_PRINT_PUBLIC);
crypto/openssl/crypto/ec/ec_ameth.c
375
static int eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/ec/ec_ameth.c
378
return do_EC_KEY_print(bp, pkey->pkey.ec, indent, EC_KEY_PRINT_PRIVATE);
crypto/openssl/crypto/ec/ec_ameth.c
709
int EC_KEY_print(BIO *bp, const EC_KEY *x, int off)
crypto/openssl/crypto/ec/ec_ameth.c
713
return do_EC_KEY_print(bp, x, off,
crypto/openssl/crypto/ec/ec_ameth.c
717
int ECParameters_print(BIO *bp, const EC_KEY *x)
crypto/openssl/crypto/ec/ec_ameth.c
719
return do_EC_KEY_print(bp, x, 4, EC_KEY_PRINT_PARAM);
crypto/openssl/crypto/ec/eck_prn.c
101
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/ec/eck_prn.c
107
if (BIO_printf(bp, "ASN1 OID: %s", OBJ_nid2sn(nid)) <= 0)
crypto/openssl/crypto/ec/eck_prn.c
109
if (BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/ec/eck_prn.c
113
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/ec/eck_prn.c
115
if (BIO_printf(bp, "NIST CURVE: %s\n", nname) <= 0)
crypto/openssl/crypto/ec/eck_prn.c
160
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/ec/eck_prn.c
164
if (BIO_printf(bp, "Field Type: %s\n", OBJ_nid2sn(tmp_nid))
crypto/openssl/crypto/ec/eck_prn.c
174
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/ec/eck_prn.c
177
if (BIO_printf(bp, "Basis Type: %s\n",
crypto/openssl/crypto/ec/eck_prn.c
183
if ((p != NULL) && !ASN1_bn_print(bp, "Polynomial:", p, NULL, off))
crypto/openssl/crypto/ec/eck_prn.c
186
if ((p != NULL) && !ASN1_bn_print(bp, "Prime:", p, NULL, off))
crypto/openssl/crypto/ec/eck_prn.c
189
if ((a != NULL) && !ASN1_bn_print(bp, "A: ", a, NULL, off))
crypto/openssl/crypto/ec/eck_prn.c
191
if ((b != NULL) && !ASN1_bn_print(bp, "B: ", b, NULL, off))
crypto/openssl/crypto/ec/eck_prn.c
201
&& !print_bin(bp, form_str, gen_buf, gen_buf_len, off))
crypto/openssl/crypto/ec/eck_prn.c
204
if ((order != NULL) && !ASN1_bn_print(bp, "Order: ", order, NULL, off))
crypto/openssl/crypto/ec/eck_prn.c
206
if ((cofactor != NULL) && !ASN1_bn_print(bp, "Cofactor: ", cofactor, NULL, off))
crypto/openssl/crypto/ec/eck_prn.c
208
if (seed && !print_bin(bp, "Seed:", seed, seed_len, off))
crypto/openssl/crypto/ec/eck_prn.c
70
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
crypto/openssl/crypto/ec/ecx_meth.c
166
static int ecx_key_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/ec/ecx_meth.c
174
if (BIO_printf(bp, "%*s<INVALID PRIVATE KEY>\n", indent, "") <= 0)
crypto/openssl/crypto/ec/ecx_meth.c
178
if (BIO_printf(bp, "%*s%s Private-Key:\n", indent, "", nm) <= 0)
crypto/openssl/crypto/ec/ecx_meth.c
180
if (BIO_printf(bp, "%*spriv:\n", indent, "") <= 0)
crypto/openssl/crypto/ec/ecx_meth.c
182
if (ASN1_buf_print(bp, ecxkey->privkey, KEYLEN(pkey),
crypto/openssl/crypto/ec/ecx_meth.c
188
if (BIO_printf(bp, "%*s<INVALID PUBLIC KEY>\n", indent, "") <= 0)
crypto/openssl/crypto/ec/ecx_meth.c
192
if (BIO_printf(bp, "%*s%s Public-Key:\n", indent, "", nm) <= 0)
crypto/openssl/crypto/ec/ecx_meth.c
195
if (BIO_printf(bp, "%*spub:\n", indent, "") <= 0)
crypto/openssl/crypto/ec/ecx_meth.c
198
if (ASN1_buf_print(bp, ecxkey->pubkey, KEYLEN(pkey),
crypto/openssl/crypto/ec/ecx_meth.c
205
static int ecx_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/ec/ecx_meth.c
208
return ecx_key_print(bp, pkey, indent, ctx, KEY_OP_PRIVATE);
crypto/openssl/crypto/ec/ecx_meth.c
211
static int ecx_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/ec/ecx_meth.c
214
return ecx_key_print(bp, pkey, indent, ctx, KEY_OP_PUBLIC);
crypto/openssl/crypto/err/err_prn.c
166
static int print_bio(const char *str, size_t len, void *bp)
crypto/openssl/crypto/err/err_prn.c
168
return BIO_write((BIO *)bp, str, len);
crypto/openssl/crypto/err/err_prn.c
171
void ERR_print_errors(BIO *bp)
crypto/openssl/crypto/err/err_prn.c
173
ERR_print_errors_cb(print_bio, bp);
crypto/openssl/crypto/evp/bio_md.c
208
static int md_gets(BIO *bp, char *buf, int size)
crypto/openssl/crypto/evp/bio_md.c
213
ctx = BIO_get_data(bp);
crypto/openssl/crypto/ex_data.c
348
const struct ex_callback_entry *bp = (const struct ex_callback_entry *)b;
crypto/openssl/crypto/ex_data.c
350
if (ap->excb == bp->excb)
crypto/openssl/crypto/ex_data.c
355
if (bp->excb == NULL)
crypto/openssl/crypto/ex_data.c
357
if (ap->excb->priority == bp->excb->priority)
crypto/openssl/crypto/ex_data.c
359
return ap->excb->priority > bp->excb->priority ? -1 : 1;
crypto/openssl/crypto/ffc/ffc_params.c
284
int ossl_ffc_params_print(BIO *bp, const FFC_PARAMS *ffc, int indent)
crypto/openssl/crypto/ffc/ffc_params.c
286
if (!ASN1_bn_print(bp, "prime P:", ffc->p, NULL, indent))
crypto/openssl/crypto/ffc/ffc_params.c
288
if (!ASN1_bn_print(bp, "generator G:", ffc->g, NULL, indent))
crypto/openssl/crypto/ffc/ffc_params.c
291
&& !ASN1_bn_print(bp, "subgroup order Q:", ffc->q, NULL, indent))
crypto/openssl/crypto/ffc/ffc_params.c
294
&& !ASN1_bn_print(bp, "subgroup factor:", ffc->j, NULL, indent))
crypto/openssl/crypto/ffc/ffc_params.c
299
if (!BIO_indent(bp, indent, 128)
crypto/openssl/crypto/ffc/ffc_params.c
300
|| BIO_puts(bp, "seed:") <= 0)
crypto/openssl/crypto/ffc/ffc_params.c
304
if (BIO_puts(bp, "\n") <= 0
crypto/openssl/crypto/ffc/ffc_params.c
305
|| !BIO_indent(bp, indent + 4, 128))
crypto/openssl/crypto/ffc/ffc_params.c
308
if (BIO_printf(bp, "%02x%s", ffc->seed[i],
crypto/openssl/crypto/ffc/ffc_params.c
313
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/ffc/ffc_params.c
317
if (!BIO_indent(bp, indent, 128)
crypto/openssl/crypto/ffc/ffc_params.c
318
|| BIO_printf(bp, "counter: %d\n", ffc->pcounter) <= 0)
crypto/openssl/crypto/lhash/lh_stats.c
29
BIO *bp;
crypto/openssl/crypto/lhash/lh_stats.c
31
bp = BIO_new(BIO_s_file());
crypto/openssl/crypto/lhash/lh_stats.c
32
if (bp == NULL)
crypto/openssl/crypto/lhash/lh_stats.c
34
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/openssl/crypto/lhash/lh_stats.c
35
OPENSSL_LH_stats_bio(lh, bp);
crypto/openssl/crypto/lhash/lh_stats.c
36
BIO_free(bp);
crypto/openssl/crypto/lhash/lh_stats.c
41
BIO *bp;
crypto/openssl/crypto/lhash/lh_stats.c
43
bp = BIO_new(BIO_s_file());
crypto/openssl/crypto/lhash/lh_stats.c
44
if (bp == NULL)
crypto/openssl/crypto/lhash/lh_stats.c
46
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/openssl/crypto/lhash/lh_stats.c
47
OPENSSL_LH_node_stats_bio(lh, bp);
crypto/openssl/crypto/lhash/lh_stats.c
48
BIO_free(bp);
crypto/openssl/crypto/lhash/lh_stats.c
53
BIO *bp;
crypto/openssl/crypto/lhash/lh_stats.c
55
bp = BIO_new(BIO_s_file());
crypto/openssl/crypto/lhash/lh_stats.c
56
if (bp == NULL)
crypto/openssl/crypto/lhash/lh_stats.c
58
BIO_set_fp(bp, fp, BIO_NOCLOSE);
crypto/openssl/crypto/lhash/lh_stats.c
59
OPENSSL_LH_node_usage_stats_bio(lh, bp);
crypto/openssl/crypto/lhash/lh_stats.c
60
BIO_free(bp);
crypto/openssl/crypto/objects/obj_dat.c
367
static int obj_cmp(const ASN1_OBJECT *const *ap, const unsigned int *bp)
crypto/openssl/crypto/objects/obj_dat.c
371
const ASN1_OBJECT *b = &nid_objs[*bp];
crypto/openssl/crypto/ocsp/ocsp_prn.c
101
if (BIO_printf(bp, " Version: %lu (0x%lx)", l + 1, l) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
104
if (BIO_write(bp, "\n Requestor Name: ", 21) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
106
GENERAL_NAME_print(bp, inf->requestorName);
crypto/openssl/crypto/ocsp/ocsp_prn.c
108
if (BIO_write(bp, "\n Requestor List:\n", 21) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
113
ocsp_certid_print(bp, cid, 8);
crypto/openssl/crypto/ocsp/ocsp_prn.c
114
if (!X509V3_extensions_print(bp,
crypto/openssl/crypto/ocsp/ocsp_prn.c
119
if (!X509V3_extensions_print(bp, "Request Extensions",
crypto/openssl/crypto/ocsp/ocsp_prn.c
123
X509_signature_print(bp, &sig->signatureAlgorithm, sig->signature);
crypto/openssl/crypto/ocsp/ocsp_prn.c
125
X509_print(bp, sk_X509_value(sig->certs, i));
crypto/openssl/crypto/ocsp/ocsp_prn.c
126
PEM_write_bio_X509(bp, sk_X509_value(sig->certs, i));
crypto/openssl/crypto/ocsp/ocsp_prn.c
134
int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags)
crypto/openssl/crypto/ocsp/ocsp_prn.c
147
if (BIO_puts(bp, "OCSP Response Data:\n") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
150
if (BIO_printf(bp, " OCSP Response Status: %s (0x%lx)\n",
crypto/openssl/crypto/ocsp/ocsp_prn.c
156
if (BIO_puts(bp, " Response Type: ") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
158
if (i2a_ASN1_OBJECT(bp, rb->responseType) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
161
BIO_puts(bp, " (unknown response type)\n");
crypto/openssl/crypto/ocsp/ocsp_prn.c
169
if (BIO_printf(bp, "\n Version: %lu (0x%lx)\n", l + 1, l) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
17
static int ocsp_certid_print(BIO *bp, OCSP_CERTID *a, int indent)
crypto/openssl/crypto/ocsp/ocsp_prn.c
171
if (BIO_puts(bp, " Responder Id: ") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
177
X509_NAME_print_ex(bp, rid->value.byName, 0, XN_FLAG_ONELINE);
crypto/openssl/crypto/ocsp/ocsp_prn.c
180
i2a_ASN1_STRING(bp, rid->value.byKey, 0);
crypto/openssl/crypto/ocsp/ocsp_prn.c
184
if (BIO_printf(bp, "\n Produced At: ") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
186
if (!ASN1_GENERALIZEDTIME_print(bp, rd->producedAt))
crypto/openssl/crypto/ocsp/ocsp_prn.c
188
if (BIO_printf(bp, "\n Responses:\n") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
19
BIO_printf(bp, "%*sCertificate ID:\n", indent, "");
crypto/openssl/crypto/ocsp/ocsp_prn.c
195
if (ocsp_certid_print(bp, cid, 4) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
198
if (BIO_printf(bp, " Cert Status: %s",
crypto/openssl/crypto/ocsp/ocsp_prn.c
204
if (BIO_printf(bp, "\n Revocation Time: ") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
206
if (!ASN1_GENERALIZEDTIME_print(bp, rev->revocationTime))
crypto/openssl/crypto/ocsp/ocsp_prn.c
21
BIO_printf(bp, "%*sHash Algorithm: ", indent, "");
crypto/openssl/crypto/ocsp/ocsp_prn.c
210
if (BIO_printf(bp,
crypto/openssl/crypto/ocsp/ocsp_prn.c
217
if (BIO_printf(bp, "\n This Update: ") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
219
if (!ASN1_GENERALIZEDTIME_print(bp, single->thisUpdate))
crypto/openssl/crypto/ocsp/ocsp_prn.c
22
i2a_ASN1_OBJECT(bp, a->hashAlgorithm.algorithm);
crypto/openssl/crypto/ocsp/ocsp_prn.c
222
if (BIO_printf(bp, "\n Next Update: ") <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
224
if (!ASN1_GENERALIZEDTIME_print(bp, single->nextUpdate))
crypto/openssl/crypto/ocsp/ocsp_prn.c
227
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
229
if (!X509V3_extensions_print(bp,
crypto/openssl/crypto/ocsp/ocsp_prn.c
23
BIO_printf(bp, "\n%*sIssuer Name Hash: ", indent, "");
crypto/openssl/crypto/ocsp/ocsp_prn.c
233
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
236
if (!X509V3_extensions_print(bp, "Response Extensions",
crypto/openssl/crypto/ocsp/ocsp_prn.c
239
if (X509_signature_print(bp, &br->signatureAlgorithm, br->signature) <= 0)
crypto/openssl/crypto/ocsp/ocsp_prn.c
24
i2a_ASN1_STRING(bp, &a->issuerNameHash, 0);
crypto/openssl/crypto/ocsp/ocsp_prn.c
243
X509_print(bp, sk_X509_value(br->certs, i));
crypto/openssl/crypto/ocsp/ocsp_prn.c
244
PEM_write_bio_X509(bp, sk_X509_value(br->certs, i));
crypto/openssl/crypto/ocsp/ocsp_prn.c
25
BIO_printf(bp, "\n%*sIssuer Key Hash: ", indent, "");
crypto/openssl/crypto/ocsp/ocsp_prn.c
26
i2a_ASN1_STRING(bp, &a->issuerKeyHash, 0);
crypto/openssl/crypto/ocsp/ocsp_prn.c
27
BIO_printf(bp, "\n%*sSerial Number: ", indent, "");
crypto/openssl/crypto/ocsp/ocsp_prn.c
28
i2a_ASN1_INTEGER(bp, &a->serialNumber);
crypto/openssl/crypto/ocsp/ocsp_prn.c
29
BIO_printf(bp, "\n");
crypto/openssl/crypto/ocsp/ocsp_prn.c
89
int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *o, unsigned long flags)
crypto/openssl/crypto/ocsp/ocsp_prn.c
98
if (BIO_write(bp, "OCSP Request Data:\n", 19) <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
103
if (BIO_printf(bp, "%*scrlNum: ", ind, "") <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
105
if (i2a_ASN1_INTEGER(bp, a->crlNum) <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
107
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
111
if (BIO_printf(bp, "%*scrlTime: ", ind, "") <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
113
if (!ASN1_GENERALIZEDTIME_print(bp, a->crlTime))
crypto/openssl/crypto/ocsp/v3_ocsp.c
115
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
124
BIO *bp, int ind)
crypto/openssl/crypto/ocsp/v3_ocsp.c
126
if (BIO_printf(bp, "%*s", ind, "") <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
128
if (!ASN1_GENERALIZEDTIME_print(bp, cutoff))
crypto/openssl/crypto/ocsp/v3_ocsp.c
210
BIO *bp, int ind)
crypto/openssl/crypto/ocsp/v3_ocsp.c
216
if (BIO_printf(bp, "%*sIssuer: ", ind, "") <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
218
if (X509_NAME_print_ex(bp, a->issuer, 0, XN_FLAG_ONELINE) <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
222
if (BIO_printf(bp, "\n%*s", (2 * ind), "") <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
224
if (i2a_ASN1_OBJECT(bp, ad->method) <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
226
if (BIO_puts(bp, " - ") <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
228
if (GENERAL_NAME_print(bp, ad->location) <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
40
BIO *bp, int ind);
crypto/openssl/crypto/ocsp/v3_ocsp.c
90
static int i2r_ocsp_crlid(const X509V3_EXT_METHOD *method, void *in, BIO *bp,
crypto/openssl/crypto/ocsp/v3_ocsp.c
95
if (BIO_printf(bp, "%*scrlUrl: ", ind, "") <= 0)
crypto/openssl/crypto/ocsp/v3_ocsp.c
97
if (!ASN1_STRING_print(bp, (ASN1_STRING *)a->crlUrl))
crypto/openssl/crypto/ocsp/v3_ocsp.c
99
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/pem/pem_all.c
109
DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_all.c
113
pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);
crypto/openssl/crypto/pem/pem_all.c
150
EC_KEY *PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **key, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_all.c
154
pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);
crypto/openssl/crypto/pem/pem_all.c
183
DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u)
crypto/openssl/crypto/pem/pem_all.c
191
if (!PEM_bytes_read_bio(&data, &len, &nm, PEM_STRING_DHPARAMS, bp, cb, u))
crypto/openssl/crypto/pem/pem_all.c
69
RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_all.c
73
pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);
crypto/openssl/crypto/pem/pem_info.c
217
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
crypto/openssl/crypto/pem/pem_info.c
220
return PEM_X509_INFO_read_bio_ex(bp, sk, cb, u, NULL, NULL);
crypto/openssl/crypto/pem/pem_info.c
224
int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc,
crypto/openssl/crypto/pem/pem_info.c
283
i = PEM_write_bio(bp, PEM_STRING_RSA, buf, data, i);
crypto/openssl/crypto/pem/pem_info.c
289
if (PEM_write_bio_RSAPrivateKey(bp,
crypto/openssl/crypto/pem/pem_info.c
298
if ((xi->x509 != NULL) && (PEM_write_bio_X509(bp, xi->x509) <= 0))
crypto/openssl/crypto/pem/pem_info.c
52
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bp, STACK_OF(X509_INFO) *sk,
crypto/openssl/crypto/pem/pem_info.c
82
i = PEM_read_bio(bp, &name, &header, &data, &len);
crypto/openssl/crypto/pem/pem_lib.c
1029
int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,
crypto/openssl/crypto/pem/pem_lib.c
1032
return PEM_read_bio_ex(bp, name, header, data, len, PEM_FLAG_EAY_COMPATIBLE);
crypto/openssl/crypto/pem/pem_lib.c
242
char **pnm, const char *name, BIO *bp,
crypto/openssl/crypto/pem/pem_lib.c
256
if (!PEM_read_bio_ex(bp, &nm, &header, &data, &len, flags)) {
crypto/openssl/crypto/pem/pem_lib.c
285
const char *name, BIO *bp, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_lib.c
288
return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u,
crypto/openssl/crypto/pem/pem_lib.c
293
const char *name, BIO *bp, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_lib.c
296
return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u,
crypto/openssl/crypto/pem/pem_lib.c
323
const char *name, BIO *bp, const void *x, const EVP_CIPHER *enc,
crypto/openssl/crypto/pem/pem_lib.c
414
i = PEM_write_bio(bp, name, buf, data, i);
crypto/openssl/crypto/pem/pem_lib.c
426
int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, const void *x,
crypto/openssl/crypto/pem/pem_lib.c
430
return PEM_ASN1_write_bio_internal(i2d, NULL, NULL, name, bp, x, enc,
crypto/openssl/crypto/pem/pem_lib.c
435
const char *name, BIO *bp, const void *x,
crypto/openssl/crypto/pem/pem_lib.c
439
return PEM_ASN1_write_bio_internal(NULL, i2d, vctx, name, bp, x, enc,
crypto/openssl/crypto/pem/pem_lib.c
633
int PEM_write_bio(BIO *bp, const char *name, const char *header,
crypto/openssl/crypto/pem/pem_lib.c
650
if ((BIO_write(bp, "-----BEGIN ", 11) != 11) || (BIO_write(bp, name, nlen) != nlen) || (BIO_write(bp, "-----\n", 6) != 6)) {
crypto/openssl/crypto/pem/pem_lib.c
657
if ((BIO_write(bp, header, i) != i) || (BIO_write(bp, "\n", 1) != 1)) {
crypto/openssl/crypto/pem/pem_lib.c
674
if ((outl) && (BIO_write(bp, (char *)buf, outl) != outl)) {
crypto/openssl/crypto/pem/pem_lib.c
683
if ((outl > 0) && (BIO_write(bp, (char *)buf, outl) != outl)) {
crypto/openssl/crypto/pem/pem_lib.c
687
if ((BIO_write(bp, "-----END ", 9) != 9) || (BIO_write(bp, name, nlen) != nlen) || (BIO_write(bp, "-----\n", 6) != 6)) {
crypto/openssl/crypto/pem/pem_lib.c
773
static int get_name(BIO *bp, char **name, unsigned int flags)
crypto/openssl/crypto/pem/pem_lib.c
789
len = BIO_gets(bp, linebuf, LINESIZE);
crypto/openssl/crypto/pem/pem_lib.c
835
static int get_header_and_data(BIO *bp, BIO **header, BIO **data, char *name,
crypto/openssl/crypto/pem/pem_lib.c
854
len = BIO_gets(bp, linebuf, LINESIZE);
crypto/openssl/crypto/pem/pem_lib.c
942
int PEM_read_bio_ex(BIO *bp, char **name_out, char **header,
crypto/openssl/crypto/pem/pem_lib.c
969
if (!get_name(bp, &name, flags))
crypto/openssl/crypto/pem/pem_lib.c
971
if (!get_header_and_data(bp, &headerB, &dataB, name, flags))
crypto/openssl/crypto/pem/pem_oth.c
20
void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
crypto/openssl/crypto/pem/pem_oth.c
28
if (!PEM_bytes_read_bio(&data, &len, NULL, name, bp, cb, u))
crypto/openssl/crypto/pem/pem_pk8.c
124
ret = ret && OSSL_ENCODER_to_bio(ctx, bp);
crypto/openssl/crypto/pem/pem_pk8.c
151
ret = i2d_PKCS8_bio(bp, p8);
crypto/openssl/crypto/pem/pem_pk8.c
153
ret = PEM_write_bio_PKCS8(bp, p8);
crypto/openssl/crypto/pem/pem_pk8.c
157
ret = i2d_PKCS8_PRIV_KEY_INFO_bio(bp, p8inf);
crypto/openssl/crypto/pem/pem_pk8.c
159
ret = PEM_write_bio_PKCS8_PRIV_KEY_INFO(bp, p8inf);
crypto/openssl/crypto/pem/pem_pk8.c
168
EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_pk8.c
177
p8 = d2i_PKCS8_bio(bp, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
21
static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder,
crypto/openssl/crypto/pem/pem_pk8.c
239
BIO *bp;
crypto/openssl/crypto/pem/pem_pk8.c
242
if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
crypto/openssl/crypto/pem/pem_pk8.c
246
ret = do_pk8pkey(bp, x, isder, nid, enc, kstr, klen, cb, u, propq);
crypto/openssl/crypto/pem/pem_pk8.c
247
BIO_free(bp);
crypto/openssl/crypto/pem/pem_pk8.c
254
BIO *bp;
crypto/openssl/crypto/pem/pem_pk8.c
257
if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
crypto/openssl/crypto/pem/pem_pk8.c
261
ret = d2i_PKCS8PrivateKey_bio(bp, x, cb, u);
crypto/openssl/crypto/pem/pem_pk8.c
262
BIO_free(bp);
crypto/openssl/crypto/pem/pem_pk8.c
28
static int do_pk8pkey_fp(FILE *bp, const EVP_PKEY *x, int isder,
crypto/openssl/crypto/pem/pem_pk8.c
41
int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
crypto/openssl/crypto/pem/pem_pk8.c
45
return do_pk8pkey(bp, x, 0, nid, NULL, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
48
int PEM_write_bio_PKCS8PrivateKey(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/openssl/crypto/pem/pem_pk8.c
52
return do_pk8pkey(bp, x, 0, -1, enc, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
55
int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/openssl/crypto/pem/pem_pk8.c
59
return do_pk8pkey(bp, x, 1, -1, enc, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
62
int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
crypto/openssl/crypto/pem/pem_pk8.c
66
return do_pk8pkey(bp, x, 1, nid, NULL, kstr, klen, cb, u, NULL);
crypto/openssl/crypto/pem/pem_pk8.c
69
static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder, int nid,
crypto/openssl/crypto/pem/pem_pkey.c
116
bp, cb, u)) {
crypto/openssl/crypto/pem/pem_pkey.c
127
bp, cb, u)) {
crypto/openssl/crypto/pem/pem_pkey.c
214
static EVP_PKEY *pem_read_bio_key(BIO *bp, EVP_PKEY **x,
crypto/openssl/crypto/pem/pem_pkey.c
225
if ((pos = BIO_tell(bp)) < 0) {
crypto/openssl/crypto/pem/pem_pkey.c
229
bp = BIO_push(new_bio, bp);
crypto/openssl/crypto/pem/pem_pkey.c
230
pos = BIO_tell(bp);
crypto/openssl/crypto/pem/pem_pkey.c
241
ret = pem_read_bio_key_decoder(bp, x, ossl_pw_pem_password, &pwdata,
crypto/openssl/crypto/pem/pem_pkey.c
244
&& (BIO_seek(bp, pos) < 0
crypto/openssl/crypto/pem/pem_pkey.c
245
|| (ret = pem_read_bio_key_legacy(bp, x,
crypto/openssl/crypto/pem/pem_pkey.c
263
EVP_PKEY *PEM_read_bio_PUBKEY_ex(BIO *bp, EVP_PKEY **x,
crypto/openssl/crypto/pem/pem_pkey.c
267
return pem_read_bio_key(bp, x, cb, u, libctx, propq,
crypto/openssl/crypto/pem/pem_pkey.c
271
EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_pkey.c
274
return PEM_read_bio_PUBKEY_ex(bp, x, cb, u, NULL, NULL);
crypto/openssl/crypto/pem/pem_pkey.c
301
EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *bp, EVP_PKEY **x,
crypto/openssl/crypto/pem/pem_pkey.c
305
return pem_read_bio_key(bp, x, cb, u, libctx, propq,
crypto/openssl/crypto/pem/pem_pkey.c
310
EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/crypto/pem/pem_pkey.c
313
return PEM_read_bio_PrivateKey_ex(bp, x, cb, u, NULL, NULL);
crypto/openssl/crypto/pem/pem_pkey.c
33
static EVP_PKEY *pem_read_bio_key_decoder(BIO *bp, EVP_PKEY **x,
crypto/openssl/crypto/pem/pem_pkey.c
340
int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x,
crypto/openssl/crypto/pem/pem_pkey.c
364
pem_str, bp, x, enc, kstr, klen, cb, u);
crypto/openssl/crypto/pem/pem_pkey.c
375
EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x,
crypto/openssl/crypto/pem/pem_pkey.c
382
return pem_read_bio_key(bp, x, no_password_cb, NULL, libctx, propq,
crypto/openssl/crypto/pem/pem_pkey.c
386
EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x)
crypto/openssl/crypto/pem/pem_pkey.c
388
return PEM_read_bio_Parameters_ex(bp, x, NULL, NULL);
crypto/openssl/crypto/pem/pem_pkey.c
43
if ((pos = BIO_tell(bp)) < 0)
crypto/openssl/crypto/pem/pem_pkey.c
60
while (!OSSL_DECODER_from_bio(dctx, bp) || pkey == NULL)
crypto/openssl/crypto/pem/pem_pkey.c
61
if (BIO_eof(bp) != 0 || (newpos = BIO_tell(bp)) < 0 || newpos <= pos) {
crypto/openssl/crypto/pem/pem_pkey.c
99
static EVP_PKEY *pem_read_bio_key_legacy(BIO *bp, EVP_PKEY **x,
crypto/openssl/crypto/pkcs12/p12_utl.c
235
int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12)
crypto/openssl/crypto/pkcs12/p12_utl.c
237
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(PKCS12), bp, p12);
crypto/openssl/crypto/pkcs12/p12_utl.c
247
PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12)
crypto/openssl/crypto/pkcs12/p12_utl.c
260
return ASN1_item_d2i_bio_ex(ASN1_ITEM_rptr(PKCS12), bp, p12, libctx, propq);
crypto/openssl/crypto/property/property_parse.c
542
const OSSL_PROPERTY_DEFINITION *const bp = b->properties;
crypto/openssl/crypto/property/property_parse.c
556
copy = &bp[j++];
crypto/openssl/crypto/property/property_parse.c
559
} else if (ap[i].name_idx <= bp[j].name_idx) {
crypto/openssl/crypto/property/property_parse.c
560
if (ap[i].name_idx == bp[j].name_idx)
crypto/openssl/crypto/property/property_parse.c
564
copy = &bp[j++];
crypto/openssl/crypto/rsa/rsa_ameth.c
205
static int rsa_pss_param_print(BIO *bp, int pss_key, RSA_PSS_PARAMS *pss,
crypto/openssl/crypto/rsa/rsa_ameth.c
211
if (!BIO_indent(bp, indent, 128))
crypto/openssl/crypto/rsa/rsa_ameth.c
215
if (BIO_puts(bp, "No PSS parameter restrictions\n") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
219
if (BIO_puts(bp, "PSS parameter restrictions:") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
223
if (BIO_puts(bp, "(INVALID PSS PARAMETERS)\n") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
227
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
231
if (!BIO_indent(bp, indent, 128))
crypto/openssl/crypto/rsa/rsa_ameth.c
233
if (BIO_puts(bp, "Hash Algorithm: ") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
237
if (i2a_ASN1_OBJECT(bp, pss->hashAlgorithm->algorithm) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
239
} else if (BIO_puts(bp, "sha1 (default)") <= 0) {
crypto/openssl/crypto/rsa/rsa_ameth.c
243
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
246
if (!BIO_indent(bp, indent, 128))
crypto/openssl/crypto/rsa/rsa_ameth.c
249
if (BIO_puts(bp, "Mask Algorithm: ") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
252
if (i2a_ASN1_OBJECT(bp, pss->maskGenAlgorithm->algorithm) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
254
if (BIO_puts(bp, " with ") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
258
if (i2a_ASN1_OBJECT(bp, maskHash->algorithm) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
260
} else if (BIO_puts(bp, "INVALID") <= 0) {
crypto/openssl/crypto/rsa/rsa_ameth.c
263
} else if (BIO_puts(bp, "mgf1 with sha1 (default)") <= 0) {
crypto/openssl/crypto/rsa/rsa_ameth.c
266
BIO_puts(bp, "\n");
crypto/openssl/crypto/rsa/rsa_ameth.c
268
if (!BIO_indent(bp, indent, 128))
crypto/openssl/crypto/rsa/rsa_ameth.c
270
if (BIO_printf(bp, "%s Salt Length: 0x", pss_key ? "Minimum" : "") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
273
if (i2a_ASN1_INTEGER(bp, pss->saltLength) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
275
} else if (BIO_puts(bp, "14 (default)") <= 0) {
crypto/openssl/crypto/rsa/rsa_ameth.c
278
BIO_puts(bp, "\n");
crypto/openssl/crypto/rsa/rsa_ameth.c
280
if (!BIO_indent(bp, indent, 128))
crypto/openssl/crypto/rsa/rsa_ameth.c
282
if (BIO_puts(bp, "Trailer Field: 0x") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
285
if (i2a_ASN1_INTEGER(bp, pss->trailerField) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
287
} else if (BIO_puts(bp, "01 (default)") <= 0) {
crypto/openssl/crypto/rsa/rsa_ameth.c
290
BIO_puts(bp, "\n");
crypto/openssl/crypto/rsa/rsa_ameth.c
299
static int pkey_rsa_print(BIO *bp, const EVP_PKEY *pkey, int off, int priv)
crypto/openssl/crypto/rsa/rsa_ameth.c
310
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/rsa/rsa_ameth.c
313
if (BIO_printf(bp, "%s ", pkey_is_pss(pkey) ? "RSA-PSS" : "RSA") <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
317
if (BIO_printf(bp, "Private-Key: (%d bit, %d primes)\n",
crypto/openssl/crypto/rsa/rsa_ameth.c
324
if (BIO_printf(bp, "Public-Key: (%d bit)\n", mod_len) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
329
if (!ASN1_bn_print(bp, str, x->n, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
331
if (!ASN1_bn_print(bp, s, x->e, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
336
if (!ASN1_bn_print(bp, "privateExponent:", x->d, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
338
if (!ASN1_bn_print(bp, "prime1:", x->p, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
340
if (!ASN1_bn_print(bp, "prime2:", x->q, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
342
if (!ASN1_bn_print(bp, "exponent1:", x->dmp1, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
344
if (!ASN1_bn_print(bp, "exponent2:", x->dmq1, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
346
if (!ASN1_bn_print(bp, "coefficient:", x->iqmp, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
356
if (!BIO_indent(bp, off, 128))
crypto/openssl/crypto/rsa/rsa_ameth.c
360
if (BIO_printf(bp, "prime%d:", i + 3) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
365
if (BIO_printf(bp, "exponent%d:", i + 3) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
370
if (BIO_printf(bp, "coefficient%d:", i + 3) <= 0)
crypto/openssl/crypto/rsa/rsa_ameth.c
377
if (!ASN1_bn_print(bp, "", bn, NULL, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
382
if (pkey_is_pss(pkey) && !rsa_pss_param_print(bp, 1, x->pss, off))
crypto/openssl/crypto/rsa/rsa_ameth.c
389
static int rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/rsa/rsa_ameth.c
392
return pkey_rsa_print(bp, pkey, indent, 0);
crypto/openssl/crypto/rsa/rsa_ameth.c
395
static int rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent,
crypto/openssl/crypto/rsa/rsa_ameth.c
398
return pkey_rsa_print(bp, pkey, indent, 1);
crypto/openssl/crypto/rsa/rsa_ameth.c
401
static int rsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
crypto/openssl/crypto/rsa/rsa_ameth.c
408
rv = rsa_pss_param_print(bp, 0, pss, indent);
crypto/openssl/crypto/rsa/rsa_ameth.c
412
} else if (BIO_puts(bp, "\n") <= 0) {
crypto/openssl/crypto/rsa/rsa_ameth.c
416
return X509_signature_dump(bp, sig, indent);
crypto/openssl/crypto/rsa/rsa_prn.c
38
int RSA_print(BIO *bp, const RSA *x, int off)
crypto/openssl/crypto/rsa/rsa_prn.c
47
ret = EVP_PKEY_print_private(bp, pk, off, NULL);
crypto/openssl/crypto/store/store_lib.c
1028
OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bp, const char *scheme,
crypto/openssl/crypto/store/store_lib.c
1047
loader_ctx = loader->attach(loader, bp, libctx, propq,
crypto/openssl/crypto/store/store_lib.c
1054
OSSL_CORE_BIO *cbio = ossl_core_bio_new_from_bio(bp);
crypto/openssl/crypto/store/store_local.h
162
OSSL_STORE_LOADER_CTX *ossl_store_file_attach_pem_bio_int(BIO *bp);
crypto/openssl/crypto/ts/ts_asn1.c
101
TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO **a)
crypto/openssl/crypto/ts/ts_asn1.c
103
return ASN1_d2i_bio_of(TS_TST_INFO, TS_TST_INFO_new, d2i_TS_TST_INFO, bp,
crypto/openssl/crypto/ts/ts_asn1.c
107
int i2d_TS_TST_INFO_bio(BIO *bp, const TS_TST_INFO *a)
crypto/openssl/crypto/ts/ts_asn1.c
109
return ASN1_i2d_bio_of(TS_TST_INFO, i2d_TS_TST_INFO, bp, a);
crypto/openssl/crypto/ts/ts_asn1.c
182
TS_RESP *d2i_TS_RESP_bio(BIO *bp, TS_RESP **a)
crypto/openssl/crypto/ts/ts_asn1.c
184
return ASN1_d2i_bio_of(TS_RESP, TS_RESP_new, d2i_TS_RESP, bp, a);
crypto/openssl/crypto/ts/ts_asn1.c
187
int i2d_TS_RESP_bio(BIO *bp, const TS_RESP *a)
crypto/openssl/crypto/ts/ts_asn1.c
189
return ASN1_i2d_bio_of(TS_RESP, i2d_TS_RESP, bp, a);
crypto/openssl/crypto/ts/ts_asn1.c
22
TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT **a)
crypto/openssl/crypto/ts/ts_asn1.c
25
d2i_TS_MSG_IMPRINT, bp, a);
crypto/openssl/crypto/ts/ts_asn1.c
28
int i2d_TS_MSG_IMPRINT_bio(BIO *bp, const TS_MSG_IMPRINT *a)
crypto/openssl/crypto/ts/ts_asn1.c
30
return ASN1_i2d_bio_of(TS_MSG_IMPRINT, i2d_TS_MSG_IMPRINT, bp, a);
crypto/openssl/crypto/ts/ts_asn1.c
56
TS_REQ *d2i_TS_REQ_bio(BIO *bp, TS_REQ **a)
crypto/openssl/crypto/ts/ts_asn1.c
58
return ASN1_d2i_bio_of(TS_REQ, TS_REQ_new, d2i_TS_REQ, bp, a);
crypto/openssl/crypto/ts/ts_asn1.c
61
int i2d_TS_REQ_bio(BIO *bp, const TS_REQ *a)
crypto/openssl/crypto/ts/ts_asn1.c
63
return ASN1_i2d_bio_of(TS_REQ, i2d_TS_REQ, bp, a);
crypto/openssl/crypto/x509/t_acert.c
105
if (BIO_printf(bp, "%8sVersion: %ld (0x%lx)\n", "", l + 1,
crypto/openssl/crypto/x509/t_acert.c
110
if (BIO_printf(bp, "%8sVersion: Unknown (%ld)\n", "", l) <= 0)
crypto/openssl/crypto/x509/t_acert.c
120
if (BIO_printf(bp, "%8sSerial Number: ", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
123
if (i2a_ASN1_INTEGER(bp, serial) <= 0)
crypto/openssl/crypto/x509/t_acert.c
126
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_acert.c
135
if (BIO_printf(bp, "%8sHolder:\n", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
145
if (BIO_printf(bp, "%12sName:%c", "", mlch) <= 0)
crypto/openssl/crypto/x509/t_acert.c
147
if (GENERAL_NAME_print(bp, entity) <= 0)
crypto/openssl/crypto/x509/t_acert.c
149
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_acert.c
161
if (BIO_printf(bp, "%12sIssuer:%c", "", mlch) <= 0)
crypto/openssl/crypto/x509/t_acert.c
164
if (X509_NAME_print_ex(bp, holderIssuer, 0, nmflags) <= 0)
crypto/openssl/crypto/x509/t_acert.c
167
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_acert.c
17
static int print_attribute(BIO *bp, X509_ATTRIBUTE *a)
crypto/openssl/crypto/x509/t_acert.c
170
if (BIO_printf(bp, "%12sSerial: ", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
175
if (i2a_ASN1_INTEGER(bp, holder_serial) <= 0)
crypto/openssl/crypto/x509/t_acert.c
180
if (BIO_printf(bp, "%12sIssuer UID: ", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
182
if (X509_signature_dump(bp, iuid, 24) <= 0)
crypto/openssl/crypto/x509/t_acert.c
185
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_acert.c
193
if (BIO_printf(bp, "%8sIssuer:%c", "", mlch) <= 0)
crypto/openssl/crypto/x509/t_acert.c
197
if (X509_NAME_print_ex(bp, issuer, 0, nmflags) < 0)
crypto/openssl/crypto/x509/t_acert.c
200
if (BIO_printf(bp, "Unsupported Issuer Type") <= 0)
crypto/openssl/crypto/x509/t_acert.c
203
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_acert.c
208
if (BIO_printf(bp, "%8sValidity\n", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
210
if (BIO_printf(bp, "%12sNot Before: ", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
212
if (ASN1_GENERALIZEDTIME_print(bp, X509_ACERT_get0_notBefore(x)) == 0)
crypto/openssl/crypto/x509/t_acert.c
214
if (BIO_printf(bp, "\n%12sNot After : ", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
216
if (ASN1_GENERALIZEDTIME_print(bp, X509_ACERT_get0_notAfter(x)) == 0)
crypto/openssl/crypto/x509/t_acert.c
218
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_acert.c
223
if (BIO_printf(bp, "%8sAttributes:\n", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
227
if (BIO_printf(bp, "%12s(none)\n", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
231
if (print_attribute(bp, X509_ACERT_get_attr(x, i)) == 0)
crypto/openssl/crypto/x509/t_acert.c
24
if (BIO_printf(bp, "%12s", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
242
if (BIO_printf(bp, "%8sExtensions:\n", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
250
if (BIO_printf(bp, "%12s", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
253
if (i2a_ASN1_OBJECT(bp, obj) <= 0)
crypto/openssl/crypto/x509/t_acert.c
256
if (BIO_printf(bp, ": %s\n", critical ? "critical" : "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
258
if (X509V3_EXT_print(bp, ex, cflag, 20) <= 0) {
crypto/openssl/crypto/x509/t_acert.c
259
if (BIO_printf(bp, "%16s", "") <= 0)
crypto/openssl/crypto/x509/t_acert.c
261
if (ASN1_STRING_print(bp, X509_EXTENSION_get_data(ex)) <= 0)
crypto/openssl/crypto/x509/t_acert.c
264
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_acert.c
27
if ((j = i2a_ASN1_OBJECT(bp, aobj)) <= 0)
crypto/openssl/crypto/x509/t_acert.c
275
if (X509_signature_print(bp, sig_alg, sig) <= 0)
crypto/openssl/crypto/x509/t_acert.c
286
int X509_ACERT_print(BIO *bp, X509_ACERT *x)
crypto/openssl/crypto/x509/t_acert.c
288
return X509_ACERT_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
crypto/openssl/crypto/x509/t_acert.c
36
if (j < 25 && (BIO_printf(bp, "%*s", 25 - j, " ") <= 0))
crypto/openssl/crypto/x509/t_acert.c
39
if (BIO_puts(bp, ":") <= 0)
crypto/openssl/crypto/x509/t_acert.c
57
if (BIO_write(bp, (char *)bs->data, bs->length) != bs->length)
crypto/openssl/crypto/x509/t_acert.c
59
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/x509/t_acert.c
63
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/x509/t_acert.c
65
if (ASN1_parse_dump(bp, at->value.sequence->data,
crypto/openssl/crypto/x509/t_acert.c
71
if (BIO_printf(bp, "unable to print attribute of type 0x%X\n",
crypto/openssl/crypto/x509/t_acert.c
83
int X509_ACERT_print_ex(BIO *bp, X509_ACERT *x, unsigned long nmflags,
crypto/openssl/crypto/x509/t_acert.c
94
if (BIO_printf(bp, "Attribute Certificate:\n") <= 0)
crypto/openssl/crypto/x509/t_acert.c
96
if (BIO_printf(bp, "%4sData:\n", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
101
if (EVP_PKEY_print_public(bp, pkey, 16, NULL) <= 0)
crypto/openssl/crypto/x509/t_req.c
108
if (BIO_printf(bp, "%8sAttributes:\n", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
112
if (BIO_printf(bp, "%12s(none)\n", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
126
if (BIO_printf(bp, "%12s", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
128
if ((j = i2a_ASN1_OBJECT(bp, aobj)) > 0) {
crypto/openssl/crypto/x509/t_req.c
141
if (BIO_write(bp, " ", 1) != 1)
crypto/openssl/crypto/x509/t_req.c
143
if (BIO_puts(bp, ":") <= 0)
crypto/openssl/crypto/x509/t_req.c
151
if (BIO_write(bp, (char *)bs->data, bs->length)
crypto/openssl/crypto/x509/t_req.c
154
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/x509/t_req.c
158
if (BIO_puts(bp, "unable to print attribute\n") <= 0)
crypto/openssl/crypto/x509/t_req.c
170
if (BIO_printf(bp, "%12sRequested Extensions:\n", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
177
if (BIO_printf(bp, "%16s", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
180
if (i2a_ASN1_OBJECT(bp, obj) <= 0)
crypto/openssl/crypto/x509/t_req.c
183
if (BIO_printf(bp, ": %s\n", critical ? "critical" : "") <= 0)
crypto/openssl/crypto/x509/t_req.c
185
if (!X509V3_EXT_print(bp, ex, cflag, 20)) {
crypto/openssl/crypto/x509/t_req.c
186
if (BIO_printf(bp, "%20s", "") <= 0
crypto/openssl/crypto/x509/t_req.c
187
|| ASN1_STRING_print(bp,
crypto/openssl/crypto/x509/t_req.c
192
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_req.c
204
if (!X509_signature_print(bp, sig_alg, sig))
crypto/openssl/crypto/x509/t_req.c
215
int X509_REQ_print(BIO *bp, X509_REQ *x)
crypto/openssl/crypto/x509/t_req.c
217
return X509_REQ_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
crypto/openssl/crypto/x509/t_req.c
37
int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
crypto/openssl/crypto/x509/t_req.c
56
if (BIO_write(bp, "Certificate Request:\n", 21) <= 0)
crypto/openssl/crypto/x509/t_req.c
58
if (BIO_write(bp, " Data:\n", 10) <= 0)
crypto/openssl/crypto/x509/t_req.c
64
if (BIO_printf(bp, "%8sVersion: %ld (0x%lx)\n", "", l + 1, (unsigned long)l) <= 0)
crypto/openssl/crypto/x509/t_req.c
67
if (BIO_printf(bp, "%8sVersion: Unknown (%ld)\n", "", l) <= 0)
crypto/openssl/crypto/x509/t_req.c
72
if (BIO_printf(bp, " Subject:%c", mlch) <= 0)
crypto/openssl/crypto/x509/t_req.c
74
if (X509_NAME_print_ex(bp, X509_REQ_get_subject_name(x),
crypto/openssl/crypto/x509/t_req.c
78
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_req.c
84
if (BIO_write(bp, " Subject Public Key Info:\n", 33) <= 0)
crypto/openssl/crypto/x509/t_req.c
86
if (BIO_printf(bp, "%12sPublic Key Algorithm: ", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
90
if (i2a_ASN1_OBJECT(bp, koid) <= 0)
crypto/openssl/crypto/x509/t_req.c
92
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/x509/t_req.c
97
if (BIO_printf(bp, "%12sUnable to load Public Key\n", "") <= 0)
crypto/openssl/crypto/x509/t_req.c
99
ERR_print_errors(bp);
crypto/openssl/crypto/x509/t_x509.c
100
if (BIO_puts(bp, " ") <= 0)
crypto/openssl/crypto/x509/t_x509.c
102
if (X509_signature_print(bp, tsig_alg, NULL) <= 0)
crypto/openssl/crypto/x509/t_x509.c
107
if (BIO_printf(bp, " Issuer:%c", mlch) <= 0)
crypto/openssl/crypto/x509/t_x509.c
109
if (X509_NAME_print_ex(bp, X509_get_issuer_name(x), nmindent, nmflags)
crypto/openssl/crypto/x509/t_x509.c
112
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_x509.c
116
if (BIO_write(bp, " Validity\n", 17) <= 0)
crypto/openssl/crypto/x509/t_x509.c
118
if (BIO_write(bp, " Not Before: ", 24) <= 0)
crypto/openssl/crypto/x509/t_x509.c
120
if (ossl_asn1_time_print_ex(bp, X509_get0_notBefore(x), ASN1_DTFLGS_RFC822) == 0)
crypto/openssl/crypto/x509/t_x509.c
122
if (BIO_write(bp, "\n Not After : ", 25) <= 0)
crypto/openssl/crypto/x509/t_x509.c
124
if (ossl_asn1_time_print_ex(bp, X509_get0_notAfter(x), ASN1_DTFLGS_RFC822) == 0)
crypto/openssl/crypto/x509/t_x509.c
126
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_x509.c
130
if (BIO_printf(bp, " Subject:%c", mlch) <= 0)
crypto/openssl/crypto/x509/t_x509.c
132
if (X509_NAME_print_ex(bp, X509_get_subject_name(x), nmindent, nmflags) < printok)
crypto/openssl/crypto/x509/t_x509.c
134
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_x509.c
141
if (BIO_write(bp, " Subject Public Key Info:\n", 33) <= 0)
crypto/openssl/crypto/x509/t_x509.c
143
if (BIO_printf(bp, "%12sPublic Key Algorithm: ", "") <= 0)
crypto/openssl/crypto/x509/t_x509.c
145
if (i2a_ASN1_OBJECT(bp, xpoid) <= 0)
crypto/openssl/crypto/x509/t_x509.c
147
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/x509/t_x509.c
152
BIO_printf(bp, "%12sUnable to load Public Key\n", "");
crypto/openssl/crypto/x509/t_x509.c
153
ERR_print_errors(bp);
crypto/openssl/crypto/x509/t_x509.c
155
EVP_PKEY_print_public(bp, pkey, 16, NULL);
crypto/openssl/crypto/x509/t_x509.c
163
if (BIO_printf(bp, "%8sIssuer Unique ID: ", "") <= 0)
crypto/openssl/crypto/x509/t_x509.c
165
if (!X509_signature_dump(bp, iuid, 12))
crypto/openssl/crypto/x509/t_x509.c
169
if (BIO_printf(bp, "%8sSubject Unique ID: ", "") <= 0)
crypto/openssl/crypto/x509/t_x509.c
171
if (!X509_signature_dump(bp, suid, 12))
crypto/openssl/crypto/x509/t_x509.c
177
&& !X509V3_extensions_print(bp, "X509v3 extensions",
crypto/openssl/crypto/x509/t_x509.c
185
if (X509_signature_print(bp, sig_alg, sig) <= 0)
crypto/openssl/crypto/x509/t_x509.c
189
if (!X509_aux_print(bp, x, 0))
crypto/openssl/crypto/x509/t_x509.c
197
int X509_ocspid_print(BIO *bp, X509 *x)
crypto/openssl/crypto/x509/t_x509.c
208
if (x == NULL || bp == NULL)
crypto/openssl/crypto/x509/t_x509.c
213
if (BIO_printf(bp, " Subject OCSP hash: ") <= 0)
crypto/openssl/crypto/x509/t_x509.c
230
if (BIO_printf(bp, "%02X", SHA1md[i]) <= 0)
crypto/openssl/crypto/x509/t_x509.c
239
if (BIO_printf(bp, "\n Public key OCSP hash: ") <= 0)
crypto/openssl/crypto/x509/t_x509.c
251
if (BIO_printf(bp, "%02X", SHA1md[i]) <= 0)
crypto/openssl/crypto/x509/t_x509.c
254
BIO_printf(bp, "\n");
crypto/openssl/crypto/x509/t_x509.c
264
int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent)
crypto/openssl/crypto/x509/t_x509.c
273
if (i > 0 && BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/t_x509.c
275
if (BIO_indent(bp, indent, indent) <= 0)
crypto/openssl/crypto/x509/t_x509.c
278
if (BIO_printf(bp, "%02x%s", s[i], ((i + 1) == n) ? "" : ":") <= 0)
crypto/openssl/crypto/x509/t_x509.c
281
if (BIO_write(bp, "\n", 1) != 1)
crypto/openssl/crypto/x509/t_x509.c
287
int X509_signature_print(BIO *bp, const X509_ALGOR *sigalg,
crypto/openssl/crypto/x509/t_x509.c
292
if (BIO_printf(bp, "%*sSignature Algorithm: ", indent, "") <= 0)
crypto/openssl/crypto/x509/t_x509.c
294
if (i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0)
crypto/openssl/crypto/x509/t_x509.c
297
if (sig && BIO_printf(bp, "\n%*sSignature Value:", indent, "") <= 0)
crypto/openssl/crypto/x509/t_x509.c
306
return ameth->sig_print(bp, sigalg, sig, indent + 4, 0);
crypto/openssl/crypto/x509/t_x509.c
309
if (BIO_write(bp, "\n", 1) != 1)
crypto/openssl/crypto/x509/t_x509.c
312
return X509_signature_dump(bp, sig, indent + 4);
crypto/openssl/crypto/x509/t_x509.c
48
int X509_print(BIO *bp, X509 *x)
crypto/openssl/crypto/x509/t_x509.c
50
return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
crypto/openssl/crypto/x509/t_x509.c
53
int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
crypto/openssl/crypto/x509/t_x509.c
71
if (BIO_write(bp, "Certificate:\n", 13) <= 0)
crypto/openssl/crypto/x509/t_x509.c
73
if (BIO_write(bp, " Data:\n", 10) <= 0)
crypto/openssl/crypto/x509/t_x509.c
79
if (BIO_printf(bp, "%8sVersion: %ld (0x%lx)\n", "", l + 1, (unsigned long)l) <= 0)
crypto/openssl/crypto/x509/t_x509.c
82
if (BIO_printf(bp, "%8sVersion: Unknown (%ld)\n", "", l) <= 0)
crypto/openssl/crypto/x509/t_x509.c
89
if (BIO_write(bp, " Serial Number:", 22) <= 0)
crypto/openssl/crypto/x509/t_x509.c
91
if (ossl_serial_number_print(bp, bs, 12) != 0)
crypto/openssl/crypto/x509/t_x509.c
93
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
101
if (BIO_printf(bp, "%*s namingAuthorityText: ", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
102
|| ASN1_STRING_print(bp, namingAuthority->namingAuthorityText) <= 0
crypto/openssl/crypto/x509/v3_admis.c
103
|| BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
107
if (BIO_printf(bp, "%*s namingAuthorityUrl: ", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
108
|| ASN1_STRING_print(bp, namingAuthority->namingAuthorityUrl) <= 0
crypto/openssl/crypto/x509/v3_admis.c
109
|| BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
119
BIO *bp, int ind)
crypto/openssl/crypto/x509/v3_admis.c
125
if (BIO_printf(bp, "%*sadmissionAuthority:\n", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
126
|| BIO_printf(bp, "%*s ", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
127
|| GENERAL_NAME_print(bp, admission->admissionAuthority) <= 0
crypto/openssl/crypto/x509/v3_admis.c
128
|| BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
135
if (BIO_printf(bp, "%*sEntry %0d:\n", ind, "", 1 + i) <= 0)
crypto/openssl/crypto/x509/v3_admis.c
139
if (BIO_printf(bp, "%*s admissionAuthority:\n", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
140
|| BIO_printf(bp, "%*s ", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
141
|| GENERAL_NAME_print(bp, entry->admissionAuthority) <= 0
crypto/openssl/crypto/x509/v3_admis.c
142
|| BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
147
if (i2r_NAMING_AUTHORITY(method, entry->namingAuthority, bp, ind + 2) <= 0)
crypto/openssl/crypto/x509/v3_admis.c
154
if (BIO_printf(bp, "%*s Profession Info Entry %0d:\n", ind, "", 1 + j) <= 0)
crypto/openssl/crypto/x509/v3_admis.c
158
if (BIO_printf(bp, "%*s registrationNumber: ", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
159
|| ASN1_STRING_print(bp, pinfo->registrationNumber) <= 0
crypto/openssl/crypto/x509/v3_admis.c
160
|| BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
165
if (i2r_NAMING_AUTHORITY(method, pinfo->namingAuthority, bp, ind + 4) <= 0)
crypto/openssl/crypto/x509/v3_admis.c
171
if (BIO_printf(bp, "%*s Info Entries:\n", ind, "") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
176
if (BIO_printf(bp, "%*s ", ind, "") <= 0
crypto/openssl/crypto/x509/v3_admis.c
177
|| ASN1_STRING_print(bp, val) <= 0
crypto/openssl/crypto/x509/v3_admis.c
178
|| BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
184
if (BIO_printf(bp, "%*s Profession OIDs:\n", ind, "") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
192
if (BIO_printf(bp, "%*s %s%s%s%s\n", ind, "",
crypto/openssl/crypto/x509/v3_admis.c
54
BIO *bp, int ind);
crypto/openssl/crypto/x509/v3_admis.c
71
BIO *bp, int ind)
crypto/openssl/crypto/x509/v3_admis.c
83
if (BIO_printf(bp, "%*snamingAuthority:\n", ind, "") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
90
if (BIO_printf(bp, "%*s namingAuthorityId: ", ind, "") <= 0)
crypto/openssl/crypto/x509/v3_admis.c
95
if (BIO_printf(bp, "%s%s%s%s\n", ln ? ln : "",
crypto/openssl/crypto/x509/v3_crld.c
506
BIO *bp, int ind)
crypto/openssl/crypto/x509/v3_crld.c
508
if (BIO_printf(bp, "%*s", ind, "") <= 0)
crypto/openssl/crypto/x509/v3_crld.c
510
if (!ASN1_GENERALIZEDTIME_print(bp, date))
crypto/openssl/crypto/x509/v3_crld.c
515
static int i2r_object(const X509V3_EXT_METHOD *method, void *oid, BIO *bp,
crypto/openssl/crypto/x509/v3_crld.c
518
if (BIO_printf(bp, "%*s", ind, "") <= 0)
crypto/openssl/crypto/x509/v3_crld.c
520
if (i2a_ASN1_OBJECT(bp, oid) <= 0)
crypto/openssl/crypto/x509/v3_info.c
150
int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a)
crypto/openssl/crypto/x509/v3_info.c
152
i2a_ASN1_OBJECT(bp, a->method);
crypto/openssl/crypto/x509/v3_ncons.c
203
BIO *bp, int ind)
crypto/openssl/crypto/x509/v3_ncons.c
207
bp, ind, "Permitted");
crypto/openssl/crypto/x509/v3_ncons.c
209
BIO_puts(bp, "\n");
crypto/openssl/crypto/x509/v3_ncons.c
211
bp, ind, "Excluded");
crypto/openssl/crypto/x509/v3_ncons.c
217
BIO *bp, int ind, const char *name)
crypto/openssl/crypto/x509/v3_ncons.c
222
BIO_printf(bp, "%*s%s:\n", ind, "", name);
crypto/openssl/crypto/x509/v3_ncons.c
225
BIO_puts(bp, "\n");
crypto/openssl/crypto/x509/v3_ncons.c
227
BIO_printf(bp, "%*s", ind + 2, "");
crypto/openssl/crypto/x509/v3_ncons.c
229
print_nc_ipadd(bp, tree->base->d.ip);
crypto/openssl/crypto/x509/v3_ncons.c
231
GENERAL_NAME_print(bp, tree->base);
crypto/openssl/crypto/x509/v3_ncons.c
236
static int print_nc_ipadd(BIO *bp, ASN1_OCTET_STRING *ip)
crypto/openssl/crypto/x509/v3_ncons.c
245
&& BIO_printf(bp, "IP:%s/%s", ip1, ip2) > 0;
crypto/openssl/crypto/x509/v3_ncons.c
31
BIO *bp, int ind);
crypto/openssl/crypto/x509/v3_ncons.c
33
STACK_OF(GENERAL_SUBTREE) *trees, BIO *bp,
crypto/openssl/crypto/x509/v3_ncons.c
35
static int print_nc_ipadd(BIO *bp, ASN1_OCTET_STRING *ip);
crypto/openssl/crypto/x509/v3_prn.c
138
int X509V3_extensions_print(BIO *bp, const char *title,
crypto/openssl/crypto/x509/v3_prn.c
148
BIO_printf(bp, "%*s%s:\n", indent, "", title);
crypto/openssl/crypto/x509/v3_prn.c
162
if (indent && BIO_printf(bp, "%*s", indent, "") <= 0)
crypto/openssl/crypto/x509/v3_prn.c
164
i2a_ASN1_OBJECT(bp, obj);
crypto/openssl/crypto/x509/v3_prn.c
166
if (BIO_printf(bp, ": %s\n", j ? "critical" : "") <= 0)
crypto/openssl/crypto/x509/v3_prn.c
168
if (!X509V3_EXT_print(bp, ex, flag, indent + 4)) {
crypto/openssl/crypto/x509/v3_prn.c
169
BIO_printf(bp, "%*s", indent + 4, "");
crypto/openssl/crypto/x509/v3_prn.c
170
ASN1_STRING_print(bp, X509_EXTENSION_get_data(ex));
crypto/openssl/crypto/x509/v3_prn.c
172
if (BIO_write(bp, "\n", 1) <= 0)
crypto/openssl/crypto/x509/x_all.c
227
X509 *d2i_X509_bio(BIO *bp, X509 **x509)
crypto/openssl/crypto/x509/x_all.c
229
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509), bp, x509);
crypto/openssl/crypto/x509/x_all.c
232
int i2d_X509_bio(BIO *bp, const X509 *x509)
crypto/openssl/crypto/x509/x_all.c
234
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509), bp, x509);
crypto/openssl/crypto/x509/x_all.c
249
X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl)
crypto/openssl/crypto/x509/x_all.c
251
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_CRL), bp, crl);
crypto/openssl/crypto/x509/x_all.c
254
int i2d_X509_CRL_bio(BIO *bp, const X509_CRL *crl)
crypto/openssl/crypto/x509/x_all.c
256
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509_CRL), bp, crl);
crypto/openssl/crypto/x509/x_all.c
283
PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
crypto/openssl/crypto/x509/x_all.c
294
ret = ASN1_item_d2i_bio_ex(ASN1_ITEM_rptr(PKCS7), bp, p7, libctx, propq);
crypto/openssl/crypto/x509/x_all.c
300
int i2d_PKCS7_bio(BIO *bp, const PKCS7 *p7)
crypto/openssl/crypto/x509/x_all.c
302
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(PKCS7), bp, p7);
crypto/openssl/crypto/x509/x_all.c
317
X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req)
crypto/openssl/crypto/x509/x_all.c
327
return ASN1_item_d2i_bio_ex(ASN1_ITEM_rptr(X509_REQ), bp, req, libctx, propq);
crypto/openssl/crypto/x509/x_all.c
330
int i2d_X509_REQ_bio(BIO *bp, const X509_REQ *req)
crypto/openssl/crypto/x509/x_all.c
332
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509_REQ), bp, req);
crypto/openssl/crypto/x509/x_all.c
370
RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
crypto/openssl/crypto/x509/x_all.c
372
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa);
crypto/openssl/crypto/x509/x_all.c
375
int i2d_RSAPrivateKey_bio(BIO *bp, const RSA *rsa)
crypto/openssl/crypto/x509/x_all.c
377
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa);
crypto/openssl/crypto/x509/x_all.c
380
RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa)
crypto/openssl/crypto/x509/x_all.c
382
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPublicKey), bp, rsa);
crypto/openssl/crypto/x509/x_all.c
385
RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa)
crypto/openssl/crypto/x509/x_all.c
387
return ASN1_d2i_bio_of(RSA, RSA_new, d2i_RSA_PUBKEY, bp, rsa);
crypto/openssl/crypto/x509/x_all.c
390
int i2d_RSAPublicKey_bio(BIO *bp, const RSA *rsa)
crypto/openssl/crypto/x509/x_all.c
392
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(RSAPublicKey), bp, rsa);
crypto/openssl/crypto/x509/x_all.c
395
int i2d_RSA_PUBKEY_bio(BIO *bp, const RSA *rsa)
crypto/openssl/crypto/x509/x_all.c
397
return ASN1_i2d_bio_of(RSA, i2d_RSA_PUBKEY, bp, rsa);
crypto/openssl/crypto/x509/x_all.c
423
DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa)
crypto/openssl/crypto/x509/x_all.c
425
return ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSAPrivateKey, bp, dsa);
crypto/openssl/crypto/x509/x_all.c
428
int i2d_DSAPrivateKey_bio(BIO *bp, const DSA *dsa)
crypto/openssl/crypto/x509/x_all.c
430
return ASN1_i2d_bio_of(DSA, i2d_DSAPrivateKey, bp, dsa);
crypto/openssl/crypto/x509/x_all.c
433
DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa)
crypto/openssl/crypto/x509/x_all.c
435
return ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSA_PUBKEY, bp, dsa);
crypto/openssl/crypto/x509/x_all.c
438
int i2d_DSA_PUBKEY_bio(BIO *bp, const DSA *dsa)
crypto/openssl/crypto/x509/x_all.c
440
return ASN1_i2d_bio_of(DSA, i2d_DSA_PUBKEY, bp, dsa);
crypto/openssl/crypto/x509/x_all.c
467
EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey)
crypto/openssl/crypto/x509/x_all.c
469
return ASN1_d2i_bio_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, bp, eckey);
crypto/openssl/crypto/x509/x_all.c
472
int i2d_EC_PUBKEY_bio(BIO *bp, const EC_KEY *ecdsa)
crypto/openssl/crypto/x509/x_all.c
474
return ASN1_i2d_bio_of(EC_KEY, i2d_EC_PUBKEY, bp, ecdsa);
crypto/openssl/crypto/x509/x_all.c
477
EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey)
crypto/openssl/crypto/x509/x_all.c
479
return ASN1_d2i_bio_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, bp, eckey);
crypto/openssl/crypto/x509/x_all.c
482
int i2d_ECPrivateKey_bio(BIO *bp, const EC_KEY *eckey)
crypto/openssl/crypto/x509/x_all.c
484
return ASN1_i2d_bio_of(EC_KEY, i2d_ECPrivateKey, bp, eckey);
crypto/openssl/crypto/x509/x_all.c
662
X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8)
crypto/openssl/crypto/x509/x_all.c
664
return ASN1_d2i_bio_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, bp, p8);
crypto/openssl/crypto/x509/x_all.c
667
int i2d_PKCS8_bio(BIO *bp, const X509_SIG *p8)
crypto/openssl/crypto/x509/x_all.c
669
return ASN1_i2d_bio_of(X509_SIG, i2d_X509_SIG, bp, p8);
crypto/openssl/crypto/x509/x_all.c
685
X509_PUBKEY *d2i_X509_PUBKEY_bio(BIO *bp, X509_PUBKEY **xpk)
crypto/openssl/crypto/x509/x_all.c
688
bp, xpk);
crypto/openssl/crypto/x509/x_all.c
691
int i2d_X509_PUBKEY_bio(BIO *bp, const X509_PUBKEY *xpk)
crypto/openssl/crypto/x509/x_all.c
693
return ASN1_i2d_bio_of(X509_PUBKEY, i2d_X509_PUBKEY, bp, xpk);
crypto/openssl/crypto/x509/x_all.c
777
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
crypto/openssl/crypto/x509/x_all.c
781
d2i_PKCS8_PRIV_KEY_INFO, bp, p8inf);
crypto/openssl/crypto/x509/x_all.c
784
int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, const PKCS8_PRIV_KEY_INFO *p8inf)
crypto/openssl/crypto/x509/x_all.c
786
return ASN1_i2d_bio_of(PKCS8_PRIV_KEY_INFO, i2d_PKCS8_PRIV_KEY_INFO, bp,
crypto/openssl/crypto/x509/x_all.c
790
int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, const EVP_PKEY *key)
crypto/openssl/crypto/x509/x_all.c
798
ret = i2d_PKCS8_PRIV_KEY_INFO_bio(bp, p8inf);
crypto/openssl/crypto/x509/x_all.c
803
int i2d_PrivateKey_bio(BIO *bp, const EVP_PKEY *pkey)
crypto/openssl/crypto/x509/x_all.c
805
return ASN1_i2d_bio_of(EVP_PKEY, i2d_PrivateKey, bp, pkey);
crypto/openssl/crypto/x509/x_all.c
808
EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a)
crypto/openssl/crypto/x509/x_all.c
810
return ASN1_d2i_bio_of(EVP_PKEY, EVP_PKEY_new, d2i_AutoPrivateKey, bp, a);
crypto/openssl/crypto/x509/x_all.c
813
EVP_PKEY *d2i_PrivateKey_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/crypto/x509/x_all.c
821
len = asn1_d2i_read_bio(bp, &b);
crypto/openssl/crypto/x509/x_all.c
832
int i2d_PUBKEY_bio(BIO *bp, const EVP_PKEY *pkey)
crypto/openssl/crypto/x509/x_all.c
834
return ASN1_i2d_bio_of(EVP_PKEY, i2d_PUBKEY, bp, pkey);
crypto/openssl/crypto/x509/x_all.c
837
EVP_PKEY *d2i_PUBKEY_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/crypto/x509/x_all.c
845
len = asn1_d2i_read_bio(bp, &b);
crypto/openssl/crypto/x509/x_all.c
856
EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a)
crypto/openssl/crypto/x509/x_all.c
858
return ASN1_d2i_bio_of(EVP_PKEY, EVP_PKEY_new, d2i_PUBKEY, bp, a);
crypto/openssl/crypto/x509/x_all.c
873
X509_ACERT *d2i_X509_ACERT_bio(BIO *bp, X509_ACERT **acert)
crypto/openssl/crypto/x509/x_all.c
875
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_ACERT), bp, acert);
crypto/openssl/crypto/x509/x_all.c
878
int i2d_X509_ACERT_bio(BIO *bp, const X509_ACERT *acert)
crypto/openssl/crypto/x509/x_all.c
880
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509_ACERT), bp, acert);
crypto/openssl/crypto/x509/x_ietfatt.c
193
int OSSL_IETF_ATTR_SYNTAX_print(BIO *bp, OSSL_IETF_ATTR_SYNTAX *a, int indent)
crypto/openssl/crypto/x509/x_ietfatt.c
199
if (BIO_printf(bp, "%*s", indent, "") <= 0)
crypto/openssl/crypto/x509/x_ietfatt.c
202
if (GENERAL_NAME_print(bp, sk_GENERAL_NAME_value(a->policyAuthority, i)) <= 0)
crypto/openssl/crypto/x509/x_ietfatt.c
205
if (BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/x_ietfatt.c
218
if (BIO_printf(bp, "%*s", indent, "") <= 0)
crypto/openssl/crypto/x509/x_ietfatt.c
224
BIO_printf(bp, "%.*s", (int)sizeof(oidstr), oidstr);
crypto/openssl/crypto/x509/x_ietfatt.c
228
ASN1_STRING_print(bp, attr_value);
crypto/openssl/crypto/x509/x_ietfatt.c
232
if (BIO_printf(bp, "\n") <= 0)
crypto/openssl/crypto/x509/x_name.c
502
int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
crypto/openssl/crypto/x509/x_name.c
520
if (BIO_write(bp, c, i) != i)
crypto/openssl/crypto/x509/x_name.c
524
if (BIO_write(bp, ", ", 2) != 2)
crypto/openssl/engines/e_loader_attic.c
1068
static OSSL_STORE_LOADER_CTX *file_attach(const OSSL_STORE_LOADER *loader, BIO *bp,
crypto/openssl/engines/e_loader_attic.c
1081
ctx->_.file.file = bp;
crypto/openssl/engines/e_loader_attic.c
1288
static int file_read_pem(BIO *bp, char **pem_name, char **pem_header,
crypto/openssl/engines/e_loader_attic.c
1294
? PEM_read_bio_ex(bp, pem_name, pem_header, data, len,
crypto/openssl/engines/e_loader_attic.c
1296
: PEM_read_bio(bp, pem_name, pem_header, data, len);
crypto/openssl/engines/e_loader_attic.c
1322
static OSSL_STORE_INFO *file_try_read_msblob(BIO *bp, int *matchcount)
crypto/openssl/engines/e_loader_attic.c
1335
if (BIO_buffer_peek(bp, peekbuf, sizeof(peekbuf)) <= 0)
crypto/openssl/engines/e_loader_attic.c
1347
? b2i_PublicKey_bio(bp)
crypto/openssl/engines/e_loader_attic.c
1348
: b2i_PrivateKey_bio(bp);
crypto/openssl/engines/e_loader_attic.c
1360
static OSSL_STORE_INFO *file_try_read_PVK(BIO *bp, const UI_METHOD *ui_method,
crypto/openssl/engines/e_loader_attic.c
1374
if (BIO_buffer_peek(bp, peekbuf, sizeof(peekbuf)) <= 0)
crypto/openssl/engines/e_loader_attic.c
1388
|| (tmp = b2i_PVK_bio(bp, file_get_pem_pass, &pass_data)) == NULL
crypto/openssl/engines/e_loader_attic.c
1398
static int file_read_asn1(BIO *bp, unsigned char **data, long *len)
crypto/openssl/engines/e_loader_attic.c
1402
if (asn1_d2i_read_bio(bp, &mem) < 0)
crypto/openssl/include/crypto/asn1.h
143
int ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
crypto/openssl/include/internal/ffc.h
153
int ossl_ffc_params_print(BIO *bp, const FFC_PARAMS *ffc, int indent);
crypto/openssl/include/openssl/asn1.h
851
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
crypto/openssl/include/openssl/asn1.h
852
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
crypto/openssl/include/openssl/asn1.h
853
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
crypto/openssl/include/openssl/asn1.h
854
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
crypto/openssl/include/openssl/asn1.h
855
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
crypto/openssl/include/openssl/asn1.h
856
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
crypto/openssl/include/openssl/asn1.h
857
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
crypto/openssl/include/openssl/asn1.h
970
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
crypto/openssl/include/openssl/asn1.h
971
int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
crypto/openssl/include/openssl/asn1.h
972
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
crypto/openssl/include/openssl/asn1.h
974
int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
crypto/openssl/include/openssl/asn1.h
975
int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
crypto/openssl/include/openssl/asn1.h
977
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
crypto/openssl/include/openssl/asn1.h
978
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
crypto/openssl/include/openssl/bio.h
747
int BIO_gets(BIO *bp, char *buf, int size);
crypto/openssl/include/openssl/bio.h
756
int BIO_puts(BIO *bp, const char *buf);
crypto/openssl/include/openssl/bio.h
758
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
crypto/openssl/include/openssl/bio.h
760
void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
crypto/openssl/include/openssl/bio.h
761
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
crypto/openssl/include/openssl/cms.h
218
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
crypto/openssl/include/openssl/cms.h
219
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
crypto/openssl/include/openssl/conf.h
125
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
crypto/openssl/include/openssl/conf.h
166
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
crypto/openssl/include/openssl/conftypes.h
27
int (*load_bio)(CONF *conf, BIO *bp, long *eline);
crypto/openssl/include/openssl/conftypes.h
28
int (*dump)(const CONF *conf, BIO *bp);
crypto/openssl/include/openssl/dh.h
184
#define d2i_DHparams_bio(bp, x) \
crypto/openssl/include/openssl/dh.h
185
ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x)
crypto/openssl/include/openssl/dh.h
186
#define i2d_DHparams_bio(bp, x) \
crypto/openssl/include/openssl/dh.h
187
ASN1_i2d_bio_of(DH, i2d_DHparams, bp, x)
crypto/openssl/include/openssl/dh.h
196
#define d2i_DHxparams_bio(bp, x) \
crypto/openssl/include/openssl/dh.h
197
ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x)
crypto/openssl/include/openssl/dh.h
198
#define i2d_DHxparams_bio(bp, x) \
crypto/openssl/include/openssl/dh.h
199
ASN1_i2d_bio_of(DH, i2d_DHxparams, bp, x)
crypto/openssl/include/openssl/dh.h
246
OSSL_DEPRECATEDIN_3_0 int DHparams_print(BIO *bp, const DH *x);
crypto/openssl/include/openssl/dsa.h
111
#define d2i_DSAparams_bio(bp, x) \
crypto/openssl/include/openssl/dsa.h
112
ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSAparams, bp, x)
crypto/openssl/include/openssl/dsa.h
113
#define i2d_DSAparams_bio(bp, x) \
crypto/openssl/include/openssl/dsa.h
114
ASN1_i2d_bio_of(DSA, i2d_DSAparams, bp, x)
crypto/openssl/include/openssl/dsa.h
180
OSSL_DEPRECATEDIN_3_0 int DSAparams_print(BIO *bp, const DSA *x);
crypto/openssl/include/openssl/dsa.h
181
OSSL_DEPRECATEDIN_3_0 int DSA_print(BIO *bp, const DSA *x, int off);
crypto/openssl/include/openssl/dsa.h
184
OSSL_DEPRECATEDIN_3_0 int DSA_print_fp(FILE *bp, const DSA *x, int off);
crypto/openssl/include/openssl/ec.h
1263
OSSL_DEPRECATEDIN_3_0 int ECParameters_print(BIO *bp, const EC_KEY *key);
crypto/openssl/include/openssl/ec.h
1271
OSSL_DEPRECATEDIN_3_0 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
crypto/openssl/include/openssl/ec.h
926
#define d2i_ECPKParameters_bio(bp, x) \
crypto/openssl/include/openssl/ec.h
927
ASN1_d2i_bio_of(EC_GROUP, NULL, d2i_ECPKParameters, bp, x)
crypto/openssl/include/openssl/ec.h
928
#define i2d_ECPKParameters_bio(bp, x) \
crypto/openssl/include/openssl/ec.h
929
ASN1_i2d_bio_of(EC_GROUP, i2d_ECPKParameters, bp, x)
crypto/openssl/include/openssl/ec.h
937
OSSL_DEPRECATEDIN_3_0 int ECPKParameters_print(BIO *bp, const EC_GROUP *x,
crypto/openssl/include/openssl/err.h
471
void ERR_print_errors(BIO *bp);
crypto/openssl/include/openssl/evp.h
1454
int i2d_KeyParams_bio(BIO *bp, const EVP_PKEY *pkey);
crypto/openssl/include/openssl/ocsp.h
243
#define d2i_OCSP_REQUEST_bio(bp, p) ASN1_d2i_bio_of(OCSP_REQUEST, OCSP_REQUEST_new, d2i_OCSP_REQUEST, bp, p)
crypto/openssl/include/openssl/ocsp.h
245
#define d2i_OCSP_RESPONSE_bio(bp, p) ASN1_d2i_bio_of(OCSP_RESPONSE, OCSP_RESPONSE_new, d2i_OCSP_RESPONSE, bp, p)
crypto/openssl/include/openssl/ocsp.h
247
#define PEM_read_bio_OCSP_REQUEST(bp, x, cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \
crypto/openssl/include/openssl/ocsp.h
249
bp, (char **)(x), cb, NULL)
crypto/openssl/include/openssl/ocsp.h
251
#define PEM_read_bio_OCSP_RESPONSE(bp, x, cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio( \
crypto/openssl/include/openssl/ocsp.h
253
bp, (char **)(x), cb, NULL)
crypto/openssl/include/openssl/ocsp.h
255
#define PEM_write_bio_OCSP_REQUEST(bp, o) \
crypto/openssl/include/openssl/ocsp.h
257
bp, (char *)(o), NULL, NULL, 0, NULL, NULL)
crypto/openssl/include/openssl/ocsp.h
259
#define PEM_write_bio_OCSP_RESPONSE(bp, o) \
crypto/openssl/include/openssl/ocsp.h
261
bp, (char *)(o), NULL, NULL, 0, NULL, NULL)
crypto/openssl/include/openssl/ocsp.h
263
#define i2d_OCSP_RESPONSE_bio(bp, o) ASN1_i2d_bio_of(OCSP_RESPONSE, i2d_OCSP_RESPONSE, bp, o)
crypto/openssl/include/openssl/ocsp.h
265
#define i2d_OCSP_REQUEST_bio(bp, o) ASN1_i2d_bio_of(OCSP_REQUEST, i2d_OCSP_REQUEST, bp, o)
crypto/openssl/include/openssl/ocsp.h
477
int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);
crypto/openssl/include/openssl/ocsp.h
478
int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);
crypto/openssl/include/openssl/pem.h
149
type *PEM_read_bio_##name(BIO *bp, type **x, \
crypto/openssl/include/openssl/pem.h
152
return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
crypto/openssl/include/openssl/pem.h
379
int PEM_read_bio(BIO *bp, char **name, char **header,
crypto/openssl/include/openssl/pem.h
384
int PEM_read_bio_ex(BIO *bp, char **name, char **header,
crypto/openssl/include/openssl/pem.h
387
const char *name, BIO *bp, pem_password_cb *cb,
crypto/openssl/include/openssl/pem.h
389
int PEM_write_bio(BIO *bp, const char *name, const char *hdr,
crypto/openssl/include/openssl/pem.h
392
const char *name, BIO *bp, pem_password_cb *cb,
crypto/openssl/include/openssl/pem.h
394
void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
crypto/openssl/include/openssl/pem.h
396
int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
crypto/openssl/include/openssl/pem.h
401
const char *name, BIO *bp, const void *x,
crypto/openssl/include/openssl/pem.h
405
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
crypto/openssl/include/openssl/pem.h
408
*PEM_X509_INFO_read_bio_ex(BIO *bp, STACK_OF(X509_INFO) *sk,
crypto/openssl/include/openssl/pem.h
412
int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc,
crypto/openssl/include/openssl/pem.h
486
int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x,
crypto/openssl/include/openssl/pem.h
492
int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
crypto/openssl/include/openssl/pem.h
498
int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
crypto/openssl/include/openssl/pem.h
501
int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
crypto/openssl/include/openssl/pem.h
504
EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
crypto/openssl/include/openssl/pem.h
525
EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x,
crypto/openssl/include/openssl/pem.h
527
EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
crypto/openssl/include/openssl/pem.h
528
int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x);
crypto/openssl/include/openssl/pkcs12.h
357
int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12);
crypto/openssl/include/openssl/pkcs12.h
361
PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12);
crypto/openssl/include/openssl/pkcs7.h
320
PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
crypto/openssl/include/openssl/pkcs7.h
321
int i2d_PKCS7_bio(BIO *bp, const PKCS7 *p7);
crypto/openssl/include/openssl/rsa.h
352
OSSL_DEPRECATEDIN_3_0 int RSA_print(BIO *bp, const RSA *r, int offset);
crypto/openssl/include/openssl/ssl.h
1199
#define d2i_SSL_SESSION_bio(bp, s_id) ASN1_d2i_bio_of(SSL_SESSION, SSL_SESSION_new, d2i_SSL_SESSION, bp, s_id)
crypto/openssl/include/openssl/ssl.h
1200
#define i2d_SSL_SESSION_bio(bp, s_id) ASN1_i2d_bio_of(SSL_SESSION, i2d_SSL_SESSION, bp, s_id)
crypto/openssl/include/openssl/ssl.h
1803
int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x);
crypto/openssl/include/openssl/x509.h
1016
int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
crypto/openssl/include/openssl/x509.h
1018
int X509_print_fp(FILE *bp, X509 *x);
crypto/openssl/include/openssl/x509.h
1019
int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
crypto/openssl/include/openssl/x509.h
1020
int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
crypto/openssl/include/openssl/x509.h
1025
int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase);
crypto/openssl/include/openssl/x509.h
1028
int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
crypto/openssl/include/openssl/x509.h
1030
int X509_print(BIO *bp, X509 *x);
crypto/openssl/include/openssl/x509.h
1031
int X509_ocspid_print(BIO *bp, X509 *x);
crypto/openssl/include/openssl/x509.h
1033
int X509_CRL_print(BIO *bp, X509_CRL *x);
crypto/openssl/include/openssl/x509.h
1034
int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
crypto/openssl/include/openssl/x509.h
1036
int X509_REQ_print(BIO *bp, X509_REQ *req);
crypto/openssl/include/openssl/x509.h
540
int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
crypto/openssl/include/openssl/x509.h
541
int X509_signature_print(BIO *bp, const X509_ALGOR *alg,
crypto/openssl/include/openssl/x509.h
624
X509 *d2i_X509_bio(BIO *bp, X509 **x509);
crypto/openssl/include/openssl/x509.h
625
int i2d_X509_bio(BIO *bp, const X509 *x509);
crypto/openssl/include/openssl/x509.h
626
X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
crypto/openssl/include/openssl/x509.h
627
int i2d_X509_CRL_bio(BIO *bp, const X509_CRL *crl);
crypto/openssl/include/openssl/x509.h
628
X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
crypto/openssl/include/openssl/x509.h
629
int i2d_X509_REQ_bio(BIO *bp, const X509_REQ *req);
crypto/openssl/include/openssl/x509.h
631
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
crypto/openssl/include/openssl/x509.h
632
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPrivateKey_bio(BIO *bp, const RSA *rsa);
crypto/openssl/include/openssl/x509.h
633
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
crypto/openssl/include/openssl/x509.h
634
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPublicKey_bio(BIO *bp, const RSA *rsa);
crypto/openssl/include/openssl/x509.h
635
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
crypto/openssl/include/openssl/x509.h
636
OSSL_DEPRECATEDIN_3_0 int i2d_RSA_PUBKEY_bio(BIO *bp, const RSA *rsa);
crypto/openssl/include/openssl/x509.h
640
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
crypto/openssl/include/openssl/x509.h
641
OSSL_DEPRECATEDIN_3_0 int i2d_DSA_PUBKEY_bio(BIO *bp, const DSA *dsa);
crypto/openssl/include/openssl/x509.h
642
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
crypto/openssl/include/openssl/x509.h
643
OSSL_DEPRECATEDIN_3_0 int i2d_DSAPrivateKey_bio(BIO *bp, const DSA *dsa);
crypto/openssl/include/openssl/x509.h
649
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
crypto/openssl/include/openssl/x509.h
650
OSSL_DEPRECATEDIN_3_0 int i2d_EC_PUBKEY_bio(BIO *bp, const EC_KEY *eckey);
crypto/openssl/include/openssl/x509.h
651
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
crypto/openssl/include/openssl/x509.h
652
OSSL_DEPRECATEDIN_3_0 int i2d_ECPrivateKey_bio(BIO *bp, const EC_KEY *eckey);
crypto/openssl/include/openssl/x509.h
656
X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
crypto/openssl/include/openssl/x509.h
657
int i2d_PKCS8_bio(BIO *bp, const X509_SIG *p8);
crypto/openssl/include/openssl/x509.h
658
X509_PUBKEY *d2i_X509_PUBKEY_bio(BIO *bp, X509_PUBKEY **xpk);
crypto/openssl/include/openssl/x509.h
659
int i2d_X509_PUBKEY_bio(BIO *bp, const X509_PUBKEY *xpk);
crypto/openssl/include/openssl/x509.h
660
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
crypto/openssl/include/openssl/x509.h
662
int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, const PKCS8_PRIV_KEY_INFO *p8inf);
crypto/openssl/include/openssl/x509.h
663
int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, const EVP_PKEY *key);
crypto/openssl/include/openssl/x509.h
664
int i2d_PrivateKey_bio(BIO *bp, const EVP_PKEY *pkey);
crypto/openssl/include/openssl/x509.h
665
EVP_PKEY *d2i_PrivateKey_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/include/openssl/x509.h
667
EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
crypto/openssl/include/openssl/x509.h
668
int i2d_PUBKEY_bio(BIO *bp, const EVP_PKEY *pkey);
crypto/openssl/include/openssl/x509.h
669
EVP_PKEY *d2i_PUBKEY_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
crypto/openssl/include/openssl/x509.h
671
EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
crypto/openssl/include/openssl/x509_acert.h
181
int OSSL_IETF_ATTR_SYNTAX_print(BIO *bp, OSSL_IETF_ATTR_SYNTAX *a, int indent);
crypto/openssl/include/openssl/x509_acert.h
46
X509_ACERT *d2i_X509_ACERT_bio(BIO *bp, X509_ACERT **acert);
crypto/openssl/include/openssl/x509_acert.h
47
int i2d_X509_ACERT_bio(BIO *bp, const X509_ACERT *acert);
crypto/openssl/include/openssl/x509_acert.h
70
int X509_ACERT_print(BIO *bp, X509_ACERT *x);
crypto/openssl/include/openssl/x509_acert.h
71
int X509_ACERT_print_ex(BIO *bp, X509_ACERT *x, unsigned long nmflags,
crypto/openssl/include/openssl/x509v3.h
871
int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a);
crypto/openssl/providers/implementations/encode_decode/encode_key2any.c
70
typedef int write_bio_of_void_fn(BIO *bp, const void *x);
crypto/openssl/ssl/bio_ssl.c
434
static int ssl_puts(BIO *bp, const char *str)
crypto/openssl/ssl/bio_ssl.c
439
ret = BIO_write(bp, str, n);
crypto/openssl/ssl/record/methods/tls13_meth.c
370
size_t mask, bp = 0, remainder;
crypto/openssl/ssl/record/methods/tls13_meth.c
377
bp = rl->hs_padding;
crypto/openssl/ssl/record/methods/tls13_meth.c
379
bp = rl->hs_padding;
crypto/openssl/ssl/record/methods/tls13_meth.c
382
bp = rl->block_padding;
crypto/openssl/ssl/record/methods/tls13_meth.c
383
if (bp > 0) {
crypto/openssl/ssl/record/methods/tls13_meth.c
384
mask = bp - 1;
crypto/openssl/ssl/record/methods/tls13_meth.c
386
if ((bp & mask) == 0)
crypto/openssl/ssl/record/methods/tls13_meth.c
389
remainder = rlen % bp;
crypto/openssl/ssl/record/methods/tls13_meth.c
394
padding = bp - remainder;
crypto/openssl/ssl/s3_lib.c
3721
const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
crypto/openssl/ssl/s3_lib.c
3723
if (ap->id == bp->id)
crypto/openssl/ssl/s3_lib.c
3725
return ap->id < bp->id ? -1 : 1;
crypto/openssl/ssl/ssl_lib.c
3233
const SSL_CIPHER *const *bp)
crypto/openssl/ssl/ssl_lib.c
3235
if ((*ap)->id > (*bp)->id)
crypto/openssl/ssl/ssl_lib.c
3237
if ((*ap)->id < (*bp)->id)
crypto/openssl/ssl/ssl_local.h
2552
const SSL_CIPHER *const *bp);
crypto/openssl/ssl/ssl_txt.c
100
if (BIO_puts(bp, "\n SRP username: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
102
if (BIO_printf(bp, "%s", x->srp_username ? x->srp_username : "None") <= 0)
crypto/openssl/ssl/ssl_txt.c
106
if (BIO_printf(bp,
crypto/openssl/ssl/ssl_txt.c
113
if (BIO_puts(bp, "\n TLS session ticket:\n") <= 0)
crypto/openssl/ssl/ssl_txt.c
115
if (BIO_dump_indent(bp, (const char *)x->ext.tick, (int)x->ext.ticklen, 4)
crypto/openssl/ssl/ssl_txt.c
126
if (BIO_printf(bp, "\n Compression: %d", x->compress_meth) <= 0)
crypto/openssl/ssl/ssl_txt.c
129
if (BIO_printf(bp, "\n Compression: %d (%s)", comp->id,
crypto/openssl/ssl/ssl_txt.c
137
if (BIO_printf(bp, "\n Start Time: %lld",
crypto/openssl/ssl/ssl_txt.c
143
if (BIO_printf(bp, "\n Timeout : %lld (sec)",
crypto/openssl/ssl/ssl_txt.c
148
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/ssl/ssl_txt.c
151
if (BIO_puts(bp, " Verify return code: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
153
if (BIO_printf(bp, "%ld (%s)\n", x->verify_result,
crypto/openssl/ssl/ssl_txt.c
158
if (BIO_printf(bp, " Extended master secret: %s\n",
crypto/openssl/ssl/ssl_txt.c
164
if (BIO_printf(bp, " Max Early Data: %u\n",
crypto/openssl/ssl/ssl_txt.c
179
int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x)
crypto/openssl/ssl/ssl_txt.c
193
if (BIO_puts(bp, "RSA ") <= 0)
crypto/openssl/ssl/ssl_txt.c
196
if (BIO_puts(bp, "Session-ID:") <= 0)
crypto/openssl/ssl/ssl_txt.c
199
if (BIO_printf(bp, "%02X", x->session_id[i]) <= 0)
crypto/openssl/ssl/ssl_txt.c
202
if (BIO_puts(bp, " Master-Key:") <= 0)
crypto/openssl/ssl/ssl_txt.c
205
if (BIO_printf(bp, "%02X", x->master_key[i]) <= 0)
crypto/openssl/ssl/ssl_txt.c
208
if (BIO_puts(bp, "\n") <= 0)
crypto/openssl/ssl/ssl_txt.c
34
int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x)
crypto/openssl/ssl/ssl_txt.c
43
if (BIO_puts(bp, "SSL-Session:\n") <= 0)
crypto/openssl/ssl/ssl_txt.c
46
if (BIO_printf(bp, " Protocol : %s\n", s) <= 0)
crypto/openssl/ssl/ssl_txt.c
51
if (BIO_printf(bp, " Cipher : %06lX\n",
crypto/openssl/ssl/ssl_txt.c
56
if (BIO_printf(bp, " Cipher : %04lX\n",
crypto/openssl/ssl/ssl_txt.c
62
if (BIO_printf(bp, " Cipher : %s\n",
crypto/openssl/ssl/ssl_txt.c
68
if (BIO_puts(bp, " Session-ID: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
71
if (BIO_printf(bp, "%02X", x->session_id[i]) <= 0)
crypto/openssl/ssl/ssl_txt.c
74
if (BIO_puts(bp, "\n Session-ID-ctx: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
77
if (BIO_printf(bp, "%02X", x->sid_ctx[i]) <= 0)
crypto/openssl/ssl/ssl_txt.c
81
if (BIO_puts(bp, "\n Resumption PSK: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
83
} else if (BIO_puts(bp, "\n Master-Key: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
86
if (BIO_printf(bp, "%02X", x->master_key[i]) <= 0)
crypto/openssl/ssl/ssl_txt.c
90
if (BIO_puts(bp, "\n PSK identity: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
92
if (BIO_printf(bp, "%s", x->psk_identity ? x->psk_identity : "None") <= 0)
crypto/openssl/ssl/ssl_txt.c
94
if (BIO_puts(bp, "\n PSK identity hint: ") <= 0)
crypto/openssl/ssl/ssl_txt.c
96
if (BIO_printf(bp, "%s", x->psk_identity_hint ? x->psk_identity_hint : "None") <= 0)
crypto/openssl/test/asynciotest.c
32
static int async_gets(BIO *bp, char *buf, int size);
crypto/openssl/test/asynciotest.c
33
static int async_puts(BIO *bp, const char *str);
crypto/openssl/test/dhtest.c
184
if (!TEST_ptr(bp = BN_dup(ap))
crypto/openssl/test/dhtest.c
186
|| !TEST_true(DH_set0_pqg(b, bp, NULL, bg)))
crypto/openssl/test/dhtest.c
188
bp = bg = NULL;
crypto/openssl/test/dhtest.c
248
BN_free(bp);
crypto/openssl/test/dhtest.c
50
BIGNUM *bp = NULL, *bg = NULL, *cpriv_key = NULL;
crypto/openssl/test/helpers/ssltestlib.c
287
static int mempacket_test_gets(BIO *bp, char *buf, int size);
crypto/openssl/test/helpers/ssltestlib.c
288
static int mempacket_test_puts(BIO *bp, const char *str);
crypto/openssl/test/helpers/ssltestlib.c
38
static int tls_dump_gets(BIO *bp, char *buf, int size);
crypto/openssl/test/helpers/ssltestlib.c
39
static int tls_dump_puts(BIO *bp, const char *str);
crypto/openssl/test/helpers/ssltestlib.c
757
static int always_retry_gets(BIO *bp, char *buf, int size);
crypto/openssl/test/helpers/ssltestlib.c
758
static int always_retry_puts(BIO *bp, const char *str);
crypto/openssl/test/tls-provider.c
1331
typedef int write_bio_of_void_fn(BIO *bp, const void *x);
crypto/openssl/test/tls13ccstest.c
32
static int watchccs_gets(BIO *bp, char *buf, int size);
crypto/openssl/test/tls13ccstest.c
33
static int watchccs_puts(BIO *bp, const char *str);
crypto/openssl/test/x509_acert_test.c
21
BIO *bp, *bout;
crypto/openssl/test/x509_acert_test.c
26
if (!TEST_ptr(bp = BIO_new_file(acert_file, "r")))
crypto/openssl/test/x509_acert_test.c
32
if (!TEST_ptr(acert = PEM_read_bio_X509_ACERT(bp, NULL, NULL, NULL)))
crypto/openssl/test/x509_acert_test.c
42
BIO_free(bp);
crypto/openssl/test/x509_acert_test.c
53
BIO *bp = NULL;
crypto/openssl/test/x509_acert_test.c
62
if (!TEST_ptr(bp = BIO_new_file(acert_file, "r")))
crypto/openssl/test/x509_acert_test.c
65
if (!TEST_ptr(acert = PEM_read_bio_X509_ACERT(bp, NULL, NULL, NULL)))
crypto/openssl/test/x509_acert_test.c
74
BIO_free(bp);
lib/libc/db/hash/hash.c
577
u_int16_t *bp;
lib/libc/db/hash/hash.c
596
for (bp = (u_int16_t *)rbufp->page, n = *bp++, ndx = 1; ndx < n;)
lib/libc/db/hash/hash.c
597
if (bp[1] >= REAL_KEY) {
lib/libc/db/hash/hash.c
599
if (size == off - *bp &&
lib/libc/db/hash/hash.c
600
memcmp(kp, rbufp->page + *bp, size) == 0)
lib/libc/db/hash/hash.c
602
off = bp[1];
lib/libc/db/hash/hash.c
606
bp += 2;
lib/libc/db/hash/hash.c
608
} else if (bp[1] == OVFLPAGE) {
lib/libc/db/hash/hash.c
609
rbufp = __get_buf(hashp, *bp, rbufp, 0);
lib/libc/db/hash/hash.c
615
bp = (u_int16_t *)rbufp->page;
lib/libc/db/hash/hash.c
616
n = *bp++;
lib/libc/db/hash/hash.c
619
} else if (bp[1] < REAL_KEY) {
lib/libc/db/hash/hash.c
637
bp = (u_int16_t *)rbufp->page;
lib/libc/db/hash/hash.c
638
n = *bp++;
lib/libc/db/hash/hash.c
671
bp = (u_int16_t *)rbufp->page;
lib/libc/db/hash/hash.c
672
if (bp[ndx + 1] < REAL_KEY) {
lib/libc/db/hash/hash.c
676
val->data = (u_char *)rbufp->page + (int)bp[ndx + 1];
lib/libc/db/hash/hash.c
677
val->size = bp[ndx] - bp[ndx + 1];
lib/libc/db/hash/hash.c
704
u_int16_t *bp, ndx;
lib/libc/db/hash/hash.c
722
for (bp = NULL; !bp || !bp[0]; ) {
lib/libc/db/hash/hash.c
731
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash.c
732
if (bp[0])
lib/libc/db/hash/hash.c
741
bp = (u_int16_t *)hashp->cpage->page;
lib/libc/db/hash/hash.c
744
if (hashp->cndx > bp[0]) {
lib/libc/db/hash/hash.c
754
assert(bp);
lib/libc/db/hash/hash.c
757
while (bp[hashp->cndx + 1] == OVFLPAGE) {
lib/libc/db/hash/hash.c
759
__get_buf(hashp, bp[hashp->cndx], bufp, 0);
lib/libc/db/hash/hash.c
762
bp = (u_int16_t *)(bufp->page);
lib/libc/db/hash/hash.c
765
if (!bp[0]) {
lib/libc/db/hash/hash.c
771
if (bp[ndx + 1] < REAL_KEY) {
lib/libc/db/hash/hash.c
777
key->data = (u_char *)hashp->cpage->page + bp[ndx];
lib/libc/db/hash/hash.c
778
key->size = (ndx > 1 ? bp[ndx - 1] : hashp->BSIZE) - bp[ndx];
lib/libc/db/hash/hash.c
779
data->data = (u_char *)hashp->cpage->page + bp[ndx + 1];
lib/libc/db/hash/hash.c
780
data->size = bp[ndx] - bp[ndx + 1];
lib/libc/db/hash/hash_bigkey.c
195
u_int16_t *bp, pageno;
lib/libc/db/hash/hash_bigkey.c
200
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
204
while (!key_done || (bp[2] != FULL_KEY_DATA)) {
lib/libc/db/hash/hash_bigkey.c
205
if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA)
lib/libc/db/hash/hash_bigkey.c
213
if (bp[2] == FULL_KEY_DATA && FREESPACE(bp))
lib/libc/db/hash/hash_bigkey.c
215
pageno = bp[bp[0] - 1];
lib/libc/db/hash/hash_bigkey.c
223
bp = (u_int16_t *)rbufp->page;
lib/libc/db/hash/hash_bigkey.c
234
n = bp[0];
lib/libc/db/hash/hash_bigkey.c
235
pageno = bp[n - 1];
lib/libc/db/hash/hash_bigkey.c
238
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
241
bp[1] = pageno;
lib/libc/db/hash/hash_bigkey.c
242
bp[2] = OVFLPAGE;
lib/libc/db/hash/hash_bigkey.c
248
bp[0] = n;
lib/libc/db/hash/hash_bigkey.c
249
FREESPACE(bp) = hashp->BSIZE - PAGE_META(n);
lib/libc/db/hash/hash_bigkey.c
250
OFFSET(bp) = hashp->BSIZE;
lib/libc/db/hash/hash_bigkey.c
271
u_int16_t *bp;
lib/libc/db/hash/hash_bigkey.c
277
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
282
for (bytes = hashp->BSIZE - bp[ndx];
lib/libc/db/hash/hash_bigkey.c
283
bytes <= size && bp[ndx + 1] == PARTIAL_KEY;
lib/libc/db/hash/hash_bigkey.c
284
bytes = hashp->BSIZE - bp[ndx]) {
lib/libc/db/hash/hash_bigkey.c
285
if (memcmp(p + bp[ndx], kkey, bytes))
lib/libc/db/hash/hash_bigkey.c
289
bufp = __get_buf(hashp, bp[ndx + 2], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
293
bp = (u_int16_t *)p;
lib/libc/db/hash/hash_bigkey.c
297
if (bytes != ksize || memcmp(p + bp[ndx], kkey, bytes)) {
lib/libc/db/hash/hash_bigkey.c
319
u_int16_t *bp, pageno;
lib/libc/db/hash/hash_bigkey.c
323
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
325
n = bp[0];
lib/libc/db/hash/hash_bigkey.c
332
if (bp[2] == FULL_KEY_DATA &&
lib/libc/db/hash/hash_bigkey.c
333
((n == 2) || (bp[n] == OVFLPAGE) || (FREESPACE(bp))))
lib/libc/db/hash/hash_bigkey.c
336
pageno = bp[n - 1];
lib/libc/db/hash/hash_bigkey.c
340
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
344
if (bp[0] > 2)
lib/libc/db/hash/hash_bigkey.c
345
return (bp[3]);
lib/libc/db/hash/hash_bigkey.c
358
u_int16_t *bp, len, off, save_addr;
lib/libc/db/hash/hash_bigkey.c
361
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
362
while (bp[ndx + 1] == PARTIAL_KEY) {
lib/libc/db/hash/hash_bigkey.c
363
bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
366
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
370
if (bp[ndx + 1] == FULL_KEY) {
lib/libc/db/hash/hash_bigkey.c
371
bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
374
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
377
off = bp[1];
lib/libc/db/hash/hash_bigkey.c
380
if (!FREESPACE(bp)) {
lib/libc/db/hash/hash_bigkey.c
388
off = bp[bp[0]];
lib/libc/db/hash/hash_bigkey.c
389
len = bp[1] - off;
lib/libc/db/hash/hash_bigkey.c
392
bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
395
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_bigkey.c
398
tp = (char *)bp;
lib/libc/db/hash/hash_bigkey.c
399
off = bp[bp[0]];
lib/libc/db/hash/hash_bigkey.c
401
val->size = bp[1] - off;
lib/libc/db/hash/hash_bigkey.c
403
if (bp[0] == 2) { /* No more buckets in
lib/libc/db/hash/hash_bigkey.c
410
bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
443
u_int16_t *bp;
lib/libc/db/hash/hash_bigkey.c
450
bp = (u_int16_t *)p;
lib/libc/db/hash/hash_bigkey.c
451
mylen = hashp->BSIZE - bp[1];
lib/libc/db/hash/hash_bigkey.c
454
if (bp[2] == FULL_KEY_DATA) { /* End of Data */
lib/libc/db/hash/hash_bigkey.c
462
if (bp[0] == 2) { /* No more buckets in chain */
lib/libc/db/hash/hash_bigkey.c
467
__get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
477
xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
486
memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], mylen);
lib/libc/db/hash/hash_bigkey.c
513
u_int16_t *bp, save_addr;
lib/libc/db/hash/hash_bigkey.c
516
bp = (u_int16_t *)p;
lib/libc/db/hash/hash_bigkey.c
517
mylen = hashp->BSIZE - bp[1];
lib/libc/db/hash/hash_bigkey.c
521
if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA) { /* End of Key. */
lib/libc/db/hash/hash_bigkey.c
529
xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_bigkey.c
538
memmove(&hashp->tmp_key[len], (bufp->page) + bp[1], mylen);
lib/libc/db/hash/hash_bigkey.c
556
BUFHEAD *bp, *tmpp;
lib/libc/db/hash/hash_bigkey.c
561
bp = big_keyp;
lib/libc/db/hash/hash_bigkey.c
588
(tmpp->ovfl ? tmpp->ovfl->addr : 0), (bp ? bp->addr : 0));
lib/libc/db/hash/hash_bigkey.c
590
tmpp->ovfl = bp; /* one of op/np point to big_keyp */
lib/libc/db/hash/hash_buf.c
103
BUFHEAD *bp;
lib/libc/db/hash/hash_buf.c
111
bp = prev_bp->ovfl;
lib/libc/db/hash/hash_buf.c
112
if (!bp || (bp->addr != addr))
lib/libc/db/hash/hash_buf.c
113
bp = NULL;
lib/libc/db/hash/hash_buf.c
125
bp = PTROF(segp[segment_ndx]);
lib/libc/db/hash/hash_buf.c
130
if (!bp) {
lib/libc/db/hash/hash_buf.c
131
bp = newbuf(hashp, addr, prev_bp);
lib/libc/db/hash/hash_buf.c
132
if (!bp ||
lib/libc/db/hash/hash_buf.c
133
__get_page(hashp, bp->page, addr, !prev_bp, is_disk, 0))
lib/libc/db/hash/hash_buf.c
137
(BUFHEAD *)((intptr_t)bp | is_disk_mask);
lib/libc/db/hash/hash_buf.c
139
BUF_REMOVE(bp);
lib/libc/db/hash/hash_buf.c
140
MRU_INSERT(bp);
lib/libc/db/hash/hash_buf.c
142
return (bp);
lib/libc/db/hash/hash_buf.c
154
BUFHEAD *bp; /* The buffer we're going to use */
lib/libc/db/hash/hash_buf.c
162
bp = LRU;
lib/libc/db/hash/hash_buf.c
165
if (bp == hashp->cpage) {
lib/libc/db/hash/hash_buf.c
166
BUF_REMOVE(bp);
lib/libc/db/hash/hash_buf.c
167
MRU_INSERT(bp);
lib/libc/db/hash/hash_buf.c
168
bp = LRU;
lib/libc/db/hash/hash_buf.c
172
if (hashp->nbufs == 0 && prev_bp && bp->ovfl) {
lib/libc/db/hash/hash_buf.c
175
for (ovfl = bp->ovfl; ovfl ; ovfl = ovfl->ovfl) {
lib/libc/db/hash/hash_buf.c
187
if (hashp->nbufs || (bp->flags & BUF_PIN) || bp == hashp->cpage) {
lib/libc/db/hash/hash_buf.c
189
if ((bp = (BUFHEAD *)calloc(1, sizeof(BUFHEAD))) == NULL)
lib/libc/db/hash/hash_buf.c
191
if ((bp->page = (char *)calloc(1, hashp->BSIZE)) == NULL) {
lib/libc/db/hash/hash_buf.c
192
free(bp);
lib/libc/db/hash/hash_buf.c
199
BUF_REMOVE(bp);
lib/libc/db/hash/hash_buf.c
204
if ((bp->addr != 0) || (bp->flags & BUF_BUCKET)) {
lib/libc/db/hash/hash_buf.c
209
shortp = (u_int16_t *)bp->page;
lib/libc/db/hash/hash_buf.c
212
if ((bp->flags & BUF_MOD) && __put_page(hashp, bp->page,
lib/libc/db/hash/hash_buf.c
213
bp->addr, (int)IS_BUCKET(bp->flags), 0))
lib/libc/db/hash/hash_buf.c
223
if (IS_BUCKET(bp->flags)) {
lib/libc/db/hash/hash_buf.c
224
segment_ndx = bp->addr & (hashp->SGSIZE - 1);
lib/libc/db/hash/hash_buf.c
225
segp = hashp->dir[bp->addr >> hashp->SSHIFT];
lib/libc/db/hash/hash_buf.c
231
((bp->flags & BUF_MOD) ||
lib/libc/db/hash/hash_buf.c
242
for (xbp = bp; xbp->ovfl;) {
lib/libc/db/hash/hash_buf.c
268
bp->addr = addr;
lib/libc/db/hash/hash_buf.c
271
bp->addr, (bp->ovfl ? bp->ovfl->addr : 0), 0);
lib/libc/db/hash/hash_buf.c
273
bp->ovfl = NULL;
lib/libc/db/hash/hash_buf.c
282
(bp ? bp->addr : 0));
lib/libc/db/hash/hash_buf.c
284
prev_bp->ovfl = bp;
lib/libc/db/hash/hash_buf.c
285
bp->flags = 0;
lib/libc/db/hash/hash_buf.c
287
bp->flags = BUF_BUCKET;
lib/libc/db/hash/hash_buf.c
288
MRU_INSERT(bp);
lib/libc/db/hash/hash_buf.c
289
return (bp);
lib/libc/db/hash/hash_buf.c
318
BUFHEAD *bp;
lib/libc/db/hash/hash_buf.c
323
for (bp = LRU; bp != &hashp->bufhead;) {
lib/libc/db/hash/hash_buf.c
325
if (bp->addr || IS_BUCKET(bp->flags)) {
lib/libc/db/hash/hash_buf.c
326
if (to_disk && (bp->flags & BUF_MOD) &&
lib/libc/db/hash/hash_buf.c
327
__put_page(hashp, bp->page,
lib/libc/db/hash/hash_buf.c
328
bp->addr, IS_BUCKET(bp->flags), 0))
lib/libc/db/hash/hash_buf.c
333
if (bp->page) {
lib/libc/db/hash/hash_buf.c
334
(void)memset(bp->page, 0, hashp->BSIZE);
lib/libc/db/hash/hash_buf.c
335
free(bp->page);
lib/libc/db/hash/hash_buf.c
337
BUF_REMOVE(bp);
lib/libc/db/hash/hash_buf.c
338
free(bp);
lib/libc/db/hash/hash_buf.c
339
bp = LRU;
lib/libc/db/hash/hash_buf.c
341
bp = bp->prev;
lib/libc/db/hash/hash_buf.c
347
__reclaim_buf(HTAB *hashp, BUFHEAD *bp)
lib/libc/db/hash/hash_buf.c
349
bp->ovfl = NULL;
lib/libc/db/hash/hash_buf.c
350
bp->addr = 0;
lib/libc/db/hash/hash_buf.c
351
bp->flags = 0;
lib/libc/db/hash/hash_buf.c
352
BUF_REMOVE(bp);
lib/libc/db/hash/hash_buf.c
353
LRU_INSERT(bp);
lib/libc/db/hash/hash_page.c
101
off = OFFSET(bp) - key->size;
lib/libc/db/hash/hash_page.c
103
bp[++n] = off;
lib/libc/db/hash/hash_page.c
108
bp[++n] = off;
lib/libc/db/hash/hash_page.c
111
bp[0] = n;
lib/libc/db/hash/hash_page.c
112
bp[n + 1] = off - ((n + 3) * sizeof(u_int16_t));
lib/libc/db/hash/hash_page.c
113
bp[n + 2] = off;
lib/libc/db/hash/hash_page.c
124
u_int16_t *bp, newoff, pairlen;
lib/libc/db/hash/hash_page.c
127
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_page.c
128
n = bp[0];
lib/libc/db/hash/hash_page.c
130
if (bp[ndx + 1] < REAL_KEY)
lib/libc/db/hash/hash_page.c
133
newoff = bp[ndx - 1];
lib/libc/db/hash/hash_page.c
136
pairlen = newoff - bp[ndx + 1];
lib/libc/db/hash/hash_page.c
141
char *src = bufp->page + (int)OFFSET(bp);
lib/libc/db/hash/hash_page.c
143
memmove(dst, src, bp[ndx + 1] - OFFSET(bp));
lib/libc/db/hash/hash_page.c
147
if (bp[i + 1] == OVFLPAGE) {
lib/libc/db/hash/hash_page.c
148
bp[i - 2] = bp[i];
lib/libc/db/hash/hash_page.c
149
bp[i - 1] = bp[i + 1];
lib/libc/db/hash/hash_page.c
151
bp[i - 2] = bp[i] + pairlen;
lib/libc/db/hash/hash_page.c
152
bp[i - 1] = bp[i + 1] + pairlen;
lib/libc/db/hash/hash_page.c
165
bp[n] = OFFSET(bp) + pairlen;
lib/libc/db/hash/hash_page.c
166
bp[n - 1] = bp[n + 1] + pairlen + 2 * sizeof(u_int16_t);
lib/libc/db/hash/hash_page.c
167
bp[0] = n - 2;
lib/libc/db/hash/hash_page.c
396
u_int16_t *bp, *sop;
lib/libc/db/hash/hash_page.c
399
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_page.c
401
while (bp[0] && (bp[2] < REAL_KEY || bp[bp[0]] < REAL_KEY))
lib/libc/db/hash/hash_page.c
403
if (bp[2] == FULL_KEY_DATA && bp[0] == 2)
lib/libc/db/hash/hash_page.c
407
else if (bp[2] < REAL_KEY && bp[bp[0]] != OVFLPAGE) {
lib/libc/db/hash/hash_page.c
408
bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_page.c
411
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_page.c
412
} else if (bp[bp[0]] != OVFLPAGE) {
lib/libc/db/hash/hash_page.c
417
if (bp[2] >= REAL_KEY &&
lib/libc/db/hash/hash_page.c
418
FREESPACE(bp) >= PAIRSIZE(key, val)) {
lib/libc/db/hash/hash_page.c
419
squeeze_key(bp, key, val);
lib/libc/db/hash/hash_page.c
422
bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
lib/libc/db/hash/hash_page.c
425
bp = (u_int16_t *)bufp->page;
lib/libc/db/hash/hash_page.c
429
if (PAIRFITS(bp, key, val))
lib/libc/db/hash/hash_page.c
518
u_int16_t *bp;
lib/libc/db/hash/hash_page.c
533
bp = (u_int16_t *)p;
lib/libc/db/hash/hash_page.c
535
bp[0] = 0; /* We hit the EOF, so initialize a new page */
lib/libc/db/hash/hash_page.c
541
if (!is_bitmap && !bp[0]) {
lib/libc/db/hash/hash_page.c
552
M_16_SWAP(bp[0]);
lib/libc/db/hash/hash_page.c
553
max = bp[0] + 2;
lib/libc/db/hash/hash_page.c
555
M_16_SWAP(bp[i]);
lib/libc/db/hash/hash_page.c
589
uint16_t *bp = (uint16_t *)(void *)pbuf;
lib/libc/db/hash/hash_page.c
590
max = bp[0] + 2;
lib/libc/db/hash/hash_page.c
592
M_16_SWAP(bp[i]);
lib/libc/db/hash/hash_page.c
921
short *bp, oaddr;
lib/libc/db/hash/hash_page.c
925
bp = (short *)bufp->page;
lib/libc/db/hash/hash_page.c
926
while (bp[0] && ((bp[bp[0]] == OVFLPAGE) ||
lib/libc/db/hash/hash_page.c
927
((bp[0] > 2) && bp[2] < REAL_KEY))) {
lib/libc/db/hash/hash_page.c
928
oaddr = bp[bp[0] - 1];
lib/libc/db/hash/hash_page.c
931
bp = (short *)bufp->page;
lib/libc/db/hash/hash_page.c
94
u_int16_t *bp, n, off;
lib/libc/db/hash/hash_page.c
96
bp = (u_int16_t *)p;
lib/libc/db/hash/hash_page.c
99
n = bp[0];
lib/libc/db/mpool/mpool.c
112
BKT *bp;
lib/libc/db/mpool/mpool.c
126
if ((bp = mpool_bkt(mp)) == NULL)
lib/libc/db/mpool/mpool.c
130
bp->pgno = *pgnoaddr;
lib/libc/db/mpool/mpool.c
132
bp->pgno = *pgnoaddr = mp->npages++;
lib/libc/db/mpool/mpool.c
134
bp->flags = MPOOL_PINNED | MPOOL_INUSE;
lib/libc/db/mpool/mpool.c
136
head = &mp->hqh[HASHKEY(bp->pgno)];
lib/libc/db/mpool/mpool.c
137
TAILQ_INSERT_HEAD(head, bp, hq);
lib/libc/db/mpool/mpool.c
138
TAILQ_INSERT_TAIL(&mp->lqh, bp, q);
lib/libc/db/mpool/mpool.c
139
return (bp->page);
lib/libc/db/mpool/mpool.c
146
BKT *bp;
lib/libc/db/mpool/mpool.c
148
bp = (BKT *)((char *)page - sizeof(BKT));
lib/libc/db/mpool/mpool.c
151
if (!(bp->flags & MPOOL_PINNED)) {
lib/libc/db/mpool/mpool.c
153
"mpool_delete: page %d not pinned\n", bp->pgno);
lib/libc/db/mpool/mpool.c
159
head = &mp->hqh[HASHKEY(bp->pgno)];
lib/libc/db/mpool/mpool.c
160
TAILQ_REMOVE(head, bp, hq);
lib/libc/db/mpool/mpool.c
161
TAILQ_REMOVE(&mp->lqh, bp, q);
lib/libc/db/mpool/mpool.c
163
free(bp);
lib/libc/db/mpool/mpool.c
178
BKT *bp;
lib/libc/db/mpool/mpool.c
187
if ((bp = mpool_look(mp, pgno)) != NULL) {
lib/libc/db/mpool/mpool.c
189
if (!(flags & MPOOL_IGNOREPIN) && bp->flags & MPOOL_PINNED) {
lib/libc/db/mpool/mpool.c
191
"mpool_get: page %d already pinned\n", bp->pgno);
lib/libc/db/mpool/mpool.c
199
head = &mp->hqh[HASHKEY(bp->pgno)];
lib/libc/db/mpool/mpool.c
200
TAILQ_REMOVE(head, bp, hq);
lib/libc/db/mpool/mpool.c
201
TAILQ_INSERT_HEAD(head, bp, hq);
lib/libc/db/mpool/mpool.c
202
TAILQ_REMOVE(&mp->lqh, bp, q);
lib/libc/db/mpool/mpool.c
203
TAILQ_INSERT_TAIL(&mp->lqh, bp, q);
lib/libc/db/mpool/mpool.c
206
bp->flags |= MPOOL_PINNED;
lib/libc/db/mpool/mpool.c
207
return (bp->page);
lib/libc/db/mpool/mpool.c
211
if ((bp = mpool_bkt(mp)) == NULL)
lib/libc/db/mpool/mpool.c
216
if ((nr = pread(mp->fd, bp->page, mp->pagesize, off)) != (ssize_t)mp->pagesize) {
lib/libc/db/mpool/mpool.c
223
free(bp);
lib/libc/db/mpool/mpool.c
232
memset(bp->page, 0, mp->pagesize);
lib/libc/db/mpool/mpool.c
236
free(bp);
lib/libc/db/mpool/mpool.c
247
bp->pgno = pgno;
lib/libc/db/mpool/mpool.c
249
bp->flags = MPOOL_PINNED;
lib/libc/db/mpool/mpool.c
250
bp->flags |= MPOOL_INUSE;
lib/libc/db/mpool/mpool.c
256
head = &mp->hqh[HASHKEY(bp->pgno)];
lib/libc/db/mpool/mpool.c
257
TAILQ_INSERT_HEAD(head, bp, hq);
lib/libc/db/mpool/mpool.c
258
TAILQ_INSERT_TAIL(&mp->lqh, bp, q);
lib/libc/db/mpool/mpool.c
262
(mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
lib/libc/db/mpool/mpool.c
264
return (bp->page);
lib/libc/db/mpool/mpool.c
275
BKT *bp;
lib/libc/db/mpool/mpool.c
280
bp = (BKT *)((char *)page - sizeof(BKT));
lib/libc/db/mpool/mpool.c
282
if (!(bp->flags & MPOOL_PINNED)) {
lib/libc/db/mpool/mpool.c
284
"mpool_put: page %d not pinned\n", bp->pgno);
lib/libc/db/mpool/mpool.c
288
bp->flags &= ~MPOOL_PINNED;
lib/libc/db/mpool/mpool.c
290
bp->flags |= flags & MPOOL_DIRTY;
lib/libc/db/mpool/mpool.c
301
BKT *bp;
lib/libc/db/mpool/mpool.c
305
bp = TAILQ_FIRST(&mp->lqh);
lib/libc/db/mpool/mpool.c
306
TAILQ_REMOVE(&mp->lqh, bp, q);
lib/libc/db/mpool/mpool.c
307
free(bp);
lib/libc/db/mpool/mpool.c
322
BKT *bp;
lib/libc/db/mpool/mpool.c
325
TAILQ_FOREACH(bp, &mp->lqh, q)
lib/libc/db/mpool/mpool.c
326
if (bp->flags & MPOOL_DIRTY &&
lib/libc/db/mpool/mpool.c
327
mpool_write(mp, bp) == RET_ERROR)
lib/libc/db/mpool/mpool.c
342
BKT *bp;
lib/libc/db/mpool/mpool.c
354
TAILQ_FOREACH(bp, &mp->lqh, q)
lib/libc/db/mpool/mpool.c
355
if (!(bp->flags & MPOOL_PINNED)) {
lib/libc/db/mpool/mpool.c
357
if (bp->flags & MPOOL_DIRTY &&
lib/libc/db/mpool/mpool.c
358
mpool_write(mp, bp) == RET_ERROR)
lib/libc/db/mpool/mpool.c
364
head = &mp->hqh[HASHKEY(bp->pgno)];
lib/libc/db/mpool/mpool.c
365
TAILQ_REMOVE(head, bp, hq);
lib/libc/db/mpool/mpool.c
366
TAILQ_REMOVE(&mp->lqh, bp, q);
lib/libc/db/mpool/mpool.c
369
spage = bp->page;
lib/libc/db/mpool/mpool.c
370
memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
lib/libc/db/mpool/mpool.c
371
bp->page = spage;
lib/libc/db/mpool/mpool.c
374
bp->flags = 0;
lib/libc/db/mpool/mpool.c
375
return (bp);
lib/libc/db/mpool/mpool.c
378
new: if ((bp = (BKT *)calloc(1, sizeof(BKT) + mp->pagesize)) == NULL)
lib/libc/db/mpool/mpool.c
383
bp->page = (char *)bp + sizeof(BKT);
lib/libc/db/mpool/mpool.c
384
bp->flags = 0;
lib/libc/db/mpool/mpool.c
386
return (bp);
lib/libc/db/mpool/mpool.c
394
mpool_write(MPOOL *mp, BKT *bp)
lib/libc/db/mpool/mpool.c
404
(mp->pgout)(mp->pgcookie, bp->pgno, bp->page);
lib/libc/db/mpool/mpool.c
406
off = mp->pagesize * bp->pgno;
lib/libc/db/mpool/mpool.c
407
if (pwrite(mp->fd, bp->page, mp->pagesize, off) != (ssize_t)mp->pagesize)
lib/libc/db/mpool/mpool.c
417
(mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
lib/libc/db/mpool/mpool.c
419
bp->flags &= ~MPOOL_DIRTY;
lib/libc/db/mpool/mpool.c
431
BKT *bp;
lib/libc/db/mpool/mpool.c
434
TAILQ_FOREACH(bp, head, hq)
lib/libc/db/mpool/mpool.c
435
if ((bp->pgno == pgno) &&
lib/libc/db/mpool/mpool.c
436
((bp->flags & MPOOL_INUSE) == MPOOL_INUSE)) {
lib/libc/db/mpool/mpool.c
440
return (bp);
lib/libc/db/mpool/mpool.c
456
BKT *bp;
lib/libc/db/mpool/mpool.c
478
TAILQ_FOREACH(bp, &mp->lqh, q) {
lib/libc/db/mpool/mpool.c
479
(void)fprintf(stderr, "%s%d", sep, bp->pgno);
lib/libc/db/mpool/mpool.c
480
if (bp->flags & MPOOL_DIRTY)
lib/libc/db/mpool/mpool.c
482
if (bp->flags & MPOOL_PINNED)
lib/libc/gen/check_utility_compat.c
49
char *p, *bp;
lib/libc/gen/check_utility_compat.c
62
bp = buf;
lib/libc/gen/check_utility_compat.c
63
while ((p = strsep(&bp, ",")) != NULL) {
lib/libc/gen/getcap.c
1009
if ('0' <= *bp && *bp <= '9')
lib/libc/gen/getcap.c
1010
digit = *bp - '0';
lib/libc/gen/getcap.c
1011
else if ('a' <= *bp && *bp <= 'f')
lib/libc/gen/getcap.c
1012
digit = 10 + *bp - 'a';
lib/libc/gen/getcap.c
1013
else if ('A' <= *bp && *bp <= 'F')
lib/libc/gen/getcap.c
1014
digit = 10 + *bp - 'A';
lib/libc/gen/getcap.c
1022
bp++;
lib/libc/gen/getcap.c
108
char *bp;
lib/libc/gen/getcap.c
111
bp = buf;
lib/libc/gen/getcap.c
119
if (*bp == '\0')
lib/libc/gen/getcap.c
122
if (*bp++ == ':')
lib/libc/gen/getcap.c
128
for (cp = cap; *cp == *bp && *bp != '\0'; cp++, bp++)
lib/libc/gen/getcap.c
132
if (*bp == '@')
lib/libc/gen/getcap.c
135
if (*bp != '\0' && *bp != ':')
lib/libc/gen/getcap.c
137
return(bp);
lib/libc/gen/getcap.c
139
if (*bp != type)
lib/libc/gen/getcap.c
141
bp++;
lib/libc/gen/getcap.c
142
return (*bp == '@' ? NULL : bp);
lib/libc/gen/getcap.c
274
char *b_end, *bp;
lib/libc/gen/getcap.c
286
bp = buf;
lib/libc/gen/getcap.c
295
if (bp >= b_end) {
lib/libc/gen/getcap.c
312
bp = buf;
lib/libc/gen/getcap.c
315
c = *bp++;
lib/libc/gen/getcap.c
530
cdbget(DB *capdbp, char **bp, const char *name)
lib/libc/gen/getcap.c
560
*bp = (char *)data.data + 1;
lib/libc/gen/getcap.c
572
const char *np, *bp;
lib/libc/gen/getcap.c
580
bp = buf;
lib/libc/gen/getcap.c
588
if (*bp == '|' || *bp == ':' || *bp == '\0')
lib/libc/gen/getcap.c
593
if (*bp++ != *np++)
lib/libc/gen/getcap.c
599
bp--; /* a '|' or ':' may have stopped the match */
lib/libc/gen/getcap.c
601
if (*bp == '\0' || *bp == ':')
lib/libc/gen/getcap.c
604
if (*bp++ == '|')
lib/libc/gen/getcap.c
643
cgetnext(char **bp, char **db_array)
lib/libc/gen/getcap.c
761
status = getent(bp, &dummy, db_array, -1, buf, 0, NULL);
lib/libc/gen/getcap.c
783
char *bp, *mp;
lib/libc/gen/getcap.c
790
bp = cgetcap(buf, cap, '=');
lib/libc/gen/getcap.c
791
if (bp == NULL)
lib/libc/gen/getcap.c
805
while (*bp != ':' && *bp != '\0') {
lib/libc/gen/getcap.c
812
if (*bp == '^') {
lib/libc/gen/getcap.c
813
bp++;
lib/libc/gen/getcap.c
814
if (*bp == ':' || *bp == '\0')
lib/libc/gen/getcap.c
816
if (*bp == '?') {
lib/libc/gen/getcap.c
818
bp++;
lib/libc/gen/getcap.c
820
*mp++ = *bp++ & 037;
lib/libc/gen/getcap.c
821
} else if (*bp == '\\') {
lib/libc/gen/getcap.c
822
bp++;
lib/libc/gen/getcap.c
823
if (*bp == ':' || *bp == '\0')
lib/libc/gen/getcap.c
825
if ('0' <= *bp && *bp <= '7') {
lib/libc/gen/getcap.c
831
n = n * 8 + (*bp++ - '0');
lib/libc/gen/getcap.c
832
} while (--i && '0' <= *bp && *bp <= '7');
lib/libc/gen/getcap.c
835
else switch (*bp++) {
lib/libc/gen/getcap.c
862
*mp++ = *(bp-1);
lib/libc/gen/getcap.c
866
*mp++ = *bp++;
lib/libc/gen/getcap.c
910
char *bp, *mp;
lib/libc/gen/getcap.c
917
if ((bp = cgetcap(buf, cap, '=')) == NULL)
lib/libc/gen/getcap.c
931
while (*bp != ':' && *bp != '\0') {
lib/libc/gen/getcap.c
938
*mp++ = *bp++;
lib/libc/gen/getcap.c
979
char *bp;
lib/libc/gen/getcap.c
984
bp = cgetcap(buf, cap, '#');
lib/libc/gen/getcap.c
985
if (bp == NULL)
lib/libc/gen/getcap.c
994
if (*bp == '0') {
lib/libc/gen/getcap.c
995
bp++;
lib/libc/gen/getcap.c
996
if (*bp == 'x' || *bp == 'X') {
lib/libc/gen/getcap.c
997
bp++;
lib/libc/gen/pw_scan.c
103
if (!(p = strsep(&bp, ":"))) /* uid */
lib/libc/gen/pw_scan.c
138
if (!(p = strsep(&bp, ":"))) /* gid */
lib/libc/gen/pw_scan.c
169
if (!(pw->pw_class = strsep(&bp, ":"))) /* class */
lib/libc/gen/pw_scan.c
174
if (!(p = strsep(&bp, ":"))) /* change */
lib/libc/gen/pw_scan.c
180
if (!(p = strsep(&bp, ":"))) /* expire */
lib/libc/gen/pw_scan.c
186
if (!(pw->pw_gecos = strsep(&bp, ":"))) /* gecos */
lib/libc/gen/pw_scan.c
191
if (!(pw->pw_dir = strsep(&bp, ":"))) /* directory */
lib/libc/gen/pw_scan.c
196
if (!(pw->pw_shell = strsep(&bp, ":"))) /* shell */
lib/libc/gen/pw_scan.c
215
if ((p = strsep(&bp, ":"))) { /* too many */
lib/libc/gen/pw_scan.c
81
__pw_scan(char *bp, struct passwd *pw, int flags)
lib/libc/gen/pw_scan.c
92
if (!(pw->pw_name = strsep(&bp, ":"))) /* login */
lib/libc/gen/pw_scan.c
98
if (!(pw->pw_passwd = strsep(&bp, ":"))) /* passwd */
lib/libc/locale/collate.c
457
wchar_t *bp, *fp, c;
lib/libc/locale/collate.c
463
bp = tr;
lib/libc/locale/collate.c
465
while (bp < fp) {
lib/libc/locale/collate.c
466
c = *bp;
lib/libc/locale/collate.c
467
*bp++ = *fp;
lib/libc/locale/collate.c
604
wchar_t *bp, *fp, c;
lib/libc/locale/collate.c
610
bp = tr;
lib/libc/locale/collate.c
612
while (bp < fp) {
lib/libc/locale/collate.c
613
c = *bp;
lib/libc/locale/collate.c
614
*bp++ = *fp;
lib/libc/nameser/ns_name.c
1025
encode_bitsring(const char **bp, const char *end, unsigned char **labelp,
lib/libc/nameser/ns_name.c
1029
const char *cp = *bp;
lib/libc/nameser/ns_name.c
1124
*bp = cp;
lib/libc/nameser/ns_name.c
217
u_char *label, *bp, *eom;
lib/libc/nameser/ns_name.c
222
bp = dst;
lib/libc/nameser/ns_name.c
224
label = bp++;
lib/libc/nameser/ns_name.c
234
&label, &bp, eom))
lib/libc/nameser/ns_name.c
240
label = bp++;
lib/libc/nameser/ns_name.c
274
c = (bp - label - 1);
lib/libc/nameser/ns_name.c
287
if (bp >= eom) {
lib/libc/nameser/ns_name.c
291
*bp++ = '\0';
lib/libc/nameser/ns_name.c
293
if ((bp - dst) > MAXCDNAME) {
lib/libc/nameser/ns_name.c
298
*dstlen = (bp - dst);
lib/libc/nameser/ns_name.c
305
label = bp++;
lib/libc/nameser/ns_name.c
308
if (bp >= eom) {
lib/libc/nameser/ns_name.c
312
*bp++ = (u_char)c;
lib/libc/nameser/ns_name.c
314
c = (bp - label - 1);
lib/libc/nameser/ns_name.c
326
if (bp >= eom) {
lib/libc/nameser/ns_name.c
330
*bp++ = 0;
lib/libc/nameser/ns_name.c
332
if ((bp - dst) > MAXCDNAME) { /*%< src too big */
lib/libc/nameser/ns_name.c
337
*dstlen = (bp - dst);
lib/libc/net/getaddrinfo.c
1992
char *bp, *ep;
lib/libc/net/getaddrinfo.c
2019
bp = hostbuf;
lib/libc/net/getaddrinfo.c
2026
n = dn_expand(answer->buf, eom, cp, bp, ep - bp);
lib/libc/net/getaddrinfo.c
2027
if ((n < 0) || !(*name_ok)(bp)) {
lib/libc/net/getaddrinfo.c
2037
n = strlen(bp) + 1; /* for the \0 */
lib/libc/net/getaddrinfo.c
2042
canonname = bp;
lib/libc/net/getaddrinfo.c
2043
bp += n;
lib/libc/net/getaddrinfo.c
2050
n = dn_expand(answer->buf, eom, cp, bp, ep - bp);
lib/libc/net/getaddrinfo.c
2051
if ((n < 0) || !(*name_ok)(bp)) {
lib/libc/net/getaddrinfo.c
2077
if (n > ep - bp || n >= MAXHOSTNAMELEN) {
lib/libc/net/getaddrinfo.c
2081
strlcpy(bp, tbuf, ep - bp);
lib/libc/net/getaddrinfo.c
2082
canonname = bp;
lib/libc/net/getaddrinfo.c
2083
bp += n;
lib/libc/net/getaddrinfo.c
2106
if (strcasecmp(canonname, bp) != 0) {
lib/libc/net/getaddrinfo.c
2109
AskedForGot, canonname, bp);
lib/libc/net/getaddrinfo.c
2135
canonname = bp;
lib/libc/net/getaddrinfo.c
2136
nn = strlen(bp) + 1; /* for the \0 */
lib/libc/net/getaddrinfo.c
2137
bp += nn;
lib/libc/net/gethostbydns.c
144
char *bp, *ep, **ap, **hap;
lib/libc/net/gethostbydns.c
173
bp = hed->hostbuf;
lib/libc/net/gethostbydns.c
181
n = dn_expand(answer->buf, eom, cp, bp, ep - bp);
lib/libc/net/gethostbydns.c
182
if ((n < 0) || !(*name_ok)(bp)) {
lib/libc/net/gethostbydns.c
192
n = strlen(bp) + 1; /* for the \0 */
lib/libc/net/gethostbydns.c
197
he->h_name = bp;
lib/libc/net/gethostbydns.c
198
bp += n;
lib/libc/net/gethostbydns.c
212
n = dn_expand(answer->buf, eom, cp, bp, ep - bp);
lib/libc/net/gethostbydns.c
213
if ((n < 0) || !(*name_ok)(bp)) {
lib/libc/net/gethostbydns.c
249
*ap++ = bp;
lib/libc/net/gethostbydns.c
250
n = strlen(bp) + 1; /* for the \0 */
lib/libc/net/gethostbydns.c
255
bp += n;
lib/libc/net/gethostbydns.c
258
if (n > ep - bp || n >= MAXHOSTNAMELEN) {
lib/libc/net/gethostbydns.c
262
strcpy(bp, tbuf);
lib/libc/net/gethostbydns.c
263
he->h_name = bp;
lib/libc/net/gethostbydns.c
264
bp += n;
lib/libc/net/gethostbydns.c
280
if (n > ep - bp || n >= MAXHOSTNAMELEN) {
lib/libc/net/gethostbydns.c
284
strcpy(bp, tbuf);
lib/libc/net/gethostbydns.c
285
tname = bp;
lib/libc/net/gethostbydns.c
286
bp += n;
lib/libc/net/gethostbydns.c
303
if (strcasecmp(tname, bp) != 0) {
lib/libc/net/gethostbydns.c
306
AskedForGot, qname, bp);
lib/libc/net/gethostbydns.c
311
n = dn_expand(answer->buf, eom, cp, bp, ep - bp);
lib/libc/net/gethostbydns.c
312
if ((n < 0) || !res_hnok(bp)) {
lib/libc/net/gethostbydns.c
323
he->h_name = bp;
lib/libc/net/gethostbydns.c
325
*ap++ = bp;
lib/libc/net/gethostbydns.c
329
n = strlen(bp) + 1; /* for the \0 */
lib/libc/net/gethostbydns.c
334
bp += n;
lib/libc/net/gethostbydns.c
338
he->h_name = bp;
lib/libc/net/gethostbydns.c
340
n = strlen(bp) + 1; /* for the \0 */
lib/libc/net/gethostbydns.c
345
bp += n;
lib/libc/net/gethostbydns.c
346
_map_v4v6_hostent(he, &bp, ep);
lib/libc/net/gethostbydns.c
353
if (strcasecmp(he->h_name, bp) != 0) {
lib/libc/net/gethostbydns.c
356
AskedForGot, he->h_name, bp);
lib/libc/net/gethostbydns.c
368
he->h_name = bp;
lib/libc/net/gethostbydns.c
369
nn = strlen(bp) + 1; /* for the \0 */
lib/libc/net/gethostbydns.c
370
bp += nn;
lib/libc/net/gethostbydns.c
373
bp += sizeof(align) - ((u_long)bp % sizeof(align));
lib/libc/net/gethostbydns.c
375
if (bp + n >= ep) {
lib/libc/net/gethostbydns.c
387
memcpy(*hap++ = bp, cp, n);
lib/libc/net/gethostbydns.c
388
bp += n;
lib/libc/net/gethostbydns.c
419
if (n > ep - bp || n >= MAXHOSTNAMELEN)
lib/libc/net/gethostbydns.c
421
strcpy(bp, qname);
lib/libc/net/gethostbydns.c
422
he->h_name = bp;
lib/libc/net/gethostbydns.c
423
bp += n;
lib/libc/net/gethostbydns.c
426
_map_v4v6_hostent(he, &bp, ep);
lib/libc/net/gethostbyht.c
135
bp = hed->hostbuf;
lib/libc/net/gethostbyht.c
137
he->h_name = bp;
lib/libc/net/gethostbyht.c
142
if (ep - bp < len) {
lib/libc/net/gethostbyht.c
146
strlcpy(bp, cp, ep - bp);
lib/libc/net/gethostbyht.c
147
bp += len;
lib/libc/net/gethostbyht.c
159
if (ep - bp < len)
lib/libc/net/gethostbyht.c
161
strlcpy(bp, cp, ep - bp);
lib/libc/net/gethostbyht.c
162
*q++ = bp;
lib/libc/net/gethostbyht.c
163
bp += len;
lib/libc/net/gethostbyht.c
90
char *p, *bp, *ep;
lib/libc/net/gethostbynis.c
126
bp = hed->hostbuf;
lib/libc/net/gethostbynis.c
128
he->h_name = bp;
lib/libc/net/gethostbynis.c
134
if (ep - bp < size) {
lib/libc/net/gethostbynis.c
138
strlcpy(bp, cp, ep - bp);
lib/libc/net/gethostbynis.c
139
bp += size;
lib/libc/net/gethostbynis.c
152
if (ep - bp < size)
lib/libc/net/gethostbynis.c
154
strlcpy(bp, cp, ep - bp);
lib/libc/net/gethostbynis.c
155
*q++ = bp;
lib/libc/net/gethostbynis.c
156
bp += size;
lib/libc/net/gethostbynis.c
54
char *p, *bp, *ep;
lib/libc/net/getnetbydns.c
163
char *in, *bp, *ep, **ap;
lib/libc/net/getnetbydns.c
183
bp = ned->netbuf;
lib/libc/net/getnetbydns.c
200
n = dn_expand(answer->buf, eom, cp, bp, ep - bp);
lib/libc/net/getnetbydns.c
201
if ((n < 0) || !res_dnok(bp))
lib/libc/net/getnetbydns.c
205
(void)strncpy(&ans[0], bp, sizeof(ans) - 1);
lib/libc/net/getnetbydns.c
212
n = dn_expand(answer->buf, eom, cp, bp, ep - bp);
lib/libc/net/getnetbydns.c
213
if ((n < 0) || !res_hnok(bp)) {
lib/libc/net/getnetbydns.c
218
*ap++ = bp;
lib/libc/net/getnetbydns.c
219
n = strlen(bp) + 1;
lib/libc/net/getnetbydns.c
220
bp += n;
lib/libc/net/getnetbydns.c
235
if (ep - bp < n) {
lib/libc/net/getnetbydns.c
240
strlcpy(bp, ans, ep - bp);
lib/libc/net/getnetbydns.c
241
ne->n_name = bp;
lib/libc/net/getnetbyht.c
100
ne->n_name = bp;
lib/libc/net/getnetbyht.c
106
if (ep - bp < len) {
lib/libc/net/getnetbyht.c
110
strlcpy(bp, p, ep - bp);
lib/libc/net/getnetbyht.c
111
bp += len;
lib/libc/net/getnetbyht.c
133
if (ep - bp < len)
lib/libc/net/getnetbyht.c
135
strlcpy(bp, cp, ep - bp);
lib/libc/net/getnetbyht.c
136
*q++ = bp;
lib/libc/net/getnetbyht.c
137
bp += len;
lib/libc/net/getnetbyht.c
81
char *p, *bp, *ep;
lib/libc/net/getnetbyht.c
98
bp = ned->netbuf;
lib/libc/net/getnetbynis.c
120
if (ep - bp < len)
lib/libc/net/getnetbynis.c
122
strlcpy(bp, cp, ep - bp);
lib/libc/net/getnetbynis.c
123
*q++ = bp;
lib/libc/net/getnetbynis.c
124
bp += len;
lib/libc/net/getnetbynis.c
54
char *p, *bp, *ep;
lib/libc/net/getnetbynis.c
88
bp = ned->netbuf;
lib/libc/net/getnetbynis.c
91
if (ep - bp < len) {
lib/libc/net/getnetbynis.c
95
strlcpy(bp, result, ep - bp);
lib/libc/net/getnetbynis.c
96
ne->n_name = bp;
lib/libc/net/getnetbynis.c
97
bp += len;
lib/libc/net/ip6opt.c
111
u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
lib/libc/net/ip6opt.c
125
if (bp == (u_char *)eh) {
lib/libc/net/ip6opt.c
126
bp += 2;
lib/libc/net/ip6opt.c
131
off = bp - (u_char *)eh;
lib/libc/net/ip6opt.c
136
inet6_insert_padopt(bp, padlen);
lib/libc/net/ip6opt.c
138
bp += padlen;
lib/libc/net/ip6opt.c
145
memcpy(bp, typep, optlen);
lib/libc/net/ip6opt.c
146
bp += optlen;
lib/libc/net/ip6opt.c
150
off = bp - (u_char *)eh;
lib/libc/net/ip6opt.c
152
inet6_insert_padopt(bp, padlen);
lib/libc/net/ip6opt.c
153
bp += padlen;
lib/libc/net/ip6opt.c
157
eh->ip6e_len = ((bp - (u_char *)eh) >> 3) - 1;
lib/libc/net/ip6opt.c
179
u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len;
lib/libc/net/ip6opt.c
194
if (bp == (u_char *)eh) {
lib/libc/net/ip6opt.c
195
bp += 2;
lib/libc/net/ip6opt.c
200
off = bp - (u_char *)eh;
lib/libc/net/ip6opt.c
205
inet6_insert_padopt(bp, padlen);
lib/libc/net/ip6opt.c
207
bp += padlen;
lib/libc/net/ip6opt.c
210
retval = bp;
lib/libc/net/ip6opt.c
211
bp += datalen;
lib/libc/net/ip6opt.c
215
off = bp - (u_char *)eh;
lib/libc/net/ip6opt.c
217
inet6_insert_padopt(bp, padlen);
lib/libc/net/ip6opt.c
218
bp += padlen;
lib/libc/net/ip6opt.c
222
eh->ip6e_len = ((bp - (u_char *)eh) >> 3) - 1;
lib/libc/net/ip6opt.c
80
inet6_option_init(void *bp, struct cmsghdr **cmsgp, int type)
lib/libc/net/ip6opt.c
82
struct cmsghdr *ch = (struct cmsghdr *)bp;
lib/libc/net/rthdr.c
287
inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments)
lib/libc/net/rthdr.c
289
struct ip6_rthdr *rth = (struct ip6_rthdr *)bp;
lib/libc/net/rthdr.c
301
memset(bp, 0, bp_len);
lib/libc/net/rthdr.c
312
return (bp);
lib/libc/net/rthdr.c
316
inet6_rth_add(void *bp, const struct in6_addr *addr)
lib/libc/net/rthdr.c
318
struct ip6_rthdr *rth = (struct ip6_rthdr *)bp;
lib/libc/net/rthdr.c
382
inet6_rth_segments(const void *bp)
lib/libc/net/rthdr.c
384
struct ip6_rthdr *rh = (struct ip6_rthdr *)bp;
lib/libc/net/rthdr.c
390
rh0 = (struct ip6_rthdr0 *)bp;
lib/libc/net/rthdr.c
407
inet6_rth_getaddr(const void *bp, int idx)
lib/libc/net/rthdr.c
409
struct ip6_rthdr *rh = (struct ip6_rthdr *)bp;
lib/libc/net/rthdr.c
415
rh0 = (struct ip6_rthdr0 *)bp;
lib/libc/net/rthdr.c
67
inet6_rthdr_init(void *bp, int type)
lib/libc/net/rthdr.c
69
struct cmsghdr *ch = (struct cmsghdr *)bp;
lib/libc/string/wcscoll.c
102
bp = tr2;
lib/libc/string/wcscoll.c
104
while (bp < fp) {
lib/libc/string/wcscoll.c
105
c = *bp;
lib/libc/string/wcscoll.c
106
*bp++ = *fp;
lib/libc/string/wcscoll.c
88
wchar_t *bp, *fp, c;
lib/libc/string/wcscoll.c
92
bp = tr1;
lib/libc/string/wcscoll.c
94
while (bp < fp) {
lib/libc/string/wcscoll.c
95
c = *bp;
lib/libc/string/wcscoll.c
96
*bp++ = *fp;
lib/libc/xdr/xdr.c
453
xdr_bool(XDR *xdrs, bool_t *bp)
lib/libc/xdr/xdr.c
460
lb = *bp ? XDR_TRUE : XDR_FALSE;
lib/libc/xdr/xdr.c
467
*bp = (lb == XDR_FALSE) ? FALSE : TRUE;
lib/libc/xdr/xdr_sizeof.c
57
x_putbytes(XDR *xdrs, const char *bp, u_int len)
lib/libgssapi/gss_oid_to_str.c
100
strcat(bp, numstr);
lib/libgssapi/gss_oid_to_str.c
107
strcat(bp, numstr);
lib/libgssapi/gss_oid_to_str.c
111
strcat(bp, "}");
lib/libgssapi/gss_oid_to_str.c
112
oid_str->length = strlen(bp)+1;
lib/libgssapi/gss_oid_to_str.c
113
oid_str->value = (void *) bp;
lib/libgssapi/gss_oid_to_str.c
53
char *bp;
lib/libgssapi/gss_oid_to_str.c
94
if ((bp = (char *) malloc(string_length))) {
lib/libgssapi/gss_oid_to_str.c
95
strcpy(bp, "{ ");
lib/libgssapi/gss_oid_to_str.c
98
strcat(bp, numstr);
lib/libkvm/kvm_proc.c
106
struct kinfo_proc *bp, int maxcnt)
lib/libkvm/kvm_proc.c
480
bcopy(&kinfo_proc, bp, sizeof(kinfo_proc));
lib/libkvm/kvm_proc.c
481
++bp;
lib/libkvm/kvm_proc.c
496
struct kinfo_proc *bp = kd->procbase;
lib/libkvm/kvm_proc.c
504
acnt = kvm_proclist(kd, what, arg, p, bp, maxcnt);
lib/libkvm/kvm_proc.c
513
zcnt = kvm_proclist(kd, what, arg, p, bp + acnt, maxcnt - acnt);
lib/libpathconv/abs2rel.c
43
const char *pp, *bp, *branch;
lib/libpathconv/abs2rel.c
64
for (pp = path, bp = base; *pp && *bp && *pp == *bp; pp++, bp++)
lib/libpathconv/abs2rel.c
68
(*bp == 0 || (*bp == '/' && *(bp + 1) == 0))) {
lib/libpathconv/abs2rel.c
78
if ((*pp == 0 && *bp == '/') || (*pp == '/' && *bp == 0))
lib/libpathconv/abs2rel.c
84
for (bp = base + (branch - path); *bp; bp++)
lib/libpathconv/abs2rel.c
85
if (*bp == '/' && *(bp + 1) != 0) {
lib/libpathconv/rel2abs.c
101
while (bp > base && *--bp != '/')
lib/libpathconv/rel2abs.c
107
while (bp > base && *--bp != '/')
lib/libpathconv/rel2abs.c
115
length = bp - base;
lib/libpathconv/rel2abs.c
43
const char *pp, *bp;
lib/libpathconv/rel2abs.c
92
bp = base + length;
lib/libpathconv/rel2abs.c
93
if (*(bp - 1) == '/')
lib/libpathconv/rel2abs.c
94
--bp;
lib/libprocstat/libprocstat.c
1889
char *buf, *bp, *eb;
lib/libprocstat/libprocstat.c
1906
bp = buf;
lib/libprocstat/libprocstat.c
1908
while (bp < eb) {
lib/libprocstat/libprocstat.c
1909
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
lib/libprocstat/libprocstat.c
1912
bp += kv->kve_structsize;
lib/libprocstat/libprocstat.c
1921
bp = buf;
lib/libprocstat/libprocstat.c
1925
while (bp < eb) {
lib/libprocstat/libprocstat.c
1926
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
lib/libprocstat/libprocstat.c
1932
bp += kv->kve_structsize;
lib/libprocstat/libprocstat.c
801
char *buf, *bp, *eb;
lib/libprocstat/libprocstat.c
817
bp = buf;
lib/libprocstat/libprocstat.c
819
while (bp < eb) {
lib/libprocstat/libprocstat.c
820
kf = (struct kinfo_file *)(uintptr_t)bp;
lib/libprocstat/libprocstat.c
823
bp += kf->kf_structsize;
lib/libprocstat/libprocstat.c
832
bp = buf;
lib/libprocstat/libprocstat.c
836
while (bp < eb) {
lib/libprocstat/libprocstat.c
837
kf = (struct kinfo_file *)(uintptr_t)bp;
lib/libprocstat/libprocstat.c
843
bp += kf->kf_structsize;
lib/librpcsec_gss/svc_rpcsec_gss.c
497
char *bp;
lib/librpcsec_gss/svc_rpcsec_gss.c
532
if ((bp = (char *) mem_alloc(string_length))) {
lib/librpcsec_gss/svc_rpcsec_gss.c
533
strcpy(bp, "{ ");
lib/librpcsec_gss/svc_rpcsec_gss.c
536
strcat(bp, numstr);
lib/librpcsec_gss/svc_rpcsec_gss.c
538
strcat(bp, numstr);
lib/librpcsec_gss/svc_rpcsec_gss.c
545
strcat(bp, numstr);
lib/librpcsec_gss/svc_rpcsec_gss.c
549
strcat(bp, "}");
lib/librpcsec_gss/svc_rpcsec_gss.c
550
oid_str->length = strlen(bp)+1;
lib/librpcsec_gss/svc_rpcsec_gss.c
551
oid_str->value = (void *) bp;
lib/libsecureboot/openpgp/dearmor.c
48
BIO *bp;
lib/libsecureboot/openpgp/dearmor.c
78
if ((bp = BIO_new_mem_buf(pem, (int)nbytes))) {
lib/libsecureboot/openpgp/dearmor.c
81
if (!PEM_read_bio(bp, &name, &header, &data, &llen))
lib/libsecureboot/openpgp/dearmor.c
83
BIO_free(bp);
lib/libsecureboot/vectx.c
218
unsigned char *bp = buf;
lib/libsecureboot/vectx.c
236
d = n = read(ctx->vec_fd, &bp[off], x);
lib/libsecureboot/vectx.c
262
ctx->vec_md->update(&ctx->vec_ctx.vtable, &bp[off], d);
lib/libutil/kinfo_getfile.c
17
char *buf, *bp, *eb;
lib/libutil/kinfo_getfile.c
45
bp = buf;
lib/libutil/kinfo_getfile.c
47
while (bp < eb) {
lib/libutil/kinfo_getfile.c
48
kf = (struct kinfo_file *)(uintptr_t)bp;
lib/libutil/kinfo_getfile.c
51
bp += kf->kf_structsize;
lib/libutil/kinfo_getfile.c
60
bp = buf;
lib/libutil/kinfo_getfile.c
64
while (bp < eb) {
lib/libutil/kinfo_getfile.c
65
kf = (struct kinfo_file *)(uintptr_t)bp;
lib/libutil/kinfo_getfile.c
71
bp += kf->kf_structsize;
lib/libutil/kinfo_getvmmap.c
17
char *buf, *bp, *eb;
lib/libutil/kinfo_getvmmap.c
41
bp = buf;
lib/libutil/kinfo_getvmmap.c
43
while (bp < eb) {
lib/libutil/kinfo_getvmmap.c
44
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
lib/libutil/kinfo_getvmmap.c
47
bp += kv->kve_structsize;
lib/libutil/kinfo_getvmmap.c
56
bp = buf;
lib/libutil/kinfo_getvmmap.c
60
while (bp < eb) {
lib/libutil/kinfo_getvmmap.c
61
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
lib/libutil/kinfo_getvmmap.c
67
bp += kv->kve_structsize;
lib/libutil/kinfo_getvmobject.c
39
char *buf, *bp, *ep;
lib/libutil/kinfo_getvmobject.c
66
bp = buf;
lib/libutil/kinfo_getvmobject.c
68
while (bp < ep) {
lib/libutil/kinfo_getvmobject.c
69
kvo = (struct kinfo_vmobject *)(uintptr_t)bp;
lib/libutil/kinfo_getvmobject.c
70
bp += kvo->kvo_structsize;
lib/libutil/kinfo_getvmobject.c
81
bp = buf;
lib/libutil/kinfo_getvmobject.c
83
while (bp < ep) {
lib/libutil/kinfo_getvmobject.c
84
kvo = (struct kinfo_vmobject *)(uintptr_t)bp;
lib/libutil/kinfo_getvmobject.c
86
bp += kvo->kvo_structsize;
lib/libutil/property.c
109
bp = 0;
lib/libutil/property.c
76
int bp, n, v, max;
lib/libutil/property.c
80
n = v = bp = max = 0;
lib/libutil/property.c
85
if (bp == max) {
lib/libutil/property.c
89
ch = buf[bp++];
lib/libutil/pw_util.c
669
char *bp;
lib/libutil/pw_util.c
671
if ((bp = strdup(line)) == NULL)
lib/libutil/pw_util.c
674
if (!__pw_scan(bp, &pw, flags)) {
lib/libutil/pw_util.c
675
free(bp);
lib/libutil/pw_util.c
679
free(bp);
lib/msun/ld128/e_powl.c
311
u = ax - bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
lib/msun/ld128/e_powl.c
312
v = one / (ax + bp[k]);
lib/msun/ld128/e_powl.c
321
t_h = ax + bp[k];
lib/msun/ld128/e_powl.c
326
t_l = ax - (t_h - bp[k]);
lib/msun/ld128/e_powl.c
67
static const long double bp[] = {
lib/msun/src/e_pow.c
222
u = ax-bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
lib/msun/src/e_pow.c
223
v = one/(ax+bp[k]);
lib/msun/src/e_pow.c
230
t_l = ax - (t_h-bp[k]);
lib/msun/src/e_pow.c
61
bp[] = {1.0, 1.5,},
lib/msun/src/e_powf.c
164
u = ax-bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
lib/msun/src/e_powf.c
165
v = one/(ax+bp[k]);
lib/msun/src/e_powf.c
173
t_l = ax - (t_h-bp[k]);
lib/msun/src/e_powf.c
20
bp[] = {1.0, 1.5,},
libexec/bootpd/bootpd.c
1012
struct bootp *bp = (struct bootp *) pktbuf;
libexec/bootpd/bootpd.c
1040
} else if (bp->bp_ciaddr.s_addr) {
libexec/bootpd/bootpd.c
1041
dst = bp->bp_ciaddr;
libexec/bootpd/bootpd.c
1042
} else if (bp->bp_giaddr.s_addr && forward == 0) {
libexec/bootpd/bootpd.c
1043
dst = bp->bp_giaddr;
libexec/bootpd/bootpd.c
1050
dst = bp->bp_yiaddr;
libexec/bootpd/bootpd.c
1051
ha = bp->bp_chaddr;
libexec/bootpd/bootpd.c
1052
len = bp->bp_hlen;
libexec/bootpd/bootpd.c
1055
haf = (int) bp->bp_htype;
libexec/bootpd/bootpd.c
1068
(bp->bp_siaddr.s_addr == 0))
libexec/bootpd/bootpd.c
1094
bp->bp_siaddr = siaddr;
libexec/bootpd/bootpd.c
1154
dovend_cmu(struct bootp *bp, struct host *hp)
libexec/bootpd/bootpd.c
1162
bzero(bp->bp_vend, sizeof(bp->bp_vend));
libexec/bootpd/bootpd.c
1168
vendp = (struct cmu_vend *) bp->bp_vend;
libexec/bootpd/bootpd.c
1222
dovend_rfc1048(struct bootp *bp, struct host *hp, int32 bootsize)
libexec/bootpd/bootpd.c
1229
vp = bp->bp_vend;
libexec/bootpd/bootpd.c
1239
if (pktlen > sizeof(*bp)) {
libexec/bootpd/bootpd.c
1280
if (msgsz > sizeof(*bp) + BP_MSG_OVERHEAD) {
libexec/bootpd/bootpd.c
1288
if (pktlen < sizeof(*bp)) {
libexec/bootpd/bootpd.c
1290
pktlen = sizeof(*bp);
libexec/bootpd/bootpd.c
1292
bytesleft = ((byte*)bp + pktlen) - vp;
libexec/bootpd/bootpd.c
1293
if (pktlen > sizeof(*bp)) {
libexec/bootpd/bootpd.c
173
struct bootp *bp;
libexec/bootpd/bootpd.c
209
bp = (struct bootp *) pktbuf;
libexec/bootpd/bootpd.c
554
switch (bp->bp_op) {
libexec/bootpd/bootpd.c
619
struct bootp *bp = (struct bootp *) pktbuf;
libexec/bootpd/bootpd.c
630
if (bp->bp_htype >= hwinfocnt) {
libexec/bootpd/bootpd.c
631
report(LOG_NOTICE, "bad hw addr type %u", bp->bp_htype);
libexec/bootpd/bootpd.c
634
bp->bp_file[sizeof(bp->bp_file)-1] = '\0';
libexec/bootpd/bootpd.c
643
if (strlen(bp->bp_sname)) {
libexec/bootpd/bootpd.c
644
if (strcmp(bp->bp_sname, hostname)) {
libexec/bootpd/bootpd.c
648
bp->bp_sname, netname(bp->bp_htype),
libexec/bootpd/bootpd.c
649
haddrtoa(bp->bp_chaddr, bp->bp_hlen));
libexec/bootpd/bootpd.c
654
strcpy(bp->bp_sname, hostname);
libexec/bootpd/bootpd.c
658
bp->bp_op = BOOTREPLY;
libexec/bootpd/bootpd.c
659
if (bp->bp_ciaddr.s_addr == 0) {
libexec/bootpd/bootpd.c
666
netname(bp->bp_htype),
libexec/bootpd/bootpd.c
667
haddrtoa(bp->bp_chaddr, bp->bp_hlen));
libexec/bootpd/bootpd.c
669
hlen = haddrlength(bp->bp_htype);
libexec/bootpd/bootpd.c
670
if (hlen != bp->bp_hlen) {
libexec/bootpd/bootpd.c
672
netname(bp->bp_htype),
libexec/bootpd/bootpd.c
673
haddrtoa(bp->bp_chaddr, hlen));
libexec/bootpd/bootpd.c
675
dummyhost.htype = bp->bp_htype;
libexec/bootpd/bootpd.c
676
bcopy(bp->bp_chaddr, dummyhost.haddr, hlen);
libexec/bootpd/bootpd.c
677
hashcode = hash_HashFunction(bp->bp_chaddr, hlen);
libexec/bootpd/bootpd.c
681
bp->bp_htype == HTYPE_IEEE802)
libexec/bootpd/bootpd.c
684
haddr_conv802(bp->bp_chaddr, dummyhost.haddr, hlen);
libexec/bootpd/bootpd.c
688
haddrtoa(dummyhost.haddr, bp->bp_hlen));
libexec/bootpd/bootpd.c
700
netname(bp->bp_htype),
libexec/bootpd/bootpd.c
701
haddrtoa(bp->bp_chaddr, bp->bp_hlen));
libexec/bootpd/bootpd.c
704
(bp->bp_yiaddr).s_addr = hp->iaddr.s_addr;
libexec/bootpd/bootpd.c
713
inet_ntoa(bp->bp_ciaddr));
libexec/bootpd/bootpd.c
715
dummyhost.iaddr.s_addr = bp->bp_ciaddr.s_addr;
libexec/bootpd/bootpd.c
716
hashcode = hash_HashFunction((u_char *) &(bp->bp_ciaddr.s_addr), 4);
libexec/bootpd/bootpd.c
722
inet_ntoa(bp->bp_ciaddr));
libexec/bootpd/bootpd.c
738
u_int32 t = (u_int32) ntohs(bp->bp_secs);
libexec/bootpd/bootpd.c
778
(bp->bp_siaddr).s_addr = (hp->flags.bootserver) ?
libexec/bootpd/bootpd.c
790
if (strcmp(bp->bp_file, "sunboot14") == 0)
libexec/bootpd/bootpd.c
791
bp->bp_file[0] = '\0'; /* treat it as unspecified */
libexec/bootpd/bootpd.c
846
if (bp->bp_file[0]) {
libexec/bootpd/bootpd.c
847
homedir = bp->bp_file;
libexec/bootpd/bootpd.c
901
if (bp->bp_file[0]) {
libexec/bootpd/bootpd.c
915
bzero(bp->bp_file, sizeof(bp->bp_file));
libexec/bootpd/bootpd.c
929
strncpy(bp->bp_file, clntpath, BP_FILE_LEN);
libexec/bootpd/bootpd.c
944
(int) ((bp->bp_vend)[0]),
libexec/bootpd/bootpd.c
945
(int) ((bp->bp_vend)[1]),
libexec/bootpd/bootpd.c
946
(int) ((bp->bp_vend)[2]),
libexec/bootpd/bootpd.c
947
(int) ((bp->bp_vend)[3]));
libexec/bootpd/bootpd.c
956
bcopy(hp->vm_cookie, bp->bp_vend, 4);
libexec/bootpd/bootpd.c
962
if (!bcmp(bp->bp_vend, vm_rfc1048, 4)) {
libexec/bootpd/bootpd.c
964
dovend_rfc1048(bp, hp, bootsize);
libexec/bootpd/bootpd.c
970
else if (!bcmp(bp->bp_vend, vm_cmu, 4)) {
libexec/bootpd/bootpd.c
971
dovend_cmu(bp, hp);
libexec/bootpd/bootpgw/bootpgw.c
147
struct bootp *bp;
libexec/bootpd/bootpgw/bootpgw.c
178
bp = (struct bootp *) pktbuf;
libexec/bootpd/bootpgw/bootpgw.c
467
switch (bp->bp_op) {
libexec/bootpd/bootpgw/bootpgw.c
512
struct bootp *bp = (struct bootp *) pktbuf;
libexec/bootpd/bootpgw/bootpgw.c
523
secs = ntohs(bp->bp_secs);
libexec/bootpd/bootpgw/bootpgw.c
528
hops = bp->bp_hops;
libexec/bootpd/bootpgw/bootpgw.c
534
bp->bp_hops = hops;
libexec/bootpd/bootpgw/bootpgw.c
543
if (bp->bp_giaddr.s_addr == 0) {
libexec/bootpd/bootpgw/bootpgw.c
560
bp->bp_giaddr = sip->sin_addr;
libexec/bootpd/bootpgw/bootpgw.c
573
bp->bp_giaddr = my_ip_addr;
libexec/bootpd/bootpgw/bootpgw.c
603
struct bootp *bp = (struct bootp *) pktbuf;
libexec/bootpd/bootpgw/bootpgw.c
611
inet_ntoa(bp->bp_yiaddr));
libexec/bootpd/bootpgw/bootpgw.c
614
ifr = getif(s, &(bp->bp_yiaddr));
libexec/bootpd/bootpgw/bootpgw.c
617
inet_ntoa(bp->bp_yiaddr));
libexec/bootpd/bootpgw/bootpgw.c
629
bp->bp_giaddr = sip->sin_addr;
libexec/bootpd/bootpgw/bootpgw.c
634
send_addr.sin_addr = bp->bp_yiaddr;
libexec/bootpd/bootpgw/bootpgw.c
639
ha = bp->bp_chaddr;
libexec/bootpd/bootpgw/bootpgw.c
640
len = bp->bp_hlen;
libexec/bootpd/bootpgw/bootpgw.c
645
haf = (int) bp->bp_htype;
libexec/bootpd/dumptab.c
291
u_char *bp = generic->data;
libexec/bootpd/dumptab.c
292
u_char *ep = bp + generic->length;
libexec/bootpd/dumptab.c
296
while (bp < ep) {
libexec/bootpd/dumptab.c
297
tag = *bp++;
libexec/bootpd/dumptab.c
302
len = *bp++;
libexec/bootpd/dumptab.c
303
if (bp + len > ep) {
libexec/bootpd/dumptab.c
309
fprintf(fp, "%02X", *bp);
libexec/bootpd/dumptab.c
310
bp++;
libexec/bootpd/tools/bootptest/bootptest.c
131
struct bootp *bp;
libexec/bootpd/tools/bootptest/bootptest.c
300
bp = (struct bootp *) sndbuf;
libexec/bootpd/tools/bootptest/bootptest.c
301
bzero(bp, sizeof(*bp));
libexec/bootpd/tools/bootptest/bootptest.c
302
bp->bp_op = BOOTREQUEST;
libexec/bootpd/tools/bootptest/bootptest.c
304
bp->bp_xid = (u_int32) htonl(xid);
libexec/bootpd/tools/bootptest/bootptest.c
306
strncpy(bp->bp_file, bp_file, BP_FILE_LEN);
libexec/bootpd/tools/bootptest/bootptest.c
324
bp->bp_htype = 1;
libexec/bootpd/tools/bootptest/bootptest.c
325
bp->bp_hlen = 6;
libexec/bootpd/tools/bootptest/bootptest.c
326
bcopy(eaddr, bp->bp_chaddr, bp->bp_hlen);
libexec/bootpd/tools/bootptest/bootptest.c
334
bcopy(hep->h_addr, &bp->bp_ciaddr, hep->h_length);
libexec/bootpd/tools/bootptest/bootptest.c
340
bcopy((char*)&vend_magic, bp->bp_vend, 4);
libexec/bootpd/tools/bootptest/bootptest.c
342
bp->bp_vend[4] = TAG_END;
libexec/bootpd/tools/bootptest/bootptest.c
348
snaplen = sizeof(*bp);
libexec/bootpd/tools/bootptest/bootptest.c
356
n = BUFLEN - sizeof(*bp) + BP_VEND_LEN;
libexec/bootpd/tools/bootptest/bootptest.c
357
n = read(fd, bp->bp_vend, n);
libexec/bootpd/tools/bootptest/bootptest.c
379
bp->bp_secs = secs = 0;
libexec/bootpd/tools/bootptest/bootptest.c
404
bp->bp_secs = htons(secs);
libexec/bootpd/tools/bootptest/bootptest.h
14
void bootp_print(struct bootp *bp, int length, u_short sport,
libexec/bootpd/tools/bootptest/print-bootp.c
102
TCHECK(bp->bp_chaddr[0], 6);
libexec/bootpd/tools/bootptest/print-bootp.c
104
if (bp->bp_op == BOOTREQUEST)
libexec/bootpd/tools/bootptest/print-bootp.c
106
else if (bp->bp_op == BOOTREPLY)
libexec/bootpd/tools/bootptest/print-bootp.c
110
if (e == NULL || bcmp((char *) bp->bp_chaddr, e, 6))
libexec/bootpd/tools/bootptest/print-bootp.c
111
dump_hex(bp->bp_chaddr, bp->bp_hlen);
libexec/bootpd/tools/bootptest/print-bootp.c
114
if (bp->bp_hops)
libexec/bootpd/tools/bootptest/print-bootp.c
115
printf(" hops:%d", bp->bp_hops);
libexec/bootpd/tools/bootptest/print-bootp.c
117
if (bp->bp_xid)
libexec/bootpd/tools/bootptest/print-bootp.c
118
printf(" xid:%ld", (long)ntohl(bp->bp_xid));
libexec/bootpd/tools/bootptest/print-bootp.c
120
if (bp->bp_secs)
libexec/bootpd/tools/bootptest/print-bootp.c
121
printf(" secs:%d", ntohs(bp->bp_secs));
libexec/bootpd/tools/bootptest/print-bootp.c
124
TCHECK(bp->bp_ciaddr, sizeof(bp->bp_ciaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
125
if (bp->bp_ciaddr.s_addr)
libexec/bootpd/tools/bootptest/print-bootp.c
126
printf(" C:%s", ipaddr_string(&bp->bp_ciaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
129
TCHECK(bp->bp_yiaddr, sizeof(bp->bp_yiaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
130
if (bp->bp_yiaddr.s_addr)
libexec/bootpd/tools/bootptest/print-bootp.c
131
printf(" Y:%s", ipaddr_string(&bp->bp_yiaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
134
TCHECK(bp->bp_siaddr, sizeof(bp->bp_siaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
135
if (bp->bp_siaddr.s_addr)
libexec/bootpd/tools/bootptest/print-bootp.c
136
printf(" S:%s", ipaddr_string(&bp->bp_siaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
139
TCHECK(bp->bp_giaddr, sizeof(bp->bp_giaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
140
if (bp->bp_giaddr.s_addr)
libexec/bootpd/tools/bootptest/print-bootp.c
141
printf(" G:%s", ipaddr_string(&bp->bp_giaddr));
libexec/bootpd/tools/bootptest/print-bootp.c
143
TCHECK(bp->bp_sname[0], sizeof(bp->bp_sname));
libexec/bootpd/tools/bootptest/print-bootp.c
144
if (*bp->bp_sname) {
libexec/bootpd/tools/bootptest/print-bootp.c
146
if (printfn(bp->bp_sname, ep)) {
libexec/bootpd/tools/bootptest/print-bootp.c
151
TCHECK(bp->bp_file[0], sizeof(bp->bp_file));
libexec/bootpd/tools/bootptest/print-bootp.c
152
if (*bp->bp_file) {
libexec/bootpd/tools/bootptest/print-bootp.c
154
if (printfn(bp->bp_file, ep)) {
libexec/bootpd/tools/bootptest/print-bootp.c
163
vdlen = sizeof(bp->bp_vend);
libexec/bootpd/tools/bootptest/print-bootp.c
165
if (vdlen < (ep - bp->bp_vend))
libexec/bootpd/tools/bootptest/print-bootp.c
166
vdlen = (ep - bp->bp_vend);
libexec/bootpd/tools/bootptest/print-bootp.c
168
TCHECK(bp->bp_vend[0], vdlen);
libexec/bootpd/tools/bootptest/print-bootp.c
170
if (!bcmp(bp->bp_vend, vm_rfc1048, sizeof(u_int32)))
libexec/bootpd/tools/bootptest/print-bootp.c
171
rfc1048_print(bp->bp_vend, vdlen);
libexec/bootpd/tools/bootptest/print-bootp.c
172
else if (!bcmp(bp->bp_vend, vm_cmu, sizeof(u_int32)))
libexec/bootpd/tools/bootptest/print-bootp.c
173
cmu_print(bp->bp_vend, vdlen);
libexec/bootpd/tools/bootptest/print-bootp.c
175
other_print(bp->bp_vend, vdlen);
libexec/bootpd/tools/bootptest/print-bootp.c
272
rfc1048_print(u_char *bp, int length)
libexec/bootpd/tools/bootptest/print-bootp.c
285
bp += sizeof(int32);
libexec/bootpd/tools/bootptest/print-bootp.c
287
ep = bp + length;
libexec/bootpd/tools/bootptest/print-bootp.c
288
while (bp < ep) {
libexec/bootpd/tools/bootptest/print-bootp.c
289
tag = *bp++;
libexec/bootpd/tools/bootptest/print-bootp.c
303
len = *bp++;
libexec/bootpd/tools/bootptest/print-bootp.c
304
if (bp + len > ep) {
libexec/bootpd/tools/bootptest/print-bootp.c
306
printf(" |(%d>%td)", len, ep - bp);
libexec/bootpd/tools/bootptest/print-bootp.c
313
printfn(bp, bp + len);
libexec/bootpd/tools/bootptest/print-bootp.c
314
bp += len;
libexec/bootpd/tools/bootptest/print-bootp.c
320
bcopy((char *) bp, (char *) &us, 2);
libexec/bootpd/tools/bootptest/print-bootp.c
322
bp += 2;
libexec/bootpd/tools/bootptest/print-bootp.c
331
bcopy((char *) bp, (char *) &ul, 4);
libexec/bootpd/tools/bootptest/print-bootp.c
333
bp += 4;
libexec/bootpd/tools/bootptest/print-bootp.c
342
bcopy((char *) bp, (char *) &ia, 4);
libexec/bootpd/tools/bootptest/print-bootp.c
344
bp += 4;
libexec/bootpd/tools/bootptest/print-bootp.c
359
dump_hex(bp, len);
libexec/bootpd/tools/bootptest/print-bootp.c
360
if (isascii(*bp) && isprint(*bp)) {
libexec/bootpd/tools/bootptest/print-bootp.c
362
printfn(bp, bp + len);
libexec/bootpd/tools/bootptest/print-bootp.c
365
bp += len;
libexec/bootpd/tools/bootptest/print-bootp.c
372
cmu_print(u_char *bp, int length)
libexec/bootpd/tools/bootptest/print-bootp.c
378
v = (struct cmu_vend *) bp;
libexec/bootpd/tools/bootptest/print-bootp.c
418
other_print(u_char *bp, int length)
libexec/bootpd/tools/bootptest/print-bootp.c
424
ep = bp + length;
libexec/bootpd/tools/bootptest/print-bootp.c
427
for (zp = ep; zp > bp; zp--) {
libexec/bootpd/tools/bootptest/print-bootp.c
433
if (zp == bp) {
libexec/bootpd/tools/bootptest/print-bootp.c
444
while (bp < zp) {
libexec/bootpd/tools/bootptest/print-bootp.c
445
printf(".%02X", *bp);
libexec/bootpd/tools/bootptest/print-bootp.c
446
bp++;
libexec/bootpd/tools/bootptest/print-bootp.c
45
static void rfc1048_print(u_char *bp, int length);
libexec/bootpd/tools/bootptest/print-bootp.c
456
dump_hex(u_char *bp, int len)
libexec/bootpd/tools/bootptest/print-bootp.c
459
printf("%02X", *bp);
libexec/bootpd/tools/bootptest/print-bootp.c
46
static void cmu_print(u_char *bp, int length);
libexec/bootpd/tools/bootptest/print-bootp.c
460
bp++;
libexec/bootpd/tools/bootptest/print-bootp.c
47
static void other_print(u_char *bp, int length);
libexec/bootpd/tools/bootptest/print-bootp.c
48
static void dump_hex(u_char *bp, int len);
libexec/bootpd/tools/bootptest/print-bootp.c
54
bootp_print(struct bootp *bp, int length, u_short sport, u_short dport)
libexec/bootpd/tools/bootptest/print-bootp.c
71
switch (bp->bp_op) {
libexec/bootpd/tools/bootptest/print-bootp.c
86
printf(" bootp-#%d", bp->bp_op);
libexec/bootpd/tools/bootptest/print-bootp.c
90
if (bp->bp_htype != 1)
libexec/bootpd/tools/bootptest/print-bootp.c
91
printf(" htype:%d", bp->bp_htype);
libexec/bootpd/tools/bootptest/print-bootp.c
94
if (bp->bp_hlen != 6)
libexec/bootpd/tools/bootptest/print-bootp.c
95
printf(" hlen:%d", bp->bp_hlen);
libexec/bootpd/tools/bootptest/print-bootp.c
98
if (bp->bp_hlen) {
libexec/flua/libfreebsd/kenv/kenv.c
30
char *buf, *bp, *cp;
libexec/flua/libfreebsd/kenv/kenv.c
57
for (bp = buf; *bp != '\0'; bp += strlen(bp) + 1) {
libexec/flua/libfreebsd/kenv/kenv.c
58
cp = strchr(bp, '=');
libexec/flua/libfreebsd/kenv/kenv.c
63
lua_setfield(L, -2, bp);
libexec/flua/libfreebsd/kenv/kenv.c
64
bp = cp;
libexec/mknetid/parse_group.c
101
char *bp;
libexec/mknetid/parse_group.c
105
bp = line;
libexec/mknetid/parse_group.c
114
if ((_gr_group.gr_name = strsep(&bp, ":\n")) == NULL)
libexec/mknetid/parse_group.c
118
if ((_gr_group.gr_passwd = strsep(&bp, ":\n")) == NULL)
libexec/mknetid/parse_group.c
120
if (!(cp = strsep(&bp, ":\n")))
libexec/mknetid/parse_group.c
126
if (bp == NULL) /* !! Must check for this! */
libexec/mknetid/parse_group.c
128
for (m = _gr_group.gr_mem = members;; bp++) {
libexec/mknetid/parse_group.c
131
if (*bp == ',') {
libexec/mknetid/parse_group.c
133
*bp = '\0';
libexec/mknetid/parse_group.c
137
} else if (*bp == '\0' || *bp == '\n' || *bp == ' ') {
libexec/mknetid/parse_group.c
139
*bp = '\0';
libexec/mknetid/parse_group.c
144
cp = bp;
libexec/rbootd/bpf.c
292
static u_int8_t *bp = NULL, *ep = NULL;
libexec/rbootd/bpf.c
304
bp = BpfPkt;
libexec/rbootd/bpf.c
309
#define bhp ((struct bpf_hdr *)bp)
libexec/rbootd/bpf.c
314
if (bp < ep) {
libexec/rbootd/bpf.c
330
memmove((char *)&rconn->rmp, (char *)bp + hdrlen, caplen);
libexec/rbootd/bpf.c
332
bp += BPF_WORDALIGN(caplen + hdrlen);
libexec/tftpd/tftp-io.c
178
char *bp;
libexec/tftpd/tftp-io.c
193
bp = tp->th_stuff;
libexec/tftpd/tftp-io.c
194
strlcpy(bp, filename, sizeof(buf) - size);
libexec/tftpd/tftp-io.c
195
bp += strlen(filename);
libexec/tftpd/tftp-io.c
196
*bp = 0;
libexec/tftpd/tftp-io.c
197
bp++;
libexec/tftpd/tftp-io.c
200
strlcpy(bp, mode, sizeof(buf) - size);
libexec/tftpd/tftp-io.c
201
bp += strlen(mode);
libexec/tftpd/tftp-io.c
202
*bp = 0;
libexec/tftpd/tftp-io.c
203
bp++;
libexec/tftpd/tftp-io.c
207
size += make_options(peer, bp, sizeof(buf) - size);
libexec/tftpd/tftp-io.c
226
char *bp;
libexec/tftpd/tftp-io.c
241
bp = tp->th_stuff;
libexec/tftpd/tftp-io.c
242
strlcpy(bp, filename, sizeof(buf) - size);
libexec/tftpd/tftp-io.c
243
bp += strlen(filename);
libexec/tftpd/tftp-io.c
244
*bp = 0;
libexec/tftpd/tftp-io.c
245
bp++;
libexec/tftpd/tftp-io.c
248
strlcpy(bp, mode, sizeof(buf) - size);
libexec/tftpd/tftp-io.c
249
bp += strlen(mode);
libexec/tftpd/tftp-io.c
250
*bp = 0;
libexec/tftpd/tftp-io.c
251
bp++;
libexec/tftpd/tftp-io.c
256
size += make_options(peer, bp, sizeof(buf) - size);
libexec/tftpd/tftp-io.c
276
char *bp;
libexec/tftpd/tftp-io.c
289
bp = buf + 2;
libexec/tftpd/tftp-io.c
294
n = snprintf(bp, size, "%s%c%s", options[i].o_type,
libexec/tftpd/tftp-io.c
296
bp += n+1;
libexec/tftpd/tftp-io.c
304
size = bp - buf;
sbin/dhclient/hash.c
100
table->buckets[hashno] = bp;
sbin/dhclient/hash.c
106
struct hash_bucket *bp;
sbin/dhclient/hash.c
117
for (bp = table->buckets[hashno]; bp; bp = bp->next)
sbin/dhclient/hash.c
118
if (len == bp->len && !memcmp(bp->name, name, len))
sbin/dhclient/hash.c
119
return (bp->value);
sbin/dhclient/hash.c
81
struct hash_bucket *bp;
sbin/dhclient/hash.c
90
bp = new_hash_bucket();
sbin/dhclient/hash.c
92
if (!bp) {
sbin/dhclient/hash.c
96
bp->name = name;
sbin/dhclient/hash.c
97
bp->value = pointer;
sbin/dhclient/hash.c
98
bp->next = table->buckets[hashno];
sbin/dhclient/hash.c
99
bp->len = len;
sbin/dmesg/dmesg.c
112
if ((bp = malloc(buflen + 2)) == NULL)
sbin/dmesg/dmesg.c
114
if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1)
sbin/dmesg/dmesg.c
116
if (buflen > 0 && bp[buflen - 1] == '\0')
sbin/dmesg/dmesg.c
136
if ((bp = malloc(cur.msg_size + 2)) == NULL)
sbin/dmesg/dmesg.c
141
if (kvm_read(kd, (long)&cur.msg_ptr[bufpos], bp,
sbin/dmesg/dmesg.c
145
&bp[cur.msg_size - bufpos], bufpos) != (ssize_t)bufpos)
sbin/dmesg/dmesg.c
155
if (buflen == 0 || bp[buflen - 1] != '\n')
sbin/dmesg/dmesg.c
156
bp[buflen++] = '\n';
sbin/dmesg/dmesg.c
157
bp[buflen] = '\0';
sbin/dmesg/dmesg.c
167
p = bp;
sbin/dmesg/dmesg.c
168
ep = &bp[buflen];
sbin/dmesg/dmesg.c
67
char *bp, *ep, *memf, *nextp, *nlistf, *p, *q, *visbp;
sbin/dump/traverse.c
615
ufs1_daddr_t *bp;
sbin/dump/traverse.c
633
bp = &blkp[i / tbperdb];
sbin/dump/traverse.c
634
for (j = i; j < count; j += tbperdb, bp++)
sbin/dump/traverse.c
635
if (*bp != 0) {
sbin/dump/traverse.c
637
dumpblock(*bp, (int)sblock->fs_bsize);
sbin/dump/traverse.c
639
dumpblock(*bp, (count - j) * TP_BSIZE);
sbin/dump/traverse.c
652
ufs2_daddr_t *bp;
sbin/dump/traverse.c
688
bp = &blkp[i / tbperdb];
sbin/dump/traverse.c
689
for (j = i; j < count; j += tbperdb, bp++)
sbin/dump/traverse.c
690
if (*bp != 0) {
sbin/dump/traverse.c
692
dumpblock(*bp, (int)sblock->fs_bsize);
sbin/dump/traverse.c
694
dumpblock(*bp, (count - j) * TP_BSIZE);
sbin/dump/traverse.c
763
ufs2_daddr_t *bp;
sbin/dump/traverse.c
791
bp = &dp->dp2.di_extb[i / tbperdb];
sbin/dump/traverse.c
792
if (*bp != 0) {
sbin/dump/traverse.c
794
dumpblock(*bp, (int)sblock->fs_bsize);
sbin/dump/traverse.c
796
dumpblock(*bp, (blks - i) * TP_BSIZE);
sbin/fsck_ffs/dir.c
196
struct bufarea *bp;
sbin/fsck_ffs/dir.c
219
bp = getdirblk(idesc->id_blkno, blksiz);
sbin/fsck_ffs/dir.c
220
if (bp->b_errs != 0)
sbin/fsck_ffs/dir.c
222
memmove(bp->b_un.b_buf + idesc->id_loc - dsize, dbuf,
sbin/fsck_ffs/dir.c
224
dirty(bp);
sbin/fsck_ffs/dir.c
242
struct bufarea *bp;
sbin/fsck_ffs/dir.c
249
bp = getdirblk(idesc->id_blkno, blksiz);
sbin/fsck_ffs/dir.c
250
if (bp->b_errs != 0)
sbin/fsck_ffs/dir.c
252
dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc);
sbin/fsck_ffs/dir.c
258
if (idesc->id_loc % DIRBLKSIZ != 0 || dircheck(idesc, bp, dp) != 0) {
sbin/fsck_ffs/dir.c
273
ndp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc);
sbin/fsck_ffs/dir.c
274
if (dircheck(idesc, bp, ndp) != 0)
sbin/fsck_ffs/dir.c
299
dirty(bp);
sbin/fsck_ffs/dir.c
311
dircheck(struct inodesc *idesc, struct bufarea *bp, struct direct *dp)
sbin/fsck_ffs/dir.c
357
dirty(bp);
sbin/fsck_ffs/dir.c
405
dirty(bp);
sbin/fsck_ffs/dir.c
781
struct bufarea *bp, *nbp;
sbin/fsck_ffs/dir.c
810
bp = getdirblk(oldblk, lastlbnsize);
sbin/fsck_ffs/dir.c
811
if (bp->b_errs)
sbin/fsck_ffs/dir.c
824
memmove(nbp->b_un.b_buf, bp->b_un.b_buf, lastlbnsize);
sbin/fsck_ffs/dir.c
833
binval(bp);
sbin/fsck_ffs/dir.c
843
bp = getdirblk(newblk, sblock.fs_bsize);
sbin/fsck_ffs/dir.c
844
if (bp->b_errs)
sbin/fsck_ffs/dir.c
846
memset(bp->b_un.b_buf, 0, sblock.fs_bsize);
sbin/fsck_ffs/dir.c
847
for (cp = bp->b_un.b_buf;
sbin/fsck_ffs/dir.c
848
cp < &bp->b_un.b_buf[sblock.fs_bsize];
sbin/fsck_ffs/dir.c
851
dirty(bp);
sbin/fsck_ffs/dir.c
862
binval(bp);
sbin/fsck_ffs/dir.c
890
binval(bp);
sbin/fsck_ffs/dir.c
916
struct bufarea *bp;
sbin/fsck_ffs/dir.c
928
bp = getdirblk(DIP(dp, di_db[0]), sblock.fs_fsize);
sbin/fsck_ffs/dir.c
929
if (bp->b_errs) {
sbin/fsck_ffs/dir.c
934
memmove(bp->b_un.b_buf, dirp, sizeof(struct dirtemplate));
sbin/fsck_ffs/dir.c
935
for (cp = &bp->b_un.b_buf[DIRBLKSIZ];
sbin/fsck_ffs/dir.c
936
cp < &bp->b_un.b_buf[sblock.fs_fsize];
sbin/fsck_ffs/dir.c
939
dirty(bp);
sbin/fsck_ffs/ea.c
60
struct bufarea *bp;
sbin/fsck_ffs/ea.c
73
bp = getdatablk(dp->di_extb[0], blksiz, BT_EXTATTR);
sbin/fsck_ffs/ea.c
74
if (bp->b_errs)
sbin/fsck_ffs/ea.c
77
cp = (u_char *)bp->b_un.b_buf;
sbin/fsck_ffs/ea.c
83
brelse(bp);
sbin/fsck_ffs/fsck.h
169
#define IBLK(bp, i) \
sbin/fsck_ffs/fsck.h
171
(bp)->b_un.b_indir1[i] : (bp)->b_un.b_indir2[i])
sbin/fsck_ffs/fsck.h
173
#define IBLK_SET(bp, i, val) do { \
sbin/fsck_ffs/fsck.h
175
(bp)->b_un.b_indir1[i] = (val); \
sbin/fsck_ffs/fsck.h
177
(bp)->b_un.b_indir2[i] = (val); \
sbin/fsck_ffs/fsck.h
222
#define dirty(bp) do { \
sbin/fsck_ffs/fsck.h
226
(bp)->b_flags |= B_DIRTY; \
sbin/fsck_ffs/fsck.h
228
#define initbarea(bp, type) do { \
sbin/fsck_ffs/fsck.h
229
(bp)->b_bno = (ufs2_daddr_t)-4; \
sbin/fsck_ffs/fsck.h
230
(bp)->b_size = 0; \
sbin/fsck_ffs/fsck.h
231
(bp)->b_errs = 0; \
sbin/fsck_ffs/fsck.h
232
(bp)->b_flags = 0; \
sbin/fsck_ffs/fsck.h
233
(bp)->b_type = type; \
sbin/fsck_ffs/fsck.h
234
(bp)->b_refcnt = 0; \
sbin/fsck_ffs/fsck.h
235
(bp)->b_index = 0; \
sbin/fsck_ffs/fsck.h
496
void flush(int fd, struct bufarea *bp);
sbin/fsck_ffs/fsck.h
504
void getblk(struct bufarea *bp, ufs2_daddr_t blk, long size);
sbin/fsck_ffs/fsutil.c
1394
prtbuf(struct bufarea *bp, const char *fmt, ...)
sbin/fsck_ffs/fsutil.c
1403
"index %jd\n", bp, BT_BUFTYPE(bp->b_type), (intmax_t) bp->b_bno,
sbin/fsck_ffs/fsutil.c
1404
bp->b_size, bp->b_refcnt, bp->b_flags & B_DIRTY ? "dirty" : "clean",
sbin/fsck_ffs/fsutil.c
1405
(intmax_t) bp->b_index);
sbin/fsck_ffs/fsutil.c
203
struct bufarea *bp;
sbin/fsck_ffs/fsutil.c
206
bp = (struct bufarea *)Malloc(sizeof(struct bufarea));
sbin/fsck_ffs/fsutil.c
208
if (bp == NULL || bufp == NULL) {
sbin/fsck_ffs/fsutil.c
213
bp->b_un.b_buf = bufp;
sbin/fsck_ffs/fsutil.c
214
TAILQ_INSERT_HEAD(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
215
initbarea(bp, BT_UNKNOWN);
sbin/fsck_ffs/fsutil.c
216
return (bp);
sbin/fsck_ffs/fsutil.c
304
struct bufarea *bp;
sbin/fsck_ffs/fsutil.c
319
LIST_FOREACH(bp, bhdp, b_hash)
sbin/fsck_ffs/fsutil.c
320
if (bp->b_bno == fsbtodb(&sblock, blkno)) {
sbin/fsck_ffs/fsutil.c
321
if (debug && bp->b_size != size) {
sbin/fsck_ffs/fsutil.c
322
prtbuf(bp, "getdatablk: size mismatch");
sbin/fsck_ffs/fsutil.c
324
bp->b_size, size);
sbin/fsck_ffs/fsutil.c
326
TAILQ_REMOVE(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
333
bp = TAILQ_LAST(&bufqueuehd, bufqueue);
sbin/fsck_ffs/fsutil.c
334
if (bp != NULL && bp->b_refcnt != 0) {
sbin/fsck_ffs/fsutil.c
335
TAILQ_REMOVE(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
336
TAILQ_INSERT_HEAD(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
345
if ((bp = LIST_FIRST(&freebufs)) != NULL) {
sbin/fsck_ffs/fsutil.c
346
LIST_REMOVE(bp, b_hash);
sbin/fsck_ffs/fsutil.c
348
bp = allocbuf("cannot create minimal buffer pool");
sbin/fsck_ffs/fsutil.c
355
TAILQ_FOREACH_REVERSE(bp, &bufqueuehd, bufqueue, b_list)
sbin/fsck_ffs/fsutil.c
356
if ((bp->b_flags & B_DIRTY) == 0 && bp->b_refcnt == 0)
sbin/fsck_ffs/fsutil.c
358
if (bp == NULL)
sbin/fsck_ffs/fsutil.c
359
bp = allocbuf("Ran out of memory during "
sbin/fsck_ffs/fsutil.c
362
LIST_REMOVE(bp, b_hash);
sbin/fsck_ffs/fsutil.c
367
TAILQ_FOREACH_REVERSE(bp, &bufqueuehd, bufqueue, b_list)
sbin/fsck_ffs/fsutil.c
368
if (bp->b_refcnt == 0)
sbin/fsck_ffs/fsutil.c
370
if (bp == NULL)
sbin/fsck_ffs/fsutil.c
371
bp = allocbuf("Ran out of memory for buffers");
sbin/fsck_ffs/fsutil.c
373
LIST_REMOVE(bp, b_hash);
sbin/fsck_ffs/fsutil.c
375
TAILQ_REMOVE(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
376
flush(fswritefd, bp);
sbin/fsck_ffs/fsutil.c
377
bp->b_type = type;
sbin/fsck_ffs/fsutil.c
378
LIST_INSERT_HEAD(bhdp, bp, b_hash);
sbin/fsck_ffs/fsutil.c
379
getblk(bp, blkno, size);
sbin/fsck_ffs/fsutil.c
383
TAILQ_INSERT_HEAD(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
384
if (debug && bp->b_type != type) {
sbin/fsck_ffs/fsutil.c
387
prtbuf(bp, "");
sbin/fsck_ffs/fsutil.c
389
if (bp->b_errs == 0)
sbin/fsck_ffs/fsutil.c
390
bp->b_refcnt++;
sbin/fsck_ffs/fsutil.c
391
return (bp);
sbin/fsck_ffs/fsutil.c
395
getblk(struct bufarea *bp, ufs2_daddr_t blk, long size)
sbin/fsck_ffs/fsutil.c
401
if (bp->b_bno == dblk) {
sbin/fsck_ffs/fsutil.c
405
readcnt[bp->b_type]++;
sbin/fsck_ffs/fsutil.c
408
bp->b_errs = blread(fsreadfd, bp->b_un.b_buf, dblk, size);
sbin/fsck_ffs/fsutil.c
412
timespecadd(&readtime[bp->b_type], &finish,
sbin/fsck_ffs/fsutil.c
413
&readtime[bp->b_type]);
sbin/fsck_ffs/fsutil.c
415
bp->b_bno = dblk;
sbin/fsck_ffs/fsutil.c
416
bp->b_size = size;
sbin/fsck_ffs/fsutil.c
421
brelse(struct bufarea *bp)
sbin/fsck_ffs/fsutil.c
424
if (bp->b_refcnt <= 0)
sbin/fsck_ffs/fsutil.c
425
prtbuf(bp, "brelse: buffer with negative reference count");
sbin/fsck_ffs/fsutil.c
426
bp->b_refcnt--;
sbin/fsck_ffs/fsutil.c
430
binval(struct bufarea *bp)
sbin/fsck_ffs/fsutil.c
433
bp->b_flags &= ~B_DIRTY;
sbin/fsck_ffs/fsutil.c
434
LIST_REMOVE(bp, b_hash);
sbin/fsck_ffs/fsutil.c
435
LIST_INSERT_HEAD(&freebufs, bp, b_hash);
sbin/fsck_ffs/fsutil.c
439
flush(int fd, struct bufarea *bp)
sbin/fsck_ffs/fsutil.c
443
if ((bp->b_flags & B_DIRTY) == 0)
sbin/fsck_ffs/fsutil.c
445
bp->b_flags &= ~B_DIRTY;
sbin/fsck_ffs/fsutil.c
450
if (bp->b_errs != 0)
sbin/fsck_ffs/fsutil.c
452
(bp->b_errs == bp->b_size / dev_bsize) ? "" : "PARTIALLY ",
sbin/fsck_ffs/fsutil.c
453
(long long)bp->b_bno);
sbin/fsck_ffs/fsutil.c
454
bp->b_errs = 0;
sbin/fsck_ffs/fsutil.c
458
switch (bp->b_type) {
sbin/fsck_ffs/fsutil.c
460
if (bp != &sblk)
sbin/fsck_ffs/fsutil.c
462
bp, &sblk);
sbin/fsck_ffs/fsutil.c
467
if (sbput(fd, bp->b_un.b_fs, 0) == 0)
sbin/fsck_ffs/fsutil.c
476
cg_write(bp);
sbin/fsck_ffs/fsutil.c
477
if (cgput(fswritefd, &sblock, bp->b_un.b_cg) == 0)
sbin/fsck_ffs/fsutil.c
482
struct ufs2_dinode *dp = bp->b_un.b_dinode2;
sbin/fsck_ffs/fsutil.c
485
for (i = 0; i < bp->b_size; dp++, i += sizeof(*dp)) {
sbin/fsck_ffs/fsutil.c
489
ip.i_bp = bp;
sbin/fsck_ffs/fsutil.c
491
ip.i_number = bp->b_index + (i / sizeof(*dp));
sbin/fsck_ffs/fsutil.c
503
copyonwrite(&sblock, bp, std_checkblkavail);
sbin/fsck_ffs/fsutil.c
504
blwrite(fd, bp->b_un.b_buf, bp->b_bno, bp->b_size);
sbin/fsck_ffs/fsutil.c
520
struct bufarea *bp;
sbin/fsck_ffs/fsutil.c
526
TAILQ_FOREACH_REVERSE(bp, &bufqueuehd, bufqueue, b_list)
sbin/fsck_ffs/fsutil.c
527
if ((bp->b_flags & B_DIRTY) != 0)
sbin/fsck_ffs/fsutil.c
528
copyonwrite(&sblock, bp, checkblkavail);
sbin/fsck_ffs/fsutil.c
542
cg_write(struct bufarea *bp)
sbin/fsck_ffs/fsutil.c
554
cgp = bp->b_un.b_cg;
sbin/fsck_ffs/fsutil.c
608
struct bufarea *bp, *nbp;
sbin/fsck_ffs/fsutil.c
674
TAILQ_FOREACH_REVERSE_SAFE(bp, &bufqueuehd, bufqueue, b_list, nbp) {
sbin/fsck_ffs/fsutil.c
675
switch (bp->b_type) {
sbin/fsck_ffs/fsutil.c
681
prtbuf(bp,"ckfini: improper buffer type on cache list");
sbin/fsck_ffs/fsutil.c
695
if (debug && bp->b_refcnt != 0)
sbin/fsck_ffs/fsutil.c
696
prtbuf(bp, "ckfini: clearing in-use buffer");
sbin/fsck_ffs/fsutil.c
697
TAILQ_REMOVE(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
698
LIST_REMOVE(bp, b_hash);
sbin/fsck_ffs/fsutil.c
700
flush(fswritefd, bp);
sbin/fsck_ffs/fsutil.c
701
free(bp->b_un.b_buf);
sbin/fsck_ffs/fsutil.c
702
free((char *)bp);
sbin/fsck_ffs/fsutil.c
711
TAILQ_FOREACH_REVERSE_SAFE(bp, &bufqueuehd, bufqueue, b_list, nbp) {
sbin/fsck_ffs/fsutil.c
712
if (debug && bp->b_refcnt != 0)
sbin/fsck_ffs/fsutil.c
713
prtbuf(bp, "ckfini: clearing in-use buffer");
sbin/fsck_ffs/fsutil.c
714
TAILQ_REMOVE(&bufqueuehd, bp, b_list);
sbin/fsck_ffs/fsutil.c
715
LIST_REMOVE(bp, b_hash);
sbin/fsck_ffs/fsutil.c
717
flush(fswritefd, bp);
sbin/fsck_ffs/fsutil.c
718
free(bp->b_un.b_buf);
sbin/fsck_ffs/fsutil.c
719
free((char *)bp);
sbin/fsck_ffs/inode.c
1114
struct bufarea *bp;
sbin/fsck_ffs/inode.c
1129
bp = snaplist[i].i_bp;
sbin/fsck_ffs/inode.c
1130
bp->b_errs = blread(fsreadfd, bp->b_un.b_buf, bp->b_bno,
sbin/fsck_ffs/inode.c
1131
bp->b_size);
sbin/fsck_ffs/inode.c
169
struct bufarea *bp;
sbin/fsck_ffs/inode.c
181
bp = getdatablk(idesc->id_blkno, sblock.fs_bsize, type);
sbin/fsck_ffs/inode.c
182
if (bp->b_errs != 0) {
sbin/fsck_ffs/inode.c
183
brelse(bp);
sbin/fsck_ffs/inode.c
186
idesc->id_bp = bp;
sbin/fsck_ffs/inode.c
196
if (IBLK(bp, i) == 0)
sbin/fsck_ffs/inode.c
203
IBLK_SET(bp, i, 0);
sbin/fsck_ffs/inode.c
204
dirty(bp);
sbin/fsck_ffs/inode.c
207
flush(fswritefd, bp);
sbin/fsck_ffs/inode.c
210
if (IBLK(bp, i)) {
sbin/fsck_ffs/inode.c
211
idesc->id_blkno = IBLK(bp, i);
sbin/fsck_ffs/inode.c
212
bp->b_index = i;
sbin/fsck_ffs/inode.c
221
brelse(bp);
sbin/fsck_ffs/inode.c
241
brelse(bp);
sbin/fsck_ffs/inode.c
248
brelse(bp);
sbin/fsck_ffs/inode.c
324
struct bufarea *bp;
sbin/fsck_ffs/inode.c
353
bp = getdatablk(blk, sblock.fs_bsize, BT_LEVEL1 + level);
sbin/fsck_ffs/inode.c
354
if (bp->b_errs != 0)
sbin/fsck_ffs/inode.c
356
blk = IBLK(bp, i);
sbin/fsck_ffs/inode.c
357
bp->b_index = i;
sbin/fsck_ffs/inode.c
360
*bpp = bp;
sbin/fsck_ffs/inode.c
362
brelse(bp);
sbin/fsck_ffs/inode.c
365
brelse(bp);
sbin/fsck_ffs/inode.c
791
struct bufarea *bp;
sbin/fsck_ffs/inode.c
803
bp = idesc->id_bp;
sbin/fsck_ffs/inode.c
804
IBLK_SET(bp, bp->b_index, 0);
sbin/fsck_ffs/inode.c
805
dirty(bp);
sbin/fsck_ffs/inode.c
958
copyonwrite(struct fs *fs, struct bufarea *bp,
sbin/fsck_ffs/inode.c
967
numblks = blkroundup(fs, bp->b_size) / fs->fs_bsize;
sbin/fsck_ffs/inode.c
969
prtbuf(bp, "copyonwrite: checking %jd block%s in buffer",
sbin/fsck_ffs/inode.c
971
copyblkno = blknum(fs, dbtofsb(fs, bp->b_bno));
sbin/fsck_ffs/setup.c
275
struct bufarea *bp;
sbin/fsck_ffs/setup.c
293
bp = getdatablk(idesc.id_parent, size, BT_DATA);
sbin/fsck_ffs/setup.c
294
if (bp->b_errs != 0)
sbin/fsck_ffs/setup.c
296
snapblklist = (daddr_t *)bp->b_un.b_buf;
sbin/fsck_ffs/setup.c
342
brelse(bp);
sbin/fsck_ffs/suj.c
1005
bp = getdatablk(blk, size, BT_DIRDATA);
sbin/fsck_ffs/suj.c
1006
if (bp->b_errs != 0)
sbin/fsck_ffs/suj.c
1008
dp = (struct direct *)&bp->b_un.b_buf[0];
sbin/fsck_ffs/suj.c
1010
dp = (struct direct *)&bp->b_un.b_buf[dpoff];
sbin/fsck_ffs/suj.c
1025
brelse(bp);
sbin/fsck_ffs/suj.c
1218
struct bufarea *bp;
sbin/fsck_ffs/suj.c
1236
bp = getdatablk(blk, fs->fs_bsize, BT_LEVEL1 + level);
sbin/fsck_ffs/suj.c
1237
if (bp->b_errs != 0)
sbin/fsck_ffs/suj.c
1240
if ((nblk = IBLK(bp, i)) == 0)
sbin/fsck_ffs/suj.c
1264
IBLK_SET(bp, i, 0);
sbin/fsck_ffs/suj.c
1267
dirty(bp);
sbin/fsck_ffs/suj.c
1268
brelse(bp);
sbin/fsck_ffs/suj.c
1282
struct bufarea *bp;
sbin/fsck_ffs/suj.c
1400
bp = getdatablk(bn, clrsize, BT_DATA);
sbin/fsck_ffs/suj.c
1401
if (bp->b_errs != 0)
sbin/fsck_ffs/suj.c
1404
bzero(&bp->b_un.b_buf[off], clrsize);
sbin/fsck_ffs/suj.c
1405
dirty(bp);
sbin/fsck_ffs/suj.c
1406
brelse(bp);
sbin/fsck_ffs/suj.c
558
struct bufarea *bp;
sbin/fsck_ffs/suj.c
575
bp = getdatablk(blk, blksize, BT_DIRDATA);
sbin/fsck_ffs/suj.c
576
if (bp->b_errs != 0)
sbin/fsck_ffs/suj.c
578
dp = (struct direct *)&bp->b_un.b_buf[doff];
sbin/fsck_ffs/suj.c
583
dirty(bp);
sbin/fsck_ffs/suj.c
584
brelse(bp);
sbin/fsck_ffs/suj.c
600
struct bufarea *bp;
sbin/fsck_ffs/suj.c
648
bp = getdatablk(blk, blksize, BT_DIRDATA);
sbin/fsck_ffs/suj.c
649
if (bp->b_errs != 0)
sbin/fsck_ffs/suj.c
658
dp = (struct direct *)&bp->b_un.b_buf[dpoff];
sbin/fsck_ffs/suj.c
673
brelse(bp);
sbin/fsck_ffs/suj.c
687
brelse(bp);
sbin/fsck_ffs/suj.c
693
brelse(bp);
sbin/fsck_ffs/suj.c
708
struct bufarea *bp;
sbin/fsck_ffs/suj.c
735
bp = getdatablk(blk, fs->fs_bsize, BT_LEVEL1 + level);
sbin/fsck_ffs/suj.c
736
if (bp->b_errs != 0)
sbin/fsck_ffs/suj.c
739
if ((nblk = IBLK(bp, i)) == 0)
sbin/fsck_ffs/suj.c
750
brelse(bp);
sbin/fsck_ffs/suj.c
991
struct bufarea *bp;
sbin/ipf/ipfstat/ipfstat.c
1978
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
1980
if (ap->st_pkts == bp->st_pkts)
sbin/ipf/ipfstat/ipfstat.c
1982
else if (ap->st_pkts < bp->st_pkts)
sbin/ipf/ipfstat/ipfstat.c
1991
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
1993
if (ap->st_bytes == bp->st_bytes)
sbin/ipf/ipfstat/ipfstat.c
1995
else if (ap->st_bytes < bp->st_bytes)
sbin/ipf/ipfstat/ipfstat.c
2004
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
2006
if (ap->st_p == bp->st_p)
sbin/ipf/ipfstat/ipfstat.c
2008
else if (ap->st_p < bp->st_p)
sbin/ipf/ipfstat/ipfstat.c
2017
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
2019
if (ap->st_age == bp->st_age)
sbin/ipf/ipfstat/ipfstat.c
2021
else if (ap->st_age < bp->st_age)
sbin/ipf/ipfstat/ipfstat.c
2029
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
2033
if (IP6_EQ(&ap->st_src, &bp->st_src))
sbin/ipf/ipfstat/ipfstat.c
2035
else if (IP6_GT(&ap->st_src, &bp->st_src))
sbin/ipf/ipfstat/ipfstat.c
2041
ntohl(bp->st_src.in4.s_addr))
sbin/ipf/ipfstat/ipfstat.c
2044
ntohl(bp->st_src.in4.s_addr))
sbin/ipf/ipfstat/ipfstat.c
2053
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
2055
if (htons(ap->st_sport) == htons(bp->st_sport))
sbin/ipf/ipfstat/ipfstat.c
2057
else if (htons(ap->st_sport) > htons(bp->st_sport))
sbin/ipf/ipfstat/ipfstat.c
2065
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
2069
if (IP6_EQ(&ap->st_dst, &bp->st_dst))
sbin/ipf/ipfstat/ipfstat.c
2071
else if (IP6_GT(&ap->st_dst, &bp->st_dst))
sbin/ipf/ipfstat/ipfstat.c
2077
ntohl(bp->st_dst.in4.s_addr))
sbin/ipf/ipfstat/ipfstat.c
2080
ntohl(bp->st_dst.in4.s_addr))
sbin/ipf/ipfstat/ipfstat.c
2089
register const statetop_t *bp = b;
sbin/ipf/ipfstat/ipfstat.c
2091
if (htons(ap->st_dport) == htons(bp->st_dport))
sbin/ipf/ipfstat/ipfstat.c
2093
else if (htons(ap->st_dport) > htons(bp->st_dport))
sbin/ipf/ipmon/ipmon.c
1009
if (bp)
sbin/ipf/ipmon/ipmon.c
1010
free(bp);
sbin/ipf/ipmon/ipmon.c
962
char *bp, *bpo;
sbin/ipf/ipmon/ipmon.c
966
bp = NULL;
sbin/ipf/ipmon/ipmon.c
972
if (bp)
sbin/ipf/ipmon/ipmon.c
973
bpo = bp;
sbin/ipf/ipmon/ipmon.c
974
bp = (char *)malloc(blen);
sbin/ipf/ipmon/ipmon.c
975
bcopy((char *)ipl, bp, blen);
sbin/ipf/ipmon/ipmon.c
980
buf = bp;
sbin/ipfw/altq.c
141
print_altq_cmd(struct buf_pr *bp, const ipfw_insn_altq *altqptr)
sbin/ipfw/altq.c
148
bprintf(bp, " altq ?<%u>", altqptr->qid);
sbin/ipfw/altq.c
150
bprintf(bp, " altq %s", qname);
sbin/ipfw/dummynet.c
428
list_flow(struct buf_pr *bp, struct dn_flow *ni)
sbin/ipfw/dummynet.c
437
bprintf(bp, "%3u%c", (ni->oid.id) & 0xff,
sbin/ipfw/dummynet.c
441
bprintf(bp, "%-4s ", pe->p_name);
sbin/ipfw/dummynet.c
443
bprintf(bp, "%4u ", id->proto);
sbin/ipfw/dummynet.c
445
bprintf(bp, "%15s/%-5d ",
sbin/ipfw/dummynet.c
448
bprintf(bp, "%15s/%-5d ",
sbin/ipfw/dummynet.c
453
bprintf(bp, "%9s ", pe->p_name);
sbin/ipfw/dummynet.c
455
bprintf(bp, "%9u ", id->proto);
sbin/ipfw/dummynet.c
456
bprintf(bp, "%7d %39s/%-5d ", id->flow_id6,
sbin/ipfw/dummynet.c
459
bprintf(bp, " %39s/%-5d ",
sbin/ipfw/dummynet.c
463
pr_u64(bp, &ni->tot_pkts, 4);
sbin/ipfw/dummynet.c
464
pr_u64(bp, &ni->tot_bytes, 8);
sbin/ipfw/dummynet.c
465
bprintf(bp, "%2u %4u %3u",
sbin/ipfw/dummynet.c
566
struct buf_pr bp;
sbin/ipfw/dummynet.c
569
bp_alloc(&bp, 4096);
sbin/ipfw/dummynet.c
620
list_flow(&bp, (struct dn_flow *)oid);
sbin/ipfw/dummynet.c
621
printf("%s\n", bp.buf);
sbin/ipfw/dummynet.c
622
bp_flush(&bp);
sbin/ipfw/dummynet.c
663
bp_free(&bp);
sbin/ipfw/ipfw2.c
1003
bprintf(bp, " %s", sep);
sbin/ipfw/ipfw2.c
1007
bprintf(bp, "%s", sep);
sbin/ipfw/ipfw2.c
1008
print_port(bp, proto, p[0]);
sbin/ipfw/ipfw2.c
1010
bprintf(bp, "-");
sbin/ipfw/ipfw2.c
1011
print_port(bp, proto, p[1]);
sbin/ipfw/ipfw2.c
1250
print_reject_code(struct buf_pr *bp, uint16_t code)
sbin/ipfw/ipfw2.c
1255
bprintf(bp, "unreach %s", s);
sbin/ipfw/ipfw2.c
1257
bprintf(bp, "unreach %u", code);
sbin/ipfw/ipfw2.c
1290
print_flags(struct buf_pr *bp, char const *name, const ipfw_insn *cmd,
sbin/ipfw/ipfw2.c
1299
bprintf(bp, " setup");
sbin/ipfw/ipfw2.c
1303
bprintf(bp, " %s ", name);
sbin/ipfw/ipfw2.c
1307
bprintf(bp, "%s%s", comma, list[i].s);
sbin/ipfw/ipfw2.c
1312
bprintf(bp, "%s!%s", comma, list[i].s);
sbin/ipfw/ipfw2.c
1319
print_tvalue(struct buf_pr *bp, const ipfw_insn_lookup *cmd)
sbin/ipfw/ipfw2.c
1330
bprintf(bp, ",%s=%s", name != NULL ? name: "<invalid>",
sbin/ipfw/ipfw2.c
1334
bprintf(bp, ",%s=%s", name != NULL ? name: "<invalid>",
sbin/ipfw/ipfw2.c
1338
bprintf(bp, ",%s=%u", name != NULL ? name: "<invalid>",
sbin/ipfw/ipfw2.c
1347
print_ip(struct buf_pr *bp, const struct format_opts *fo,
sbin/ipfw/ipfw2.c
1359
bprintf(bp, " ");
sbin/ipfw/ipfw2.c
1363
bprintf(bp, "me");
sbin/ipfw/ipfw2.c
1373
bprintf(bp, "lookup %s %s",
sbin/ipfw/ipfw2.c
1383
bprintf(bp, "lookup %s:%s %s", key, maskbuf, t);
sbin/ipfw/ipfw2.c
1389
bprintf(bp, "lookup %s:%s %s", key,
sbin/ipfw/ipfw2.c
1394
bprintf(bp, "lookup %s:%s %s", key,
sbin/ipfw/ipfw2.c
1398
bprintf(bp, "lookup %s:%#x %s",
sbin/ipfw/ipfw2.c
1417
bprintf(bp, "lookup %s:%#x %s",
sbin/ipfw/ipfw2.c
1422
bprintf(bp, "table(%s", t);
sbin/ipfw/ipfw2.c
1424
print_tvalue(bp, l);
sbin/ipfw/ipfw2.c
1425
bprintf(bp, ")");
sbin/ipfw/ipfw2.c
1439
bprintf(bp, "%s/%d", inet_ntoa(addr),
sbin/ipfw/ipfw2.c
1454
bprintf(bp, "%c%d", comma, i+x);
sbin/ipfw/ipfw2.c
1456
bprintf(bp, "-%d", j-1+x);
sbin/ipfw/ipfw2.c
1461
bprintf(bp, "}");
sbin/ipfw/ipfw2.c
1477
bprintf(bp, "%s", he->h_name);
sbin/ipfw/ipfw2.c
1479
bprintf(bp, "any");
sbin/ipfw/ipfw2.c
1482
bprintf(bp, "%s", inet_ntoa(*ia));
sbin/ipfw/ipfw2.c
1485
bprintf(bp, ":%s", inet_ntoa(*ia));
sbin/ipfw/ipfw2.c
1487
bprintf(bp, "/%d", mb);
sbin/ipfw/ipfw2.c
1490
bprintf(bp, ",");
sbin/ipfw/ipfw2.c
1498
format_mac(struct buf_pr *bp, const uint8_t *addr, const uint8_t *mask)
sbin/ipfw/ipfw2.c
1503
bprintf(bp, " any");
sbin/ipfw/ipfw2.c
1505
bprintf(bp, " %02x:%02x:%02x:%02x:%02x:%02x",
sbin/ipfw/ipfw2.c
1508
bprintf(bp, "&%02x:%02x:%02x:%02x:%02x:%02x",
sbin/ipfw/ipfw2.c
1512
bprintf(bp, "/%d", l);
sbin/ipfw/ipfw2.c
1517
print_mac(struct buf_pr *bp, const ipfw_insn_mac *mac)
sbin/ipfw/ipfw2.c
1520
bprintf(bp, " MAC");
sbin/ipfw/ipfw2.c
1521
format_mac(bp, mac->addr, mac->mask);
sbin/ipfw/ipfw2.c
1522
format_mac(bp, mac->addr + 6, mac->mask + 6);
sbin/ipfw/ipfw2.c
1526
print_mac_lookup(struct buf_pr *bp, const struct format_opts *fo,
sbin/ipfw/ipfw2.c
1531
bprintf(bp, " ");
sbin/ipfw/ipfw2.c
1534
bprintf(bp, "table(%s", t);
sbin/ipfw/ipfw2.c
1536
print_tvalue(bp, insntoc(cmd, lookup));
sbin/ipfw/ipfw2.c
1537
bprintf(bp, ")");
sbin/ipfw/ipfw2.c
1565
print_icmptypes(struct buf_pr *bp, const ipfw_insn_u32 *cmd)
sbin/ipfw/ipfw2.c
1570
bprintf(bp, " icmptypes");
sbin/ipfw/ipfw2.c
1574
bprintf(bp, "%c%d", sep, i);
sbin/ipfw/ipfw2.c
1580
print_dscp(struct buf_pr *bp, const ipfw_insn_u32 *cmd)
sbin/ipfw/ipfw2.c
1587
bprintf(bp, " dscp");
sbin/ipfw/ipfw2.c
1592
bprintf(bp, "%c%s", sep, code);
sbin/ipfw/ipfw2.c
1594
bprintf(bp, "%c%d", sep, i);
sbin/ipfw/ipfw2.c
1653
print_limit_mask(struct buf_pr *bp, const ipfw_insn_limit *limit)
sbin/ipfw/ipfw2.c
1662
bprintf(bp, "%s%s", comma, p->s);
sbin/ipfw/ipfw2.c
1666
bprint_uint_arg(bp, " ", limit->conn_limit);
sbin/ipfw/ipfw2.c
1670
print_instruction(struct buf_pr *bp, const struct format_opts *fo,
sbin/ipfw/ipfw2.c
1682
bprintf(bp, " {");
sbin/ipfw/ipfw2.c
1684
bprintf(bp, " not");
sbin/ipfw/ipfw2.c
1689
bprintf(bp, "prob %f ", d);
sbin/ipfw/ipfw2.c
1700
bprintf(bp, " src-ip");
sbin/ipfw/ipfw2.c
1703
print_ip(bp, fo, insntoc(cmd, ip));
sbin/ipfw/ipfw2.c
1717
bprintf(bp, " dst-ip");
sbin/ipfw/ipfw2.c
1718
print_ip(bp, fo, insntoc(cmd, ip));
sbin/ipfw/ipfw2.c
1724
bprintf(bp, " src-ip6");
sbin/ipfw/ipfw2.c
1725
print_ip6(bp, insntoc(cmd, ip6));
sbin/ipfw/ipfw2.c
1731
bprintf(bp, " dst-ip6");
sbin/ipfw/ipfw2.c
1732
print_ip6(bp, insntoc(cmd, ip6));
sbin/ipfw/ipfw2.c
1735
bprintf(bp, " src-mac");
sbin/ipfw/ipfw2.c
1736
print_mac_lookup(bp, fo, cmd);
sbin/ipfw/ipfw2.c
1739
bprintf(bp, " dst-mac");
sbin/ipfw/ipfw2.c
1740
print_mac_lookup(bp, fo, cmd);
sbin/ipfw/ipfw2.c
1743
print_flow6id(bp, insntoc(cmd, u32));
sbin/ipfw/ipfw2.c
1747
print_newports(bp, insntoc(cmd, u16), state->proto,
sbin/ipfw/ipfw2.c
1754
bprintf(bp, " proto");
sbin/ipfw/ipfw2.c
1756
bprintf(bp, " %s", pe->p_name);
sbin/ipfw/ipfw2.c
1758
bprintf(bp, " %u", cmd->arg1);
sbin/ipfw/ipfw2.c
1762
print_mac(bp, insntoc(cmd, mac));
sbin/ipfw/ipfw2.c
1765
print_newports(bp, insntoc(cmd, u16),
sbin/ipfw/ipfw2.c
1769
print_flags(bp, "frag", cmd, f_ipoff);
sbin/ipfw/ipfw2.c
1772
bprintf(bp, " fib %u", cmd->arg1);
sbin/ipfw/ipfw2.c
1775
bprintf(bp, " sockarg");
sbin/ipfw/ipfw2.c
1778
bprintf(bp, cmd->len & F_NOT ? " out" : " in");
sbin/ipfw/ipfw2.c
1783
bprintf(bp, " diverted");
sbin/ipfw/ipfw2.c
1786
bprintf(bp, " diverted-output");
sbin/ipfw/ipfw2.c
1789
bprintf(bp, " diverted-loopback");
sbin/ipfw/ipfw2.c
1792
bprintf(bp, " diverted-?<%u>", cmd->arg1);
sbin/ipfw/ipfw2.c
1797
bprintf(bp, " layer2");
sbin/ipfw/ipfw2.c
1810
bprintf(bp, " %s %s", s,
sbin/ipfw/ipfw2.c
1814
bprintf(bp, " %s table(%s)", s,
sbin/ipfw/ipfw2.c
1819
bprintf(bp, " %s %s", s,
sbin/ipfw/ipfw2.c
1826
bprintf(bp, " flow table(%s", s);
sbin/ipfw/ipfw2.c
1828
print_tvalue(bp, insntoc(cmd, lookup));
sbin/ipfw/ipfw2.c
1829
bprintf(bp, ")");
sbin/ipfw/ipfw2.c
1861
bprintf(bp, " %s %u", s, cmd->arg1);
sbin/ipfw/ipfw2.c
1863
print_newports(bp, insntoc(cmd, u16), 0,
sbin/ipfw/ipfw2.c
1867
bprintf(bp, " ipver %u", cmd->arg1);
sbin/ipfw/ipfw2.c
1870
bprintf(bp, " ipprecedence %u", cmd->arg1 >> 5);
sbin/ipfw/ipfw2.c
1873
print_dscp(bp, insntoc(cmd, u32));
sbin/ipfw/ipfw2.c
1876
print_flags(bp, "ipoptions", cmd, f_ipopts);
sbin/ipfw/ipfw2.c
1879
print_flags(bp, "iptos", cmd, f_iptos);
sbin/ipfw/ipfw2.c
1882
print_icmptypes(bp, insntoc(cmd, u32));
sbin/ipfw/ipfw2.c
1885
bprintf(bp, " established");
sbin/ipfw/ipfw2.c
1888
print_flags(bp, "tcpflags", cmd, f_tcpflags);
sbin/ipfw/ipfw2.c
1891
print_flags(bp, "tcpoptions", cmd, f_tcpopts);
sbin/ipfw/ipfw2.c
1894
bprintf(bp, " tcpack %d",
sbin/ipfw/ipfw2.c
1898
bprintf(bp, " tcpseq %d",
sbin/ipfw/ipfw2.c
1904
bprintf(bp, " uid %s", pwd->pw_name);
sbin/ipfw/ipfw2.c
1906
bprintf(bp, " uid %u",
sbin/ipfw/ipfw2.c
1912
bprintf(bp, " gid %s", grp->gr_name);
sbin/ipfw/ipfw2.c
1914
bprintf(bp, " gid %u",
sbin/ipfw/ipfw2.c
1918
bprintf(bp, " jail %d", insntoc(cmd, u32)->d[0]);
sbin/ipfw/ipfw2.c
1921
bprintf(bp, " verrevpath");
sbin/ipfw/ipfw2.c
1924
bprintf(bp, " versrcreach");
sbin/ipfw/ipfw2.c
1927
bprintf(bp, " antispoof");
sbin/ipfw/ipfw2.c
1930
bprintf(bp, " ipsec");
sbin/ipfw/ipfw2.c
1933
bprintf(bp, " // %s", (const char *)(cmd + 1));
sbin/ipfw/ipfw2.c
1937
bprintf(bp, " keep-state");
sbin/ipfw/ipfw2.c
1939
bprintf(bp, " record-state");
sbin/ipfw/ipfw2.c
1940
bprintf(bp, " :%s",
sbin/ipfw/ipfw2.c
1947
bprintf(bp, " limit");
sbin/ipfw/ipfw2.c
1949
bprintf(bp, " set-limit");
sbin/ipfw/ipfw2.c
1950
print_limit_mask(bp, insntoc(cmd, limit));
sbin/ipfw/ipfw2.c
1951
bprintf(bp, " :%s",
sbin/ipfw/ipfw2.c
1958
bprintf(bp, " proto");
sbin/ipfw/ipfw2.c
1959
bprintf(bp, " ip6");
sbin/ipfw/ipfw2.c
1963
bprintf(bp, " proto");
sbin/ipfw/ipfw2.c
1964
bprintf(bp, " ip4");
sbin/ipfw/ipfw2.c
1967
print_icmp6types(bp, insntoc(cmd, u32));
sbin/ipfw/ipfw2.c
1970
print_ext6hdr(bp, cmd);
sbin/ipfw/ipfw2.c
1974
bprint_uint_arg(bp, " tagged ", cmd->arg1);
sbin/ipfw/ipfw2.c
1976
print_newports(bp, insntoc(cmd, u16),
sbin/ipfw/ipfw2.c
1980
bprintf(bp, " defer-immediate-action");
sbin/ipfw/ipfw2.c
1983
bprintf(bp, " mark");
sbin/ipfw/ipfw2.c
1985
bprintf(bp, " tablearg");
sbin/ipfw/ipfw2.c
1987
bprintf(bp, " %#x", insntoc(cmd, u32)->d[0]);
sbin/ipfw/ipfw2.c
1990
bprintf(bp, ":%#x", insntoc(cmd, u32)->d[1]);
sbin/ipfw/ipfw2.c
1994
bprintf(bp, " [opcode %d len %d]", cmd->opcode,
sbin/ipfw/ipfw2.c
1998
bprintf(bp, " or");
sbin/ipfw/ipfw2.c
2001
bprintf(bp, " }");
sbin/ipfw/ipfw2.c
2010
print_opcode(struct buf_pr *bp, struct format_opts *fo,
sbin/ipfw/ipfw2.c
2027
if (!print_instruction(bp, fo, state, cmd))
sbin/ipfw/ipfw2.c
2035
print_fwd(struct buf_pr *bp, const ipfw_insn *cmd)
sbin/ipfw/ipfw2.c
2046
bprintf(bp, "fwd tablearg");
sbin/ipfw/ipfw2.c
2048
bprintf(bp, "fwd %s", inet_ntoa(sa->sa.sin_addr));
sbin/ipfw/ipfw2.c
2052
bprintf(bp, "fwd ");
sbin/ipfw/ipfw2.c
2056
bprintf(bp, "%s", buf);
sbin/ipfw/ipfw2.c
2059
bprintf(bp, ",%u", port);
sbin/ipfw/ipfw2.c
2063
print_logdst(struct buf_pr *bp, uint16_t arg1)
sbin/ipfw/ipfw2.c
2067
bprintf(bp, " logdst ");
sbin/ipfw/ipfw2.c
2069
bprintf(bp, "%ssyslog", comma);
sbin/ipfw/ipfw2.c
2073
bprintf(bp, "%sbpf", comma);
sbin/ipfw/ipfw2.c
2077
bprintf(bp, "%srtsock", comma);
sbin/ipfw/ipfw2.c
2083
print_action_instruction(struct buf_pr *bp, const struct format_opts *fo,
sbin/ipfw/ipfw2.c
2092
bprintf(bp, "check-state");
sbin/ipfw/ipfw2.c
2099
bprintf(bp, " :%s", s ? s: "any");
sbin/ipfw/ipfw2.c
2102
bprintf(bp, "allow");
sbin/ipfw/ipfw2.c
2105
bprintf(bp, "count");
sbin/ipfw/ipfw2.c
2108
bprintf(bp, "deny");
sbin/ipfw/ipfw2.c
2112
bprintf(bp, "reset");
sbin/ipfw/ipfw2.c
2114
bprintf(bp, "abort");
sbin/ipfw/ipfw2.c
2116
bprintf(bp, "reject");
sbin/ipfw/ipfw2.c
2119
bprintf(bp, "needfrag %u",
sbin/ipfw/ipfw2.c
2122
print_reject_code(bp, cmd->arg1);
sbin/ipfw/ipfw2.c
2126
bprintf(bp, "reset6");
sbin/ipfw/ipfw2.c
2128
bprintf(bp, "abort6");
sbin/ipfw/ipfw2.c
2130
print_unreach6_code(bp, cmd->arg1);
sbin/ipfw/ipfw2.c
2133
bprint_uint_arg(bp, "skipto ", insntoc(cmd, u32)->d[0]);
sbin/ipfw/ipfw2.c
2136
bprint_uint_arg(bp, "pipe ", cmd->arg1);
sbin/ipfw/ipfw2.c
2139
bprint_uint_arg(bp, "queue ", cmd->arg1);
sbin/ipfw/ipfw2.c
2142
bprint_uint_arg(bp, "divert ", cmd->arg1);
sbin/ipfw/ipfw2.c
2145
bprint_uint_arg(bp, "tee ", cmd->arg1);
sbin/ipfw/ipfw2.c
2148
bprint_uint_arg(bp, "netgraph ", cmd->arg1);
sbin/ipfw/ipfw2.c
2151
bprint_uint_arg(bp, "ngtee ", cmd->arg1);
sbin/ipfw/ipfw2.c
2155
print_fwd(bp, cmd);
sbin/ipfw/ipfw2.c
2158
bprintf(bp, " log");
sbin/ipfw/ipfw2.c
2160
bprintf(bp, " logamount %d",
sbin/ipfw/ipfw2.c
2163
print_logdst(bp, cmd->arg1);
sbin/ipfw/ipfw2.c
2167
print_altq_cmd(bp, insntoc(cmd, altq));
sbin/ipfw/ipfw2.c
2171
bprint_uint_arg(bp, cmd->len & F_NOT ? " untag ":
sbin/ipfw/ipfw2.c
2176
bprint_uint_arg(bp, "nat ", cmd->arg1);
sbin/ipfw/ipfw2.c
2178
bprintf(bp, "nat global");
sbin/ipfw/ipfw2.c
2182
bprint_uint_arg(bp, "setfib ", cmd->arg1);
sbin/ipfw/ipfw2.c
2184
bprintf(bp, "setfib %u", cmd->arg1 & 0x7FFF);
sbin/ipfw/ipfw2.c
2201
bprintf(bp, "%s", s);
sbin/ipfw/ipfw2.c
2203
bprintf(bp, "eaction %s", s);
sbin/ipfw/ipfw2.c
2224
bprintf(bp, " %s", s);
sbin/ipfw/ipfw2.c
2235
bprintf(bp, " %u", cmd->arg1);
sbin/ipfw/ipfw2.c
2237
bprintf(bp, " %ubytes",
sbin/ipfw/ipfw2.c
2242
bprintf(bp, "setdscp tablearg");
sbin/ipfw/ipfw2.c
2247
bprintf(bp, "setdscp %s", s);
sbin/ipfw/ipfw2.c
2249
bprintf(bp, "setdscp %u", cmd->arg1 & 0x3F);
sbin/ipfw/ipfw2.c
2252
bprintf(bp, "reass");
sbin/ipfw/ipfw2.c
2257
bprintf(bp, "return %s", s ? s: "<invalid>");
sbin/ipfw/ipfw2.c
2259
bprint_uint_arg(bp, "call ", insntoc(cmd, u32)->d[0]);
sbin/ipfw/ipfw2.c
2263
bprintf(bp, "setmark tablearg");
sbin/ipfw/ipfw2.c
2266
bprintf(bp, "setmark %#x", insntoc(cmd, u32)->d[0]);
sbin/ipfw/ipfw2.c
2269
bprintf(bp, "** unrecognized action %d len %d ",
sbin/ipfw/ipfw2.c
2279
print_action(struct buf_pr *bp, struct format_opts *fo,
sbin/ipfw/ipfw2.c
2290
if (!print_action_instruction(bp, fo, state, cmd))
sbin/ipfw/ipfw2.c
2298
print_proto(struct buf_pr *bp, struct format_opts *fo,
sbin/ipfw/ipfw2.c
2329
bprintf(bp, " ip");
sbin/ipfw/ipfw2.c
2335
cmd = print_opcode(bp, fo, state, ip4 > ip6 ? O_IP4: O_IP6);
sbin/ipfw/ipfw2.c
2337
cmd = print_opcode(bp, fo, state, ip4 > ip6 ? O_IP6: O_IP4);
sbin/ipfw/ipfw2.c
2340
cmd = print_opcode(bp, fo, state, O_PROTO);
sbin/ipfw/ipfw2.c
2362
print_address(struct buf_pr *bp, struct format_opts *fo,
sbin/ipfw/ipfw2.c
2385
bprintf(bp, " any");
sbin/ipfw/ipfw2.c
2390
print_instruction(bp, fo, state, cmd);
sbin/ipfw/ipfw2.c
2408
print_instruction(bp, fo, state, cmd);
sbin/ipfw/ipfw2.c
2446
struct buf_pr *bp, struct ip_fw_rule *rule, struct ip_fw_bcounter *cntr)
sbin/ipfw/ipfw2.c
2459
bprintf(bp, "# DISABLED ");
sbin/ipfw/ipfw2.c
2466
bprintf(bp, RULENUM_FORMAT " ", rule->rulenum);
sbin/ipfw/ipfw2.c
2472
pr_u64(bp, &cntr->pcnt, fo->pcwidth);
sbin/ipfw/ipfw2.c
2473
pr_u64(bp, &cntr->bcnt, fo->bcwidth);
sbin/ipfw/ipfw2.c
2478
bprintf(bp, "%10u ", cntr->timestamp);
sbin/ipfw/ipfw2.c
2493
bprintf(bp, "%s ", timestr);
sbin/ipfw/ipfw2.c
2495
bprintf(bp, "%*s ", twidth, "");
sbin/ipfw/ipfw2.c
2502
bprintf(bp, "set %d ", rule->set);
sbin/ipfw/ipfw2.c
2505
cmd = print_opcode(bp, fo, &state, O_PROB);
sbin/ipfw/ipfw2.c
2508
cmd = print_action(bp, fo, &state, action_opcodes[i]);
sbin/ipfw/ipfw2.c
2524
print_action(bp, fo, &state, modifier_opcodes[i]);
sbin/ipfw/ipfw2.c
2537
bprintf(bp, " proto ip");
sbin/ipfw/ipfw2.c
2543
print_proto(bp, fo, &state);
sbin/ipfw/ipfw2.c
2548
bprintf(bp, " from");
sbin/ipfw/ipfw2.c
2549
print_address(bp, fo, &state, src_opcodes, nitems(src_opcodes),
sbin/ipfw/ipfw2.c
2553
bprintf(bp, " to");
sbin/ipfw/ipfw2.c
2554
print_address(bp, fo, &state, dst_opcodes, nitems(dst_opcodes),
sbin/ipfw/ipfw2.c
2559
while (print_opcode(bp, fo, &state, -1))
sbin/ipfw/ipfw2.c
2563
cmd = print_opcode(bp, fo, &state, O_NOP);
sbin/ipfw/ipfw2.c
2565
bprintf(bp, " // ...");
sbin/ipfw/ipfw2.c
2566
bprintf(bp, "\n");
sbin/ipfw/ipfw2.c
2572
struct buf_pr *bp, ipfw_dyn_rule *d)
sbin/ipfw/ipfw2.c
2581
bprintf(bp, RULENUM_FORMAT, d->rulenum);
sbin/ipfw/ipfw2.c
2583
bprintf(bp, " ");
sbin/ipfw/ipfw2.c
2584
pr_u64(bp, &d->pcnt, fo->pcwidth);
sbin/ipfw/ipfw2.c
2585
pr_u64(bp, &d->bcnt, fo->bcwidth);
sbin/ipfw/ipfw2.c
2586
bprintf(bp, "(%ds)", d->expire);
sbin/ipfw/ipfw2.c
2590
bprintf(bp, " PARENT %u", d->count);
sbin/ipfw/ipfw2.c
2593
bprintf(bp, " LIMIT");
sbin/ipfw/ipfw2.c
2596
bprintf(bp, " STATE");
sbin/ipfw/ipfw2.c
2601
bprintf(bp, " %s", pe->p_name);
sbin/ipfw/ipfw2.c
2603
bprintf(bp, " proto %u", d->id.proto);
sbin/ipfw/ipfw2.c
2607
bprintf(bp, " %s %d", inet_ntoa(a), d->id.src_port);
sbin/ipfw/ipfw2.c
2610
bprintf(bp, " <-> %s %d", inet_ntoa(a), d->id.dst_port);
sbin/ipfw/ipfw2.c
2612
bprintf(bp, " %s %d", inet_ntop(AF_INET6, &d->id.src_ip6, buf,
sbin/ipfw/ipfw2.c
2614
bprintf(bp, " <-> %s %d", inet_ntop(AF_INET6, &d->id.dst_ip6,
sbin/ipfw/ipfw2.c
2617
bprintf(bp, " UNKNOWN <-> UNKNOWN");
sbin/ipfw/ipfw2.c
2619
bprintf(bp, " :%s", object_search_ctlv(fo->tstate,
sbin/ipfw/ipfw2.c
2625
bprintf(bp, " state 0x%08x%s", d->state,
sbin/ipfw/ipfw2.c
2628
bprintf(bp, "ORPHANED,");
sbin/ipfw/ipfw2.c
2630
bprintf(bp, "BOTH_SYN,");
sbin/ipfw/ipfw2.c
2633
bprintf(bp, "F_SYN,");
sbin/ipfw/ipfw2.c
2635
bprintf(bp, "R_SYN,");
sbin/ipfw/ipfw2.c
2638
bprintf(bp, "BOTH_FIN,");
sbin/ipfw/ipfw2.c
2641
bprintf(bp, "F_FIN,");
sbin/ipfw/ipfw2.c
2643
bprintf(bp, "R_FIN,");
sbin/ipfw/ipfw2.c
2645
bprintf(bp, " f_ack 0x%x, r_ack 0x%x", d->ack_fwd,
sbin/ipfw/ipfw2.c
2946
struct buf_pr *bp, ipfw_obj_tlv *rtlv, int rcnt)
sbin/ipfw/ipfw2.c
2967
show_static_rule(co, fo, bp, r, cntr);
sbin/ipfw/ipfw2.c
2968
printf("%s", bp->buf);
sbin/ipfw/ipfw2.c
2969
bp_flush(bp);
sbin/ipfw/ipfw2.c
2982
struct buf_pr *bp;
sbin/ipfw/ipfw2.c
2985
bp = (struct buf_pr *)_arg;
sbin/ipfw/ipfw2.c
2992
show_dyn_state(co, fo, bp, d);
sbin/ipfw/ipfw2.c
2993
printf("%s\n", bp->buf);
sbin/ipfw/ipfw2.c
2994
bp_flush(bp);
sbin/ipfw/ipfw2.c
3000
struct buf_pr *bp, caddr_t base, size_t sz)
sbin/ipfw/ipfw2.c
3003
sz = foreach_state(co, fo, base, sz, list_dyn_state, bp);
sbin/ipfw/ipfw2.c
3079
struct buf_pr bp;
sbin/ipfw/ipfw2.c
3124
bp_alloc(&bp, 4096);
sbin/ipfw/ipfw2.c
3131
list_static_range(co, fo, &bp, rbase, rcnt);
sbin/ipfw/ipfw2.c
3136
list_dyn_range(co, fo, &bp, dynbase, dynsz);
sbin/ipfw/ipfw2.c
3139
bp_free(&bp);
sbin/ipfw/ipfw2.c
3158
if (list_static_range(co, fo, &bp, rbase, rcnt) == 0) {
sbin/ipfw/ipfw2.c
3179
list_dyn_range(co, fo, &bp, dynbase, dynsz);
sbin/ipfw/ipfw2.c
3183
bp_free(&bp);
sbin/ipfw/ipfw2.c
443
void bprint_uint_arg(struct buf_pr *bp, const char *str, uint32_t arg);
sbin/ipfw/ipfw2.c
545
bprint_uint_arg(struct buf_pr *bp, const char *str, uint32_t arg)
sbin/ipfw/ipfw2.c
549
bprintf(bp, "%s", str);
sbin/ipfw/ipfw2.c
551
bprintf(bp, "tablearg");
sbin/ipfw/ipfw2.c
553
bprintf(bp, "%u", arg);
sbin/ipfw/ipfw2.c
5942
struct buf_pr bp;
sbin/ipfw/ipfw2.c
5946
bp_alloc(&bp, 4096);
sbin/ipfw/ipfw2.c
5947
show_static_rule(&g_co, &sfo, &bp, rule, NULL);
sbin/ipfw/ipfw2.c
5948
printf("%s", bp.buf);
sbin/ipfw/ipfw2.c
5949
bp_free(&bp);
sbin/ipfw/ipfw2.c
6143
bprint_sa(struct buf_pr *bp, const struct sockaddr *sa)
sbin/ipfw/ipfw2.c
6164
bprintf(bp, "bad-addr");
sbin/ipfw/ipfw2.c
6167
bprintf(bp, "%s", buf);
sbin/ipfw/ipfw2.c
6176
struct buf_pr bp;
sbin/ipfw/ipfw2.c
6188
bp_alloc(&bp, 4096);
sbin/ipfw/ipfw2.c
6227
bp_flush(&bp);
sbin/ipfw/ipfw2.c
6232
bprintf(&bp, "%s.%03ld AF %s", buf, tp.tv_nsec / 1000000,
sbin/ipfw/ipfw2.c
6235
bprintf(&bp, " %s >",
sbin/ipfw/ipfw2.c
6237
bprintf(&bp, " %s, ",
sbin/ipfw/ipfw2.c
6239
bprint_sa(&bp, sa);
sbin/ipfw/ipfw2.c
6246
bprintf(&bp, " > ");
sbin/ipfw/ipfw2.c
6247
bprint_sa(&bp, sa);
sbin/ipfw/ipfw2.c
6248
bprintf(&bp, ", set %u, rulenum %u, targ 0x%08x, "
sbin/ipfw/ipfw2.c
6259
bprintf(&bp, ", nh ");
sbin/ipfw/ipfw2.c
6260
bprint_sa(&bp, sa);
sbin/ipfw/ipfw2.c
6263
bprintf(&bp, " // %s", loghdr->comment);
sbin/ipfw/ipfw2.c
6264
printf("%s\n", bp.buf);
sbin/ipfw/ipfw2.c
6266
bp_free(&bp);
sbin/ipfw/ipfw2.c
950
print_port(struct buf_pr *bp, int proto, uint16_t port)
sbin/ipfw/ipfw2.c
957
bprintf(bp, "%s", s);
sbin/ipfw/ipfw2.c
959
bprintf(bp, "0x%04x", port);
sbin/ipfw/ipfw2.c
968
bprintf(bp, "%s", se->s_name);
sbin/ipfw/ipfw2.c
970
bprintf(bp, "%d", port);
sbin/ipfw/ipfw2.c
993
print_newports(struct buf_pr *bp, const ipfw_insn_u16 *cmd, int proto, int opcode)
sbin/ipfw/ipfw2.h
348
int pr_u64(struct buf_pr *bp, void *pd, int width);
sbin/ipfw/ipfw2.h
429
void print_altq_cmd(struct buf_pr *bp, const struct _ipfw_insn_altq *altqptr);
sbin/ipfw/ipfw2.h
440
void print_unreach6_code(struct buf_pr *bp, uint16_t code);
sbin/ipfw/ipfw2.h
441
void print_ip6(struct buf_pr *bp, const struct _ipfw_insn_ip6 *cmd);
sbin/ipfw/ipfw2.h
442
void print_flow6id(struct buf_pr *bp, const struct _ipfw_insn_u32 *cmd);
sbin/ipfw/ipfw2.h
443
void print_icmp6types(struct buf_pr *bp, const struct _ipfw_insn_u32 *cmd);
sbin/ipfw/ipfw2.h
444
void print_ext6hdr(struct buf_pr *bp, const struct _ipfw_insn *cmd);
sbin/ipfw/ipv6.c
107
bprintf(bp, " ");
sbin/ipfw/ipv6.c
119
bprintf(bp, "%s", he->h_name);
sbin/ipfw/ipv6.c
121
bprintf(bp, "any");
sbin/ipfw/ipv6.c
125
bprintf(bp, "Error ntop in print_ip6\n");
sbin/ipfw/ipv6.c
126
bprintf(bp, "%s", trad );
sbin/ipfw/ipv6.c
128
bprintf(bp, "/%s", inet_ntop(AF_INET6, &a[1],
sbin/ipfw/ipv6.c
131
bprintf(bp, "/%d", mb);
sbin/ipfw/ipv6.c
134
bprintf(bp, ",");
sbin/ipfw/ipv6.c
166
print_icmp6types(struct buf_pr *bp, const ipfw_insn_u32 *cmd)
sbin/ipfw/ipv6.c
171
bprintf(bp, " icmp6types");
sbin/ipfw/ipv6.c
176
bprintf(bp, "%c%d", sep, (i*32 + j));
sbin/ipfw/ipv6.c
182
print_flow6id(struct buf_pr *bp, const ipfw_insn_u32 *cmd)
sbin/ipfw/ipv6.c
187
bprintf(bp, " flow-id ");
sbin/ipfw/ipv6.c
191
bprintf(bp, "%d%c", cmd->d[i], sep);
sbin/ipfw/ipv6.c
258
print_ext6hdr(struct buf_pr *bp, const ipfw_insn *cmd )
sbin/ipfw/ipv6.c
262
bprintf(bp, " extension header:");
sbin/ipfw/ipv6.c
264
bprintf(bp, "%cfragmentation", sep);
sbin/ipfw/ipv6.c
268
bprintf(bp, "%chop options", sep);
sbin/ipfw/ipv6.c
272
bprintf(bp, "%crouting options", sep);
sbin/ipfw/ipv6.c
276
bprintf(bp, "%crthdr0", sep);
sbin/ipfw/ipv6.c
280
bprintf(bp, "%crthdr2", sep);
sbin/ipfw/ipv6.c
284
bprintf(bp, "%cdestination options", sep);
sbin/ipfw/ipv6.c
288
bprintf(bp, "%cauthentication header", sep);
sbin/ipfw/ipv6.c
292
bprintf(bp, "%cencapsulating security payload", sep);
sbin/ipfw/ipv6.c
71
print_unreach6_code(struct buf_pr *bp, uint16_t code)
sbin/ipfw/ipv6.c
76
bprintf(bp, "unreach6 %s", s);
sbin/ipfw/ipv6.c
78
bprintf(bp, "unreach6 %u", code);
sbin/ipfw/ipv6.c
85
print_ip6(struct buf_pr *bp, const ipfw_insn_ip6 *cmd)
sbin/ipfw/ipv6.c
94
bprintf(bp, " me6");
sbin/ipfw/ipv6.c
98
bprintf(bp, " ip6");
sbin/ping/ping.c
1628
fill(char *bp, char *patp)
sbin/ping/ping.c
1649
bp[jj + kk] = pat[jj];
sbin/ping/ping.c
1653
(void)printf("%02x", bp[jj] & 0xFF);
sbin/ping/ping6.c
2632
fill(char *bp, char *patp)
sbin/ping/ping6.c
2653
bp[jj + kk] = pat[jj];
sbin/ping/ping6.c
2657
(void)printf("%02x", bp[jj] & 0xFF);
sbin/restore/interactive.c
389
char *cp, *bp;
sbin/restore/interactive.c
394
bp = output;
sbin/restore/interactive.c
405
*bp++ = *cp++;
sbin/restore/interactive.c
412
*bp++ = *cp++;
sbin/restore/interactive.c
420
*bp++ = *cp++;
sbin/restore/interactive.c
427
*bp = '\0';
sbin/setkey/parse.y
482
caddr_t bp;
sbin/setkey/parse.y
493
bp = pp_key;
sbin/setkey/parse.y
495
*bp = ATOX(yp[0]);
sbin/setkey/parse.y
496
yp++, bp++;
sbin/setkey/parse.y
499
*bp = (ATOX(yp[0]) << 4) | ATOX(yp[1]);
sbin/setkey/parse.y
500
yp += 2, bp++;
secure/lib/libcrypt/crypt-blowfish.c
102
while (bp < buffer + len) {
secure/lib/libcrypt/crypt-blowfish.c
110
*bp++ = (c1 << 2) | ((c2 & 0x30) >> 4);
secure/lib/libcrypt/crypt-blowfish.c
111
if (bp >= buffer + len)
secure/lib/libcrypt/crypt-blowfish.c
118
*bp++ = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2);
secure/lib/libcrypt/crypt-blowfish.c
119
if (bp >= buffer + len)
secure/lib/libcrypt/crypt-blowfish.c
125
*bp++ = ((c3 & 0x03) << 6) | c4;
secure/lib/libcrypt/crypt-blowfish.c
267
u_int8_t *bp = buffer;
secure/lib/libcrypt/crypt-blowfish.c
272
*bp++ = Base64Code[(c1 >> 2)];
secure/lib/libcrypt/crypt-blowfish.c
275
*bp++ = Base64Code[c1];
secure/lib/libcrypt/crypt-blowfish.c
280
*bp++ = Base64Code[c1];
secure/lib/libcrypt/crypt-blowfish.c
283
*bp++ = Base64Code[c1];
secure/lib/libcrypt/crypt-blowfish.c
288
*bp++ = Base64Code[c1];
secure/lib/libcrypt/crypt-blowfish.c
289
*bp++ = Base64Code[c2 & 0x3f];
secure/lib/libcrypt/crypt-blowfish.c
291
*bp = '\0';
secure/lib/libcrypt/crypt-blowfish.c
99
u_int8_t *bp = buffer;
stand/common/gfx_fb.c
2434
vt_font_bitmap_data_t *bp;
stand/common/gfx_fb.c
2447
bp = fl->font_data;
stand/common/gfx_fb.c
2448
if (bp->vfbd_font != NULL && fl->font_flags != FONT_RELOAD)
stand/common/gfx_fb.c
2449
return (bp);
stand/common/gfx_fb.c
2470
bp->vfbd_uncompressed_size =
stand/common/gfx_fb.c
2472
bp->vfbd_compressed_size =
stand/common/gfx_fb.c
2491
bp->vfbd_font = fp;
stand/common/gfx_fb.c
2492
return (bp);
stand/common/gfx_fb.c
2502
bp = NULL;
stand/common/gfx_fb.c
2506
bp = NULL;
stand/common/gfx_fb.c
2510
bp = NULL;
stand/common/gfx_fb.c
2521
bp->vfbd_uncompressed_size = size;
stand/common/gfx_fb.c
2556
bp->vfbd_font = fp;
stand/common/gfx_fb.c
2557
bp->vfbd_compressed_size = 0;
stand/common/gfx_fb.c
2562
return (bp);
stand/common/gfx_fb.c
2569
bp = NULL;
stand/common/gfx_fb.c
573
uint8_t rm, rp, gm, gp, bm, bp;
stand/common/gfx_fb.c
599
bp = ffs(gfx_state.tg_fb.fb_mask_blue) - 1;
stand/common/gfx_fb.c
602
bm = gfx_state.tg_fb.fb_mask_blue >> bp;
stand/common/gfx_fb.c
608
ffs(bm) - 1 == 8 && bp == 0;
stand/common/gfx_fb.c
649
p->Blue = (c >> bp) & bm;
stand/common/gfx_fb.c
673
uint8_t rm, rp, gm, gp, bm, bp;
stand/common/gfx_fb.c
699
bp = ffs(gfx_state.tg_fb.fb_mask_blue) - 1;
stand/common/gfx_fb.c
702
bm = gfx_state.tg_fb.fb_mask_blue >> bp;
stand/common/gfx_fb.c
708
ffs(bm) - 1 == 8 && bp == 0;
stand/common/gfx_fb.c
732
(p->Blue & bm) << bp;
stand/efi/loader/main.c
782
uint8_t *bp;
stand/efi/loader/main.c
785
bp = p;
stand/efi/loader/main.c
788
sum += *bp++;
stand/kboot/kboot/arch/amd64/load_addr.c
66
struct linux_boot_params bp;
stand/kboot/kboot/arch/amd64/load_addr.c
82
if (data_from_kernel("boot_params", &bp, sizeof(bp))) {
stand/kboot/kboot/arch/amd64/load_addr.c
85
systbl = (uint64_t)bp.efi_info.efi_systab_hi << 32 |
stand/kboot/kboot/arch/amd64/load_addr.c
86
bp.efi_info.efi_systab;
stand/kboot/kboot/arch/amd64/load_addr.c
87
memmap = (uint64_t)bp.efi_info.efi_memmap_hi << 32 |
stand/kboot/kboot/arch/amd64/load_addr.c
88
bp.efi_info.efi_memmap;
stand/kboot/kboot/arch/amd64/load_addr.c
91
efi_read_from_pa(memmap, bp.efi_info.efi_memmap_size,
stand/kboot/kboot/arch/amd64/load_addr.c
92
bp.efi_info.efi_memdesc_size, bp.efi_info.efi_memdesc_version);
stand/kboot/kboot/arch/amd64/load_addr.c
95
bp.efi_info.efi_memdesc_version, bp.efi_info.efi_memdesc_size,
stand/kboot/kboot/arch/amd64/load_addr.c
96
bp.efi_info.efi_memmap_size, memmap);
stand/kboot/libkboot/dfk.c
286
struct boot_params bp;
stand/kboot/libkboot/dfk.c
288
if (data_from_kernel("boot_params", &bp, sizeof(bp))) {
stand/kboot/libkboot/dfk.c
292
bp.efi_info.efi_loader_signature,
stand/kboot/libkboot/dfk.c
293
(long)(bp.efi_info.efi_systab | ((long)bp.efi_info.efi_systab_hi << 32)),
stand/kboot/libkboot/dfk.c
294
(long)(bp.efi_info.efi_memmap | ((long)bp.efi_info.efi_memmap_hi << 32)),
stand/kboot/libkboot/dfk.c
295
bp.efi_info.efi_memmap_size, bp.efi_info.efi_memdesc_size,
stand/kboot/libkboot/dfk.c
296
bp.efi_info.efi_memdesc_version);
stand/libsa/bootp.c
125
struct bootp *bp;
stand/libsa/bootp.c
142
bp = &wbuf.wbootp;
stand/libsa/bootp.c
143
bzero(bp, sizeof(*bp));
stand/libsa/bootp.c
145
bp->bp_op = BOOTREQUEST;
stand/libsa/bootp.c
146
bp->bp_htype = 1; /* 10Mb Ethernet (48 bits) */
stand/libsa/bootp.c
147
bp->bp_hlen = 6;
stand/libsa/bootp.c
148
bp->bp_xid = htonl(d->xid);
stand/libsa/bootp.c
149
MACPY(d->myea, bp->bp_chaddr);
stand/libsa/bootp.c
150
strncpy(bp->bp_file, bootfile, sizeof(bp->bp_file));
stand/libsa/bootp.c
151
bcopy(vm_rfc1048, bp->bp_vend, sizeof(vm_rfc1048));
stand/libsa/bootp.c
153
bp->bp_vend[4] = TAG_DHCP_MSGTYPE;
stand/libsa/bootp.c
154
bp->bp_vend[5] = 1;
stand/libsa/bootp.c
155
bp->bp_vend[6] = DHCPDISCOVER;
stand/libsa/bootp.c
156
bootp_fill_request(&bp->bp_vend[7]);
stand/libsa/bootp.c
159
bp->bp_vend[4] = TAG_END;
stand/libsa/bootp.c
173
bootpsend, bp, sizeof(*bp),
stand/libsa/bootp.c
182
bp->bp_vend[6] = DHCPREQUEST;
stand/libsa/bootp.c
183
bp->bp_vend[7] = TAG_REQ_ADDR;
stand/libsa/bootp.c
184
bp->bp_vend[8] = 4;
stand/libsa/bootp.c
185
bcopy(&rbootp->bp_yiaddr, &bp->bp_vend[9], 4);
stand/libsa/bootp.c
186
bp->bp_vend[13] = TAG_SERVERID;
stand/libsa/bootp.c
187
bp->bp_vend[14] = 4;
stand/libsa/bootp.c
188
bcopy(&dhcp_serverip.s_addr, &bp->bp_vend[15], 4);
stand/libsa/bootp.c
189
bp->bp_vend[19] = TAG_LEASETIME;
stand/libsa/bootp.c
190
bp->bp_vend[20] = 4;
stand/libsa/bootp.c
192
bcopy(&leasetime, &bp->bp_vend[21], 4);
stand/libsa/bootp.c
193
bootp_fill_request(&bp->bp_vend[25]);
stand/libsa/bootp.c
199
bootpsend, bp, sizeof(*bp),
stand/libsa/bootp.c
247
struct bootp *bp;
stand/libsa/bootp.c
250
bp = pkt;
stand/libsa/bootp.c
251
bp->bp_secs = htons((u_short)(getsecs() - bot));
stand/libsa/bootp.c
263
struct bootp *bp;
stand/libsa/bootp.c
269
n = readudp(d, &ptr, (void **)&bp, tleft);
stand/libsa/bootp.c
273
DEBUG_PRINTF(1,("bootprecv: checked. bp = %p, n = %zd\n", bp, n));
stand/libsa/bootp.c
275
if (bp->bp_xid != htonl(d->xid)) {
stand/libsa/bootp.c
277
d->xid, ntohl(bp->bp_xid)));
stand/libsa/bootp.c
284
if (bcmp(vm_rfc1048, bp->bp_vend, sizeof(vm_rfc1048)) == 0) {
stand/libsa/bootp.c
286
if (vend_rfc1048(bp->bp_vend, vsize) != 0)
stand/libsa/bootp.c
290
if (bp->bp_op == BOOTREPLY &&
stand/libsa/bootp.c
297
bcopy(bp, bootp_response, bootp_response_size);
stand/libsa/bootp.c
302
else if (bcmp(vm_cmu, bp->bp_vend, sizeof(vm_cmu)) == 0)
stand/libsa/bootp.c
303
vend_cmu(bp->bp_vend);
stand/libsa/bootp.c
306
printf("bootprecv: unknown vendor 0x%lx\n", (long)bp->bp_vend);
stand/libsa/bootp.c
309
*payload = bp;
stand/libsa/zfs/zfsimpl.c
144
static int zio_read(const spa_t *spa, const blkptr_t *bp, void *buf);
stand/libsa/zfs/zfsimpl.c
145
static int zio_read_impl(const spa_t *spa, const blkptr_t *bp, void *buf,
stand/libsa/zfs/zfsimpl.c
1651
blkptr_t bp;
stand/libsa/zfs/zfsimpl.c
1656
BP_ZERO(&bp);
stand/libsa/zfs/zfsimpl.c
1657
BP_SET_LSIZE(&bp, size);
stand/libsa/zfs/zfsimpl.c
1658
BP_SET_PSIZE(&bp, size);
stand/libsa/zfs/zfsimpl.c
1659
BP_SET_CHECKSUM(&bp, ZIO_CHECKSUM_LABEL);
stand/libsa/zfs/zfsimpl.c
1660
BP_SET_COMPRESS(&bp, ZIO_COMPRESS_OFF);
stand/libsa/zfs/zfsimpl.c
1661
DVA_SET_OFFSET(BP_IDENTITY(&bp), off);
stand/libsa/zfs/zfsimpl.c
1662
ZIO_SET_CHECKSUM(&bp.blk_cksum, off, 0, 0, 0);
stand/libsa/zfs/zfsimpl.c
1664
return (vdev_read_phys(vd, &bp, buf, off, size));
stand/libsa/zfs/zfsimpl.c
2283
zio_read_gang(const spa_t *spa, const blkptr_t *bp, void *buf)
stand/libsa/zfs/zfsimpl.c
2292
for (int dva = 0; dva < BP_GET_NDVAS(bp); dva++) {
stand/libsa/zfs/zfsimpl.c
2294
DVA_GET_VDEV(&bp->blk_dva[dva]));
stand/libsa/zfs/zfsimpl.c
2299
gbh_bp = *bp;
stand/libsa/zfs/zfsimpl.c
230
vdev_read_phys(vdev_t *vdev, const blkptr_t *bp, void *buf,
stand/libsa/zfs/zfsimpl.c
2339
if (zio_checksum_verify(spa, bp, buf))
stand/libsa/zfs/zfsimpl.c
2345
zio_read_impl(const spa_t *spa, const blkptr_t *bp, void *buf, bool print)
stand/libsa/zfs/zfsimpl.c
2347
int cpfunc = BP_GET_COMPRESS(bp);
stand/libsa/zfs/zfsimpl.c
2355
if (BP_IS_EMBEDDED(bp)) {
stand/libsa/zfs/zfsimpl.c
2356
ASSERT(BPE_GET_ETYPE(bp) == BP_EMBEDDED_TYPE_DATA);
stand/libsa/zfs/zfsimpl.c
2358
size = BPE_GET_PSIZE(bp);
stand/libsa/zfs/zfsimpl.c
2369
decode_embedded_bp_compressed(bp, pbuf);
stand/libsa/zfs/zfsimpl.c
2374
size, buf, BP_GET_LSIZE(bp));
stand/libsa/zfs/zfsimpl.c
2386
const dva_t *dva = &bp->blk_dva[i];
stand/libsa/zfs/zfsimpl.c
239
if (bp) {
stand/libsa/zfs/zfsimpl.c
240
psize = BP_GET_PSIZE(bp);
stand/libsa/zfs/zfsimpl.c
2405
size = BP_GET_PSIZE(bp);
stand/libsa/zfs/zfsimpl.c
2411
if (size != BP_GET_PSIZE(bp) || cpfunc != ZIO_COMPRESS_OFF)
stand/libsa/zfs/zfsimpl.c
2422
error = zio_read_gang(spa, bp, pbuf);
stand/libsa/zfs/zfsimpl.c
2424
error = vdev->v_read(vdev, bp, pbuf, offset, size);
stand/libsa/zfs/zfsimpl.c
2428
BP_GET_PSIZE(bp), buf, BP_GET_LSIZE(bp));
stand/libsa/zfs/zfsimpl.c
2429
else if (size != BP_GET_PSIZE(bp))
stand/libsa/zfs/zfsimpl.c
2430
bcopy(pbuf, buf, BP_GET_PSIZE(bp));
stand/libsa/zfs/zfsimpl.c
2446
zio_read(const spa_t *spa, const blkptr_t *bp, void *buf)
stand/libsa/zfs/zfsimpl.c
2448
return (zio_read_impl(spa, bp, buf, true));
stand/libsa/zfs/zfsimpl.c
247
if (bp != NULL)
stand/libsa/zfs/zfsimpl.c
248
rc = zio_checksum_verify(vdev->v_spa, bp, buf);
stand/libsa/zfs/zfsimpl.c
2488
blkptr_t bp;
stand/libsa/zfs/zfsimpl.c
2505
bp = indbp[ibn];
stand/libsa/zfs/zfsimpl.c
2506
if (BP_IS_HOLE(&bp)) {
stand/libsa/zfs/zfsimpl.c
2510
rc = zio_read(spa, &bp, dnode_cache_buf);
stand/libsa/zfs/zfsimpl.c
3722
blkptr_t *bp = DN_SPILL_BLKPTR(dn);
stand/libsa/zfs/zfsimpl.c
3725
size = BP_GET_LSIZE(bp);
stand/libsa/zfs/zfsimpl.c
3730
error = zio_read(spa, bp, buf);
stand/libsa/zfs/zfsimpl.c
3771
blkptr_t *bp;
stand/libsa/zfs/zfsimpl.c
3775
bp = DN_SPILL_BLKPTR(dn);
stand/libsa/zfs/zfsimpl.c
3777
size = BP_GET_LSIZE(bp);
stand/libsa/zfs/zfsimpl.c
3782
rc = zio_read(spa, bp, buf);
stand/libsa/zfs/zfsimpl.c
694
vdev_indirect_read(vdev_t *vdev, const blkptr_t *bp, void *buf,
stand/libsa/zfs/zfsimpl.c
712
zio.io_bp = (blkptr_t *)bp;
stand/libsa/zfs/zfsimpl.c
782
vdev_disk_read(vdev_t *vdev, const blkptr_t *bp, void *buf,
stand/libsa/zfs/zfsimpl.c
786
return (vdev_read_phys(vdev, bp, buf,
stand/libsa/zfs/zfsimpl.c
791
vdev_missing_read(vdev_t *vdev __unused, const blkptr_t *bp __unused,
stand/libsa/zfs/zfsimpl.c
799
vdev_mirror_read(vdev_t *vdev, const blkptr_t *bp, void *buf,
stand/libsa/zfs/zfsimpl.c
809
rc = kid->v_read(kid, bp, buf, offset, bytes);
stand/libsa/zfs/zfsimpl.c
818
vdev_replacing_read(vdev_t *vdev, const blkptr_t *bp, void *buf,
stand/libsa/zfs/zfsimpl.c
835
return (kid->v_read(kid, bp, buf, offset, bytes));
sys/amd64/amd64/exec_machdep.c
1002
if (bp & 0x02) {
sys/amd64/amd64/exec_machdep.c
1005
if (bp & 0x04) {
sys/amd64/amd64/exec_machdep.c
1008
if (bp & 0x08) {
sys/amd64/amd64/exec_machdep.c
968
u_int64_t bp; /* breakpoint bits extracted from dr6 */
sys/amd64/amd64/exec_machdep.c
973
bp = dr6 & DBREG_DR6_BMASK;
sys/amd64/amd64/exec_machdep.c
974
if (bp == 0) {
sys/amd64/amd64/exec_machdep.c
999
if (bp & 0x01) {
sys/cam/ata/ata_da.c
1077
adastrategy(struct bio *bp)
sys/cam/ata/ata_da.c
1082
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
sys/cam/ata/ata_da.c
1087
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("adastrategy(%p)\n", bp));
sys/cam/ata/ata_da.c
1094
biofinish(bp, NULL, ENXIO);
sys/cam/ata/ata_da.c
1103
if (bp->bio_cmd == BIO_ZONE)
sys/cam/ata/ata_da.c
1104
bp->bio_flags |= BIO_ORDERED;
sys/cam/ata/ata_da.c
1109
cam_iosched_queue_work(softc->cam_iosched, bp);
sys/cam/ata/ata_da.c
1618
adagetattr(struct bio *bp)
sys/cam/ata/ata_da.c
1623
if (g_handleattr_int(bp, "GEOM::canspeedup", ada_enable_biospeedup))
sys/cam/ata/ata_da.c
1626
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
sys/cam/ata/ata_da.c
1628
ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute,
sys/cam/ata/ata_da.c
1632
bp->bio_completed = bp->bio_length;
sys/cam/ata/ata_da.c
1990
ada_dsmtrim_req_create(struct ada_softc *softc, struct bio *bp, struct trim_request *req)
sys/cam/ata/ata_da.c
1998
uint64_t lba = bp->bio_pblkno;
sys/cam/ata/ata_da.c
1999
int count = bp->bio_bcount / softc->params.secsize;
sys/cam/ata/ata_da.c
2037
TAILQ_INSERT_TAIL(&req->bps, bp, bio_queue);
sys/cam/ata/ata_da.c
2039
bp = cam_iosched_next_trim(softc->cam_iosched);
sys/cam/ata/ata_da.c
2040
if (bp == NULL)
sys/cam/ata/ata_da.c
2042
if (bp->bio_bcount / softc->params.secsize >
sys/cam/ata/ata_da.c
2044
cam_iosched_put_back_trim(softc->cam_iosched, bp);
sys/cam/ata/ata_da.c
2056
ada_dsmtrim(struct ada_softc *softc, struct bio *bp, struct ccb_ataio *ataio)
sys/cam/ata/ata_da.c
2061
ranges = ada_dsmtrim_req_create(softc, bp, req);
sys/cam/ata/ata_da.c
2075
ada_ncq_dsmtrim(struct ada_softc *softc, struct bio *bp, struct ccb_ataio *ataio)
sys/cam/ata/ata_da.c
2080
ranges = ada_dsmtrim_req_create(softc, bp, req);
sys/cam/ata/ata_da.c
2099
ada_cfaerase(struct ada_softc *softc, struct bio *bp, struct ccb_ataio *ataio)
sys/cam/ata/ata_da.c
2102
uint64_t lba = bp->bio_pblkno;
sys/cam/ata/ata_da.c
2103
uint16_t count = bp->bio_bcount / softc->params.secsize;
sys/cam/ata/ata_da.c
2107
TAILQ_INSERT_TAIL(&req->bps, bp, bio_queue);
sys/cam/ata/ata_da.c
2141
ada_zone_cmd(struct cam_periph *periph, union ccb *ccb, struct bio *bp,
sys/cam/ata/ata_da.c
2149
if (bp->bio_cmd != BIO_ZONE) {
sys/cam/ata/ata_da.c
2156
switch (bp->bio_zone.zone_cmd) {
sys/cam/ata/ata_da.c
2165
zone_sa = ada_zone_bio_to_ata(bp->bio_zone.zone_cmd);
sys/cam/ata/ata_da.c
2168
"cmd %#x to ATA\n", bp->bio_zone.zone_cmd);
sys/cam/ata/ata_da.c
2174
lba = bp->bio_zone.zone_params.rwp.id;
sys/cam/ata/ata_da.c
2176
if (bp->bio_zone.zone_params.rwp.flags &
sys/cam/ata/ata_da.c
2201
rep = &bp->bio_zone.zone_params.report;
sys/cam/ata/ata_da.c
2257
bp->bio_bcount = bp->bio_length;
sys/cam/ata/ata_da.c
2266
params = &bp->bio_zone.zone_params.disk_params;
sys/cam/ata/ata_da.c
2356
struct bio *bp;
sys/cam/ata/ata_da.c
2363
bp = cam_iosched_next_bio(softc->cam_iosched);
sys/cam/ata/ata_da.c
2364
if (bp == NULL) {
sys/cam/ata/ata_da.c
2369
if ((bp->bio_flags & BIO_ORDERED) != 0 ||
sys/cam/ata/ata_da.c
2370
(bp->bio_cmd != BIO_DELETE && (softc->flags & ADA_FLAG_NEED_OTAG) != 0)) {
sys/cam/ata/ata_da.c
2377
switch (bp->bio_cmd) {
sys/cam/ata/ata_da.c
2381
uint64_t lba = bp->bio_pblkno;
sys/cam/ata/ata_da.c
2382
uint16_t count = bp->bio_bcount / softc->params.secsize;
sys/cam/ata/ata_da.c
2386
if (bp->bio_cmd == BIO_WRITE) {
sys/cam/ata/ata_da.c
2393
data_ptr = bp->bio_data;
sys/cam/ata/ata_da.c
2394
if ((bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0) {
sys/cam/ata/ata_da.c
2396
data_ptr = bp;
sys/cam/ata/ata_da.c
2411
if (bp->bio_cmd == BIO_READ) {
sys/cam/ata/ata_da.c
2430
biofinish(bp, NULL, EIO);
sys/cam/ata/ata_da.c
2436
KASSERT((bp->bio_flags & BIO_UNMAPPED) == 0 ||
sys/cam/ata/ata_da.c
2437
round_page(bp->bio_bcount + bp->bio_ma_offset) /
sys/cam/ata/ata_da.c
2438
PAGE_SIZE == bp->bio_ma_n,
sys/cam/ata/ata_da.c
2439
("Short bio %p", bp));
sys/cam/ata/ata_da.c
2446
bp->bio_bcount,
sys/cam/ata/ata_da.c
2450
if (bp->bio_cmd == BIO_READ) {
sys/cam/ata/ata_da.c
2461
if (bp->bio_cmd == BIO_READ) {
sys/cam/ata/ata_da.c
2469
if (bp->bio_cmd == BIO_READ) {
sys/cam/ata/ata_da.c
2481
if (bp->bio_cmd == BIO_READ) {
sys/cam/ata/ata_da.c
2489
if (bp->bio_cmd == BIO_READ) {
sys/cam/ata/ata_da.c
2503
ada_ncq_dsmtrim(softc, bp, ataio);
sys/cam/ata/ata_da.c
2506
ada_dsmtrim(softc, bp, ataio);
sys/cam/ata/ata_da.c
2509
ada_cfaerase(softc, bp, ataio);
sys/cam/ata/ata_da.c
2512
biofinish(bp, NULL, EOPNOTSUPP);
sys/cam/ata/ata_da.c
2541
error = ada_zone_cmd(periph, start_ccb, bp, &queue_ccb);
sys/cam/ata/ata_da.c
2551
biofinish(bp, NULL, error);
sys/cam/ata/ata_da.c
2560
biofinish(bp, NULL, EOPNOTSUPP);
sys/cam/ata/ata_da.c
2567
start_ccb->ccb_h.ccb_bp = bp;
sys/cam/ata/ata_da.c
2782
struct bio *bp;
sys/cam/ata/ata_da.c
2784
bp = (struct bio *)ccb->ccb_h.ccb_bp;
sys/cam/ata/ata_da.c
2786
switch (bp->bio_zone.zone_cmd) {
sys/cam/ata/ata_da.c
2801
rep = &bp->bio_zone.zone_params.report;
sys/cam/ata/ata_da.c
2820
bp->bio_error = EIO;
sys/cam/ata/ata_da.c
2821
bp->bio_flags |= BIO_ERROR;
sys/cam/ata/ata_da.c
2822
bp->bio_resid = bp->bio_bcount;
sys/cam/ata/ata_da.c
2845
bp->bio_resid = bp->bio_bcount;
sys/cam/ata/ata_da.c
2856
bp->bio_resid = bp->bio_bcount;
sys/cam/ata/ata_da.c
2867
bp->bio_resid = bp->bio_bcount;
sys/cam/ata/ata_da.c
2900
bp->bio_resid = bp->bio_bcount - (num_to_fill * sizeof(*entry));
sys/cam/ata/ata_da.c
2911
bp->bio_zone.zone_cmd);
sys/cam/ata/ata_da.c
2915
if (bp->bio_zone.zone_cmd == DISK_ZONE_REPORT_ZONES)
sys/cam/ata/ata_da.c
2940
struct bio *bp;
sys/cam/ata/ata_da.c
2948
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
sys/cam/ata/ata_da.c
2982
bp->bio_error = error;
sys/cam/ata/ata_da.c
2984
bp->bio_resid = bp->bio_bcount;
sys/cam/ata/ata_da.c
2985
bp->bio_flags |= BIO_ERROR;
sys/cam/ata/ata_da.c
2987
if (bp->bio_cmd == BIO_ZONE)
sys/cam/ata/ata_da.c
2990
bp->bio_resid = 0;
sys/cam/ata/ata_da.c
2992
bp->bio_resid = ataio->resid;
sys/cam/ata/ata_da.c
2994
if ((bp->bio_resid > 0)
sys/cam/ata/ata_da.c
2995
&& (bp->bio_cmd != BIO_ZONE))
sys/cam/ata/ata_da.c
2996
bp->bio_flags |= BIO_ERROR;
sys/cam/ata/ata_da.c
3009
cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
sys/cam/ata/ata_da.c
3045
biodone(bp);
sys/cam/ata/ata_da.c
860
static int adagetattr(struct bio *bp);
sys/cam/ata/ata_da.c
866
static void ada_dsmtrim(struct ada_softc *softc, struct bio *bp,
sys/cam/ata/ata_da.c
868
static void ada_cfaerase(struct ada_softc *softc, struct bio *bp,
sys/cam/ata/ata_da.c
872
struct bio *bp, int *queue_ccb);
sys/cam/cam_iosched.c
1356
struct bio *bp;
sys/cam/cam_iosched.c
1367
bp = bioq_first(&isc->write_queue);
sys/cam/cam_iosched.c
1368
if (bp == NULL) {
sys/cam/cam_iosched.c
1392
if (cam_iosched_limiter_iop(&isc->write_stats, bp) != 0) {
sys/cam/cam_iosched.c
1404
bioq_remove(&isc->write_queue, bp);
sys/cam/cam_iosched.c
1405
if (bp->bio_cmd == BIO_WRITE) {
sys/cam/cam_iosched.c
1411
printf("HWQ : %p %#x\n", bp, bp->bio_cmd);
sys/cam/cam_iosched.c
1413
return bp;
sys/cam/cam_iosched.c
1421
cam_iosched_put_back_trim(struct cam_iosched_softc *isc, struct bio *bp)
sys/cam/cam_iosched.c
1423
bioq_insert_head(&isc->trim_queue, bp);
sys/cam/cam_iosched.c
1444
struct bio *bp;
sys/cam/cam_iosched.c
1446
bp = bioq_first(&isc->trim_queue);
sys/cam/cam_iosched.c
1447
if (bp == NULL)
sys/cam/cam_iosched.c
1449
bioq_remove(&isc->trim_queue, bp);
sys/cam/cam_iosched.c
1457
return bp;
sys/cam/cam_iosched.c
1471
struct bio *bp;
sys/cam/cam_iosched.c
1477
bp = bioq_first(&isc->trim_queue);
sys/cam/cam_iosched.c
1478
if (bp == NULL)
sys/cam/cam_iosched.c
1513
if (cam_iosched_limiter_iop(&isc->trim_stats, bp) != 0) {
sys/cam/cam_iosched.c
1529
bio_next(struct bio *bp)
sys/cam/cam_iosched.c
1531
bp = TAILQ_NEXT(bp, bio_queue);
sys/cam/cam_iosched.c
1536
if (bp == NULL || bp->bio_flags & BIO_ORDERED)
sys/cam/cam_iosched.c
1538
return bp;
sys/cam/cam_iosched.c
1557
struct bio *bp;
sys/cam/cam_iosched.c
1566
if ((bp = cam_iosched_get_trim(isc)) != NULL)
sys/cam/cam_iosched.c
1567
return bp;
sys/cam/cam_iosched.c
1576
if ((bp = cam_iosched_get_write(isc)) != NULL)
sys/cam/cam_iosched.c
1577
return bp;
sys/cam/cam_iosched.c
1585
for (bp = bioq_first(&isc->bio_queue); bp != NULL;
sys/cam/cam_iosched.c
1586
bp = bio_next(bp)) {
sys/cam/cam_iosched.c
1593
if (bp->bio_cmd == BIO_READ) {
sys/cam/cam_iosched.c
1595
cam_iosched_limiter_iop(&isc->read_stats, bp) != 0) {
sys/cam/cam_iosched.c
1608
if (bp->bio_cmd == BIO_WRITE) {
sys/cam/cam_iosched.c
1610
cam_iosched_limiter_iop(&isc->write_stats, bp) != 0) {
sys/cam/cam_iosched.c
1624
bp = bioq_first(&isc->bio_queue);
sys/cam/cam_iosched.c
1626
if (bp == NULL)
sys/cam/cam_iosched.c
1628
bioq_remove(&isc->bio_queue, bp);
sys/cam/cam_iosched.c
1631
if (bp->bio_cmd == BIO_READ) {
sys/cam/cam_iosched.c
1635
} else if (bp->bio_cmd == BIO_WRITE) {
sys/cam/cam_iosched.c
1642
printf("HWQ : %p %#x\n", bp, bp->bio_cmd);
sys/cam/cam_iosched.c
1644
return bp;
sys/cam/cam_iosched.c
1654
cam_iosched_queue_work(struct cam_iosched_softc *isc, struct bio *bp)
sys/cam/cam_iosched.c
1669
if (bp->bio_cmd == BIO_SPEEDUP) {
sys/cam/cam_iosched.c
1675
(bp->bio_length == 0 || len < bp->bio_length)) {
sys/cam/cam_iosched.c
1681
if (bp->bio_length > 0) {
sys/cam/cam_iosched.c
1682
if (bp->bio_length > len)
sys/cam/cam_iosched.c
1683
bp->bio_resid = bp->bio_length - len;
sys/cam/cam_iosched.c
1685
bp->bio_resid = 0;
sys/cam/cam_iosched.c
1687
bp->bio_error = 0;
sys/cam/cam_iosched.c
1688
biodone(bp);
sys/cam/cam_iosched.c
1697
if (bp->bio_cmd == BIO_FLUSH && isc->trim_ticks > 0)
sys/cam/cam_iosched.c
1704
if (bp->bio_cmd == BIO_DELETE) {
sys/cam/cam_iosched.c
1705
bioq_insert_tail(&isc->trim_queue, bp);
sys/cam/cam_iosched.c
1716
(bp->bio_cmd != BIO_READ)) {
sys/cam/cam_iosched.c
1718
bioq_disksort(&isc->write_queue, bp);
sys/cam/cam_iosched.c
1720
bioq_insert_tail(&isc->write_queue, bp);
sys/cam/cam_iosched.c
1722
printf("Qw : %p %#x\n", bp, bp->bio_cmd);
sys/cam/cam_iosched.c
1723
if (bp->bio_cmd == BIO_WRITE) {
sys/cam/cam_iosched.c
1731
bioq_disksort(&isc->bio_queue, bp);
sys/cam/cam_iosched.c
1733
bioq_insert_tail(&isc->bio_queue, bp);
sys/cam/cam_iosched.c
1736
printf("Qr : %p %#x\n", bp, bp->bio_cmd);
sys/cam/cam_iosched.c
1737
if (bp->bio_cmd == BIO_READ) {
sys/cam/cam_iosched.c
1740
} else if (bp->bio_cmd == BIO_WRITE) {
sys/cam/cam_iosched.c
1774
cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp,
sys/cam/cam_iosched.c
1783
printf("done: %p %#x\n", bp, bp->bio_cmd);
sys/cam/cam_iosched.c
1784
if (bp->bio_cmd == BIO_WRITE) {
sys/cam/cam_iosched.c
1785
retval = cam_iosched_limiter_iodone(&isc->write_stats, bp);
sys/cam/cam_iosched.c
1786
if ((bp->bio_flags & BIO_ERROR) != 0)
sys/cam/cam_iosched.c
1790
} else if (bp->bio_cmd == BIO_READ) {
sys/cam/cam_iosched.c
1791
retval = cam_iosched_limiter_iodone(&isc->read_stats, bp);
sys/cam/cam_iosched.c
1792
if ((bp->bio_flags & BIO_ERROR) != 0)
sys/cam/cam_iosched.c
1796
} else if (bp->bio_cmd == BIO_DELETE) {
sys/cam/cam_iosched.c
1797
if ((bp->bio_flags & BIO_ERROR) != 0)
sys/cam/cam_iosched.c
1801
} else if (bp->bio_cmd != BIO_FLUSH) {
sys/cam/cam_iosched.c
1803
printf("Completing command with bio_cmd == %#x\n", bp->bio_cmd);
sys/cam/cam_iosched.c
1806
if ((bp->bio_flags & BIO_ERROR) == 0 && done_ccb != NULL &&
sys/cam/cam_iosched.c
1812
cam_iosched_io_metric_update(isc, sim_latency, bp);
sys/cam/cam_iosched.c
1819
isc->latfcn(isc->latarg, sim_latency, bp);
sys/cam/cam_iosched.c
1937
const struct bio *bp)
sys/cam/cam_iosched.c
1939
daddr_t lba = bp->bio_pblkno;
sys/cam/cam_iosched.c
1940
daddr_t cnt = bp->bio_bcount / iop->softc->disk->d_sectorsize;
sys/cam/cam_iosched.c
1961
const struct bio *bp)
sys/cam/cam_iosched.c
1971
cam_iosched_devctl_outlier(iop, sim_latency, bp);
sys/cam/cam_iosched.c
2052
sbintime_t sim_latency, const struct bio *bp)
sys/cam/cam_iosched.c
2054
switch (bp->bio_cmd) {
sys/cam/cam_iosched.c
2056
cam_iosched_update(&isc->read_stats, sim_latency, bp);
sys/cam/cam_iosched.c
2059
cam_iosched_update(&isc->write_stats, sim_latency, bp);
sys/cam/cam_iosched.c
2062
cam_iosched_update(&isc->trim_stats, sim_latency, bp);
sys/cam/cam_iosched.c
2073
struct bio *bp;
sys/cam/cam_iosched.c
2075
TAILQ_FOREACH(bp, &bq->queue, bio_queue) {
sys/cam/cam_iosched.c
386
cam_iosched_limiter_iop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
395
return limsw[lim].l_iop(ios, bp);
sys/cam/cam_iosched.c
401
cam_iosched_limiter_caniop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
410
return limsw[lim].l_caniop(ios, bp);
sys/cam/cam_iosched.c
416
cam_iosched_limiter_iodone(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
425
return limsw[lim].l_iodone(ios, bp);
sys/cam/cam_iosched.c
435
cam_iosched_qd_iop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
445
cam_iosched_qd_caniop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
455
cam_iosched_qd_iodone(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
507
cam_iosched_iops_caniop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
521
cam_iosched_iops_iop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
525
rv = cam_iosched_limiter_caniop(ios, bp);
sys/cam/cam_iosched.c
566
cam_iosched_bw_caniop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
592
cam_iosched_bw_iop(struct iop_stats *ios, struct bio *bp)
sys/cam/cam_iosched.c
596
rv = cam_iosched_limiter_caniop(ios, bp);
sys/cam/cam_iosched.c
598
ios->l_value1 -= bp->bio_length;
sys/cam/cam_iosched.c
765
sbintime_t sim_latency, const struct bio *bp);
sys/cam/cam_iosched.c
799
struct bio *bp;
sys/cam/cam_iosched.c
801
bp = bioq_first(&isc->trim_queue);
sys/cam/cam_iosched.c
808
if (bp == NULL || cam_iosched_limiter_caniop(&isc->trim_stats, bp) != 0)
sys/cam/cam_iosched.c
829
return !(isc->flags & CAM_IOSCHED_FLAG_TRIM_ACTIVE) && bp != NULL;
sys/cam/cam_iosched.h
102
int cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, union ccb *done_ccb);
sys/cam/cam_iosched.h
91
void cam_iosched_queue_work(struct cam_iosched_softc *isc, struct bio *bp);
sys/cam/cam_iosched.h
96
void cam_iosched_put_back_trim(struct cam_iosched_softc *isc, struct bio *bp);
sys/cam/cam_periph.c
1087
if (mapinfo->bp[i]) {
sys/cam/cam_periph.c
1089
vunmapbuf(mapinfo->bp[i]);
sys/cam/cam_periph.c
1092
uma_zfree(pbuf_zone, mapinfo->bp[i]);
sys/cam/cam_periph.c
961
mapinfo->bp[i] = uma_zalloc(pbuf_zone, M_WAITOK);
sys/cam/cam_periph.c
964
mapinfo->bp[i]->b_iocmd = (dirs[i] == CAM_DIR_OUT) ?
sys/cam/cam_periph.c
968
if (vmapbuf(mapinfo->bp[i], *data_ptrs[i], lengths[i], 1) < 0) {
sys/cam/cam_periph.c
969
uma_zfree(pbuf_zone, mapinfo->bp[i]);
sys/cam/cam_periph.c
974
*data_ptrs[i] = mapinfo->bp[i]->b_data;
sys/cam/cam_periph.c
983
if (mapinfo->bp[i])
sys/cam/cam_periph.c
984
BUF_KERNPROC(mapinfo->bp[i]);
sys/cam/cam_periph.c
992
if (mapinfo->bp[i]) {
sys/cam/cam_periph.c
993
vunmapbuf(mapinfo->bp[i]);
sys/cam/cam_periph.c
994
uma_zfree(pbuf_zone, mapinfo->bp[i]);
sys/cam/cam_periph.h
159
struct buf *bp[CAM_PERIPH_MAXMAPS];
sys/cam/mmc/mmc_da.c
1766
struct bio *bp;
sys/cam/mmc/mmc_da.c
1783
bp = bioq_first(&part->bio_queue);
sys/cam/mmc/mmc_da.c
1784
if (bp == NULL) {
sys/cam/mmc/mmc_da.c
1787
(bp = bioq_first(&softc->part[part_index]->bio_queue)) != NULL)
sys/cam/mmc/mmc_da.c
1791
if (bp == NULL) {
sys/cam/mmc/mmc_da.c
1814
bioq_remove(&part->bio_queue, bp);
sys/cam/mmc/mmc_da.c
1816
switch (bp->bio_cmd) {
sys/cam/mmc/mmc_da.c
1824
uint64_t blockno = bp->bio_pblkno;
sys/cam/mmc/mmc_da.c
1825
uint16_t count = bp->bio_bcount / MMC_SECTOR_SIZE;
sys/cam/mmc/mmc_da.c
1828
if (bp->bio_cmd == BIO_READ)
sys/cam/mmc/mmc_da.c
1834
if (bp->bio_cmd == BIO_READ) {
sys/cam/mmc/mmc_da.c
1847
start_ccb->ccb_h.flags = (bp->bio_cmd == BIO_READ ? CAM_DIR_IN : CAM_DIR_OUT);
sys/cam/mmc/mmc_da.c
1861
mmcio->cmd.data->data = bp->bio_data;
sys/cam/mmc/mmc_da.c
1863
mmcio->cmd.data->flags = (bp->bio_cmd == BIO_READ ? MMC_DATA_READ : MMC_DATA_WRITE);
sys/cam/mmc/mmc_da.c
1883
biofinish(bp, NULL, EOPNOTSUPP);
sys/cam/mmc/mmc_da.c
1887
start_ccb->ccb_h.ccb_bp = bp;
sys/cam/mmc/mmc_da.c
1901
struct bio *bp;
sys/cam/mmc/mmc_da.c
1961
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
sys/cam/mmc/mmc_da.c
1962
bp->bio_error = error;
sys/cam/mmc/mmc_da.c
1964
bp->bio_resid = bp->bio_bcount;
sys/cam/mmc/mmc_da.c
1965
bp->bio_flags |= BIO_ERROR;
sys/cam/mmc/mmc_da.c
1968
bp->bio_resid = 0;
sys/cam/mmc/mmc_da.c
1969
if (bp->bio_resid > 0)
sys/cam/mmc/mmc_da.c
1970
bp->bio_flags |= BIO_ERROR;
sys/cam/mmc/mmc_da.c
1980
biodone(bp);
sys/cam/mmc/mmc_da.c
499
struct bio *bp;
sys/cam/mmc/mmc_da.c
504
bp = bioq_first(&softc->part[softc->part_curr]->bio_queue);
sys/cam/mmc/mmc_da.c
505
if (bp == NULL) {
sys/cam/mmc/mmc_da.c
508
(bp = bioq_first(&softc->part[i]->bio_queue)) != NULL)
sys/cam/mmc/mmc_da.c
512
if (bp != NULL) {
sys/cam/mmc/mmc_da.c
523
sddastrategy(struct bio *bp)
sys/cam/mmc/mmc_da.c
529
part = (struct sdda_part *)bp->bio_disk->d_drv1;
sys/cam/mmc/mmc_da.c
535
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddastrategy(%p)\n", bp));
sys/cam/mmc/mmc_da.c
542
biofinish(bp, NULL, ENXIO);
sys/cam/mmc/mmc_da.c
549
bioq_disksort(&part->bio_queue, bp);
sys/cam/mmc/mmc_da.c
728
sddagetattr(struct bio *bp)
sys/cam/mmc/mmc_da.c
735
part = (struct sdda_part *)bp->bio_disk->d_drv1;
sys/cam/mmc/mmc_da.c
739
ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute,
sys/cam/mmc/mmc_da.c
743
bp->bio_completed = bp->bio_length;
sys/cam/nvme/nvme_da.c
1106
struct bio *bp;
sys/cam/nvme/nvme_da.c
1108
bp = cam_iosched_next_bio(softc->cam_iosched);
sys/cam/nvme/nvme_da.c
1109
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("ndastart: bio %p\n", bp));
sys/cam/nvme/nvme_da.c
1110
if (bp == NULL) {
sys/cam/nvme/nvme_da.c
1115
switch (bp->bio_cmd) {
sys/cam/nvme/nvme_da.c
1133
if (bp->bio_cmd == BIO_READ) {
sys/cam/nvme/nvme_da.c
1152
biofinish(bp, NULL, EIO);
sys/cam/nvme/nvme_da.c
1158
KASSERT((bp->bio_flags & BIO_UNMAPPED) == 0 ||
sys/cam/nvme/nvme_da.c
1159
round_page(bp->bio_bcount + bp->bio_ma_offset) /
sys/cam/nvme/nvme_da.c
1160
PAGE_SIZE == bp->bio_ma_n,
sys/cam/nvme/nvme_da.c
1161
("Short bio %p", bp));
sys/cam/nvme/nvme_da.c
1162
nda_nvme_rw_bio(softc, &start_ccb->nvmeio, bp, bp->bio_cmd == BIO_READ ?
sys/cam/nvme/nvme_da.c
1185
biofinish(bp, NULL, ENOMEM);
sys/cam/nvme/nvme_da.c
1192
bp1 = bp;
sys/cam/nvme/nvme_da.c
1231
biofinish(bp, NULL, EOPNOTSUPP);
sys/cam/nvme/nvme_da.c
1237
start_ccb->ccb_bp = bp;
sys/cam/nvme/nvme_da.c
1294
struct bio *bp;
sys/cam/nvme/nvme_da.c
1296
bp = (struct bio *)done_ccb->ccb_bp;
sys/cam/nvme/nvme_da.c
1297
bp->bio_error = error;
sys/cam/nvme/nvme_da.c
1299
bp->bio_resid = bp->bio_bcount;
sys/cam/nvme/nvme_da.c
1300
bp->bio_flags |= BIO_ERROR;
sys/cam/nvme/nvme_da.c
1302
bp->bio_resid = 0;
sys/cam/nvme/nvme_da.c
1312
cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
sys/cam/nvme/nvme_da.c
1316
biodone(bp);
sys/cam/nvme/nvme_da.c
263
struct bio *bp, uint32_t rwcmd)
sys/cam/nvme/nvme_da.c
270
if (bp->bio_flags & BIO_UNMAPPED) {
sys/cam/nvme/nvme_da.c
272
payload = bp;
sys/cam/nvme/nvme_da.c
274
payload = bp->bio_data;
sys/cam/nvme/nvme_da.c
277
lba = bp->bio_pblkno;
sys/cam/nvme/nvme_da.c
278
count = bp->bio_bcount / softc->disk->d_sectorsize;
sys/cam/nvme/nvme_da.c
285
bp->bio_bcount, /* dxfer_len */
sys/cam/nvme/nvme_da.c
540
ndastrategy(struct bio *bp)
sys/cam/nvme/nvme_da.c
545
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
sys/cam/nvme/nvme_da.c
550
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("ndastrategy(%p)\n", bp));
sys/cam/nvme/nvme_da.c
557
biofinish(bp, NULL, ENXIO);
sys/cam/nvme/nvme_da.c
561
if (bp->bio_cmd == BIO_DELETE)
sys/cam/nvme/nvme_da.c
567
cam_iosched_queue_work(softc->cam_iosched, bp);
sys/cam/nvme/nvme_da.c
926
ndagetattr(struct bio *bp)
sys/cam/nvme/nvme_da.c
931
if (g_handleattr_int(bp, "GEOM::canspeedup", nda_enable_biospeedup))
sys/cam/nvme/nvme_da.c
934
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
sys/cam/nvme/nvme_da.c
936
ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute,
sys/cam/nvme/nvme_da.c
940
bp->bio_completed = bp->bio_length;
sys/cam/scsi/scsi_cd.c
1135
struct bio *bp;
sys/cam/scsi/scsi_cd.c
1138
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
sys/cam/scsi/scsi_cd.c
1163
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_cd.c
1164
bp->bio_error = error;
sys/cam/scsi/scsi_cd.c
1165
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_cd.c
1174
bp->bio_resid = csio->resid;
sys/cam/scsi/scsi_cd.c
1175
bp->bio_error = 0;
sys/cam/scsi/scsi_cd.c
1176
if (bp->bio_resid != 0) {
sys/cam/scsi/scsi_cd.c
1182
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_cd.c
1189
biofinish(bp, NULL, 0);
sys/cam/scsi/scsi_cd.c
837
cdstrategy(struct bio *bp)
sys/cam/scsi/scsi_cd.c
842
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
sys/cam/scsi/scsi_cd.c
845
("cdstrategy(%p)\n", bp));
sys/cam/scsi/scsi_cd.c
854
biofinish(bp, NULL, ENXIO);
sys/cam/scsi/scsi_cd.c
861
bioq_disksort(&softc->bio_queue, bp);
sys/cam/scsi/scsi_cd.c
880
struct bio *bp;
sys/cam/scsi/scsi_cd.c
891
bp = bioq_first(&softc->bio_queue);
sys/cam/scsi/scsi_cd.c
892
if (bp == NULL) {
sys/cam/scsi/scsi_cd.c
912
bioq_remove(&softc->bio_queue, bp);
sys/cam/scsi/scsi_cd.c
914
if ((bp->bio_cmd != BIO_READ) &&
sys/cam/scsi/scsi_cd.c
915
(bp->bio_cmd != BIO_WRITE)) {
sys/cam/scsi/scsi_cd.c
916
biofinish(bp, NULL, EOPNOTSUPP);
sys/cam/scsi/scsi_cd.c
925
/* read */bp->bio_cmd == BIO_READ ?
sys/cam/scsi/scsi_cd.c
929
/* lba */ bp->bio_offset /
sys/cam/scsi/scsi_cd.c
931
bp->bio_bcount / softc->params.blksize,
sys/cam/scsi/scsi_cd.c
932
/* data_ptr */ bp->bio_data,
sys/cam/scsi/scsi_cd.c
933
/* dxfer_len */ bp->bio_bcount,
sys/cam/scsi/scsi_cd.c
957
start_ccb->ccb_h.ccb_bp = bp;
sys/cam/scsi/scsi_cd.c
958
bp = bioq_first(&softc->bio_queue);
sys/cam/scsi/scsi_cd.c
962
if (bp != NULL || softc->tur) {
sys/cam/scsi/scsi_da.c
1908
dastrategy(struct bio *bp)
sys/cam/scsi/scsi_da.c
1913
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
sys/cam/scsi/scsi_da.c
1931
biofinish(bp, NULL, ENXIO);
sys/cam/scsi/scsi_da.c
1935
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dastrategy(%p)\n", bp));
sys/cam/scsi/scsi_da.c
1942
if (bp->bio_cmd == BIO_ZONE)
sys/cam/scsi/scsi_da.c
1943
bp->bio_flags |= BIO_ORDERED;
sys/cam/scsi/scsi_da.c
1948
cam_iosched_queue_work(softc->cam_iosched, bp);
sys/cam/scsi/scsi_da.c
2028
dagetattr(struct bio *bp)
sys/cam/scsi/scsi_da.c
2033
if (g_handleattr_int(bp, "GEOM::canspeedup", da_enable_biospeedup))
sys/cam/scsi/scsi_da.c
2036
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
sys/cam/scsi/scsi_da.c
2038
ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute,
sys/cam/scsi/scsi_da.c
2042
bp->bio_completed = bp->bio_length;
sys/cam/scsi/scsi_da.c
280
struct bio *bp);
sys/cam/scsi/scsi_da.c
3092
da_zone_cmd(struct cam_periph *periph, union ccb *ccb, struct bio *bp,
sys/cam/scsi/scsi_da.c
3100
if (bp->bio_cmd != BIO_ZONE) {
sys/cam/scsi/scsi_da.c
3107
switch (bp->bio_zone.zone_cmd) {
sys/cam/scsi/scsi_da.c
3116
zone_sa = da_zone_bio_to_scsi(bp->bio_zone.zone_cmd);
sys/cam/scsi/scsi_da.c
3120
bp->bio_zone.zone_cmd);
sys/cam/scsi/scsi_da.c
3126
lba = bp->bio_zone.zone_params.rwp.id;
sys/cam/scsi/scsi_da.c
3128
if (bp->bio_zone.zone_params.rwp.flags &
sys/cam/scsi/scsi_da.c
3197
rep = &bp->bio_zone.zone_params.report;
sys/cam/scsi/scsi_da.c
3298
bp->bio_bcount = bp->bio_length;
sys/cam/scsi/scsi_da.c
3307
params = &bp->bio_zone.zone_params.disk_params;
sys/cam/scsi/scsi_da.c
3402
struct bio *bp;
sys/cam/scsi/scsi_da.c
3406
bp = cam_iosched_next_bio(softc->cam_iosched);
sys/cam/scsi/scsi_da.c
3407
if (bp == NULL) {
sys/cam/scsi/scsi_da.c
3427
if (bp->bio_cmd == BIO_DELETE) {
sys/cam/scsi/scsi_da.c
3429
softc->delete_func(periph, start_ccb, bp);
sys/cam/scsi/scsi_da.c
3436
biofinish(bp, NULL, 0);
sys/cam/scsi/scsi_da.c
3448
if ((bp->bio_flags & BIO_ORDERED) != 0 ||
sys/cam/scsi/scsi_da.c
3457
switch (bp->bio_cmd) {
sys/cam/scsi/scsi_da.c
3464
biotrack(bp, __func__);
sys/cam/scsi/scsi_da.c
3466
if (bp->bio_cmd == BIO_WRITE) {
sys/cam/scsi/scsi_da.c
3473
data_ptr = bp->bio_data;
sys/cam/scsi/scsi_da.c
3474
if ((bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0) {
sys/cam/scsi/scsi_da.c
3476
data_ptr = bp;
sys/cam/scsi/scsi_da.c
3486
/*lba*/bp->bio_pblkno,
sys/cam/scsi/scsi_da.c
3487
/*block_count*/bp->bio_bcount /
sys/cam/scsi/scsi_da.c
3490
/*dxfer_len*/ bp->bio_bcount,
sys/cam/scsi/scsi_da.c
3494
start_ccb->csio.bio = bp;
sys/cam/scsi/scsi_da.c
3507
biodone(bp);
sys/cam/scsi/scsi_da.c
3539
error = da_zone_cmd(periph, start_ccb, bp, &queue_ccb);
sys/cam/scsi/scsi_da.c
3549
biofinish(bp, NULL, error);
sys/cam/scsi/scsi_da.c
3558
biofinish(bp, NULL, EOPNOTSUPP);
sys/cam/scsi/scsi_da.c
3576
start_ccb->ccb_h.ccb_bp = bp;
sys/cam/scsi/scsi_da.c
4115
da_delete_unmap(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
sys/cam/scsi/scsi_da.c
4137
bp1 = bp;
sys/cam/scsi/scsi_da.c
4149
if (bp1 != bp)
sys/cam/scsi/scsi_da.c
4254
da_delete_trim(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
sys/cam/scsi/scsi_da.c
4266
bp1 = bp;
sys/cam/scsi/scsi_da.c
4268
if (bp1 != bp)//XXX imp XXX
sys/cam/scsi/scsi_da.c
4346
da_delete_ws(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
sys/cam/scsi/scsi_da.c
4356
lba = bp->bio_pblkno;
sys/cam/scsi/scsi_da.c
4358
bp1 = bp;
sys/cam/scsi/scsi_da.c
4360
if (bp1 != bp)//XXX imp XXX
sys/cam/scsi/scsi_da.c
4410
struct bio *bp;
sys/cam/scsi/scsi_da.c
4443
while ((bp = bioq_takefirst(&softc->delete_run_queue)) != NULL)
sys/cam/scsi/scsi_da.c
4444
cam_iosched_queue_work(softc->cam_iosched, bp);
sys/cam/scsi/scsi_da.c
4511
struct bio *bp;
sys/cam/scsi/scsi_da.c
4514
bp = (struct bio *)ccb->ccb_h.ccb_bp;
sys/cam/scsi/scsi_da.c
4516
switch (bp->bio_zone.zone_cmd) {
sys/cam/scsi/scsi_da.c
4532
rep = &bp->bio_zone.zone_params.report;
sys/cam/scsi/scsi_da.c
4544
bp->bio_resid = ccb->csio.resid;
sys/cam/scsi/scsi_da.c
4552
bp->bio_error = EIO;
sys/cam/scsi/scsi_da.c
4553
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_da.c
4554
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_da.c
4645
bp->bio_zone.zone_cmd);
sys/cam/scsi/scsi_da.c
4649
if (bp->bio_zone.zone_cmd == DISK_ZONE_REPORT_ZONES)
sys/cam/scsi/scsi_da.c
4656
struct bio *bp, *bp1;
sys/cam/scsi/scsi_da.c
4673
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
sys/cam/scsi/scsi_da.c
4695
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
sys/cam/scsi/scsi_da.c
4736
if (bp != NULL) {
sys/cam/scsi/scsi_da.c
4737
bp->bio_error = error;
sys/cam/scsi/scsi_da.c
4738
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_da.c
4739
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_da.c
4741
} else if (bp != NULL) {
sys/cam/scsi/scsi_da.c
4743
bp->bio_resid = 0;
sys/cam/scsi/scsi_da.c
4745
bp->bio_resid = csio->resid;
sys/cam/scsi/scsi_da.c
4746
bp->bio_error = 0;
sys/cam/scsi/scsi_da.c
4747
if (bp->bio_resid != 0)
sys/cam/scsi/scsi_da.c
4748
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_da.c
4756
} else if (bp != NULL) {
sys/cam/scsi/scsi_da.c
4759
if (bp->bio_cmd == BIO_ZONE)
sys/cam/scsi/scsi_da.c
4762
bp->bio_resid = 0;
sys/cam/scsi/scsi_da.c
4764
bp->bio_resid = csio->resid;
sys/cam/scsi/scsi_da.c
4765
if ((csio->resid > 0) && (bp->bio_cmd != BIO_ZONE))
sys/cam/scsi/scsi_da.c
4766
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_da.c
4768
bp->bio_error = softc->error_inject;
sys/cam/scsi/scsi_da.c
4769
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_da.c
4770
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_da.c
4775
if (bp != NULL)
sys/cam/scsi/scsi_da.c
4776
biotrack(bp, __func__);
sys/cam/scsi/scsi_da.c
4787
cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
sys/cam/scsi/scsi_da.c
4812
bp1->bio_error = bp->bio_error;
sys/cam/scsi/scsi_da.c
4813
if (bp->bio_flags & BIO_ERROR) {
sys/cam/scsi/scsi_da.c
4824
if (bp != NULL)
sys/cam/scsi/scsi_da.c
4825
biodone(bp);
sys/cam/scsi/scsi_pt.c
189
ptstrategy(struct bio *bp)
sys/cam/scsi/scsi_pt.c
194
periph = (struct cam_periph *)bp->bio_dev->si_drv1;
sys/cam/scsi/scsi_pt.c
195
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_pt.c
197
biofinish(bp, NULL, ENXIO);
sys/cam/scsi/scsi_pt.c
208
biofinish(bp, NULL, ENXIO);
sys/cam/scsi/scsi_pt.c
215
bioq_insert_tail(&softc->bio_queue, bp);
sys/cam/scsi/scsi_pt.c
420
struct bio *bp;
sys/cam/scsi/scsi_pt.c
429
bp = bioq_first(&softc->bio_queue);
sys/cam/scsi/scsi_pt.c
430
if (bp == NULL) {
sys/cam/scsi/scsi_pt.c
433
bioq_remove(&softc->bio_queue, bp);
sys/cam/scsi/scsi_pt.c
435
devstat_start_transaction_bio(softc->device_stats, bp);
sys/cam/scsi/scsi_pt.c
441
bp->bio_cmd == BIO_READ,
sys/cam/scsi/scsi_pt.c
443
bp->bio_bcount,
sys/cam/scsi/scsi_pt.c
444
bp->bio_data,
sys/cam/scsi/scsi_pt.c
457
start_ccb->ccb_h.ccb_bp = bp;
sys/cam/scsi/scsi_pt.c
458
bp = bioq_first(&softc->bio_queue);
sys/cam/scsi/scsi_pt.c
462
if (bp != NULL) {
sys/cam/scsi/scsi_pt.c
484
struct bio *bp;
sys/cam/scsi/scsi_pt.c
486
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
sys/cam/scsi/scsi_pt.c
521
bp->bio_error = error;
sys/cam/scsi/scsi_pt.c
522
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_pt.c
523
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_pt.c
525
bp->bio_resid = csio->resid;
sys/cam/scsi/scsi_pt.c
526
bp->bio_error = 0;
sys/cam/scsi/scsi_pt.c
527
if (bp->bio_resid != 0) {
sys/cam/scsi/scsi_pt.c
529
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_pt.c
539
bp->bio_resid = csio->resid;
sys/cam/scsi/scsi_pt.c
540
if (bp->bio_resid != 0)
sys/cam/scsi/scsi_pt.c
541
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_pt.c
550
biofinish(bp, softc->device_stats, 0);
sys/cam/scsi/scsi_sa.c
1008
if (bp->bio_bcount == 0) {
sys/cam/scsi/scsi_sa.c
1010
biodone(bp);
sys/cam/scsi/scsi_sa.c
1021
((bp->bio_bcount & softc->blk_mask) != 0)) ||
sys/cam/scsi/scsi_sa.c
1023
((bp->bio_bcount % softc->min_blk) != 0))) {
sys/cam/scsi/scsi_sa.c
1028
biofinish(bp, NULL, EINVAL);
sys/cam/scsi/scsi_sa.c
1031
} else if ((bp->bio_bcount > softc->max_blk) ||
sys/cam/scsi/scsi_sa.c
1032
(bp->bio_bcount < softc->min_blk) ||
sys/cam/scsi/scsi_sa.c
1033
(bp->bio_bcount & softc->blk_mask) != 0) {
sys/cam/scsi/scsi_sa.c
1043
biofinish(bp, NULL, EINVAL);
sys/cam/scsi/scsi_sa.c
1050
bioq_insert_tail(&softc->bio_queue, bp);
sys/cam/scsi/scsi_sa.c
1054
("sastrategy: queuing a %ld %s byte %s\n", bp->bio_bcount,
sys/cam/scsi/scsi_sa.c
1056
(bp->bio_cmd == BIO_READ)? "read" : "write"));
sys/cam/scsi/scsi_sa.c
2765
struct bio *bp;
sys/cam/scsi/scsi_sa.c
2770
bp = bioq_first(&softc->bio_queue);
sys/cam/scsi/scsi_sa.c
2771
if (bp == NULL) {
sys/cam/scsi/scsi_sa.c
2789
if (bp->bio_cmd == BIO_WRITE)
sys/cam/scsi/scsi_sa.c
2796
bioq_remove(&softc->bio_queue, bp);
sys/cam/scsi/scsi_sa.c
2797
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_sa.c
2798
done_bp = bp;
sys/cam/scsi/scsi_sa.c
2824
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_sa.c
2825
bp->bio_error = ENOSPC;
sys/cam/scsi/scsi_sa.c
2827
bp->bio_error = 0;
sys/cam/scsi/scsi_sa.c
2835
bp->bio_error = 0;
sys/cam/scsi/scsi_sa.c
2841
bp->bio_error = EIO;
sys/cam/scsi/scsi_sa.c
2842
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_sa.c
2844
bp = bioq_first(&softc->bio_queue);
sys/cam/scsi/scsi_sa.c
2849
if (bp == NULL)
sys/cam/scsi/scsi_sa.c
2855
(bp != NULL)? "not " : " ", softc->queue_count));
sys/cam/scsi/scsi_sa.c
2861
bioq_remove(&softc->bio_queue, bp);
sys/cam/scsi/scsi_sa.c
2864
if ((bp->bio_cmd != BIO_READ) &&
sys/cam/scsi/scsi_sa.c
2865
(bp->bio_cmd != BIO_WRITE)) {
sys/cam/scsi/scsi_sa.c
2866
biofinish(bp, NULL, EOPNOTSUPP);
sys/cam/scsi/scsi_sa.c
2870
length = bp->bio_bcount;
sys/cam/scsi/scsi_sa.c
2878
bp->bio_error = EIO;
sys/cam/scsi/scsi_sa.c
2881
biodone(bp);
sys/cam/scsi/scsi_sa.c
2887
length, (bp->bio_cmd == BIO_READ)? "read" :
sys/cam/scsi/scsi_sa.c
2894
length, (bp->bio_cmd == BIO_READ)? "read" :
sys/cam/scsi/scsi_sa.c
2898
devstat_start_transaction_bio(softc->device_stats, bp);
sys/cam/scsi/scsi_sa.c
2932
softc->dsreg = (bp->bio_cmd == BIO_READ)?
sys/cam/scsi/scsi_sa.c
2935
MSG_SIMPLE_Q_TAG, (bp->bio_cmd == BIO_READ ?
sys/cam/scsi/scsi_sa.c
2937
((bp->bio_flags & BIO_UNMAPPED) != 0 ?
sys/cam/scsi/scsi_sa.c
2940
(bp->bio_flags & BIO_UNMAPPED) != 0 ? (void *)bp :
sys/cam/scsi/scsi_sa.c
2941
bp->bio_data, bp->bio_bcount, SSD_FULL_SIZE,
sys/cam/scsi/scsi_sa.c
2942
(bp->bio_cmd == BIO_READ) ?
sys/cam/scsi/scsi_sa.c
2946
start_ccb->ccb_h.ccb_bp = bp;
sys/cam/scsi/scsi_sa.c
2947
bp = bioq_first(&softc->bio_queue);
sys/cam/scsi/scsi_sa.c
2951
if (bp != NULL) {
sys/cam/scsi/scsi_sa.c
3022
struct bio *bp;
sys/cam/scsi/scsi_sa.c
3031
bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
sys/cam/scsi/scsi_sa.c
3042
bp = NULL;
sys/cam/scsi/scsi_sa.c
3118
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_sa.c
3119
bp->bio_error = error;
sys/cam/scsi/scsi_sa.c
3120
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_sa.c
3125
bp->bio_resid = csio->resid;
sys/cam/scsi/scsi_sa.c
3126
bp->bio_error = 0;
sys/cam/scsi/scsi_sa.c
3128
bp->bio_flags |= BIO_ERROR;
sys/cam/scsi/scsi_sa.c
3130
if (bp->bio_cmd == BIO_WRITE) {
sys/cam/scsi/scsi_sa.c
3139
l = bp->bio_bcount >>
sys/cam/scsi/scsi_sa.c
3142
l = bp->bio_bcount /
sys/cam/scsi/scsi_sa.c
3157
if (error || bp->bio_resid) {
sys/cam/scsi/scsi_sa.c
3160
bp->bio_resid, bp->bio_bcount));
sys/cam/scsi/scsi_sa.c
3162
biofinish(bp, softc->device_stats, 0);
sys/cam/scsi/scsi_sa.c
956
sastrategy(struct bio *bp)
sys/cam/scsi/scsi_sa.c
961
bp->bio_resid = bp->bio_bcount;
sys/cam/scsi/scsi_sa.c
962
if (SA_IS_CTRL(bp->bio_dev)) {
sys/cam/scsi/scsi_sa.c
963
biofinish(bp, NULL, EINVAL);
sys/cam/scsi/scsi_sa.c
966
periph = (struct cam_periph *)bp->bio_dev->si_drv1;
sys/cam/scsi/scsi_sa.c
973
biofinish(bp, NULL, ENXIO);
sys/cam/scsi/scsi_sa.c
979
biofinish(bp, NULL, EPERM);
sys/cam/scsi/scsi_sa.c
988
if (bp->bio_cmd == BIO_WRITE && softc->open_rdonly) {
sys/cam/scsi/scsi_sa.c
990
biofinish(bp, NULL, EBADF);
sys/cam/scsi/scsi_sa.c
995
int error = samount(periph, 0, bp->bio_dev);
sys/cam/scsi/scsi_sa.c
998
biofinish(bp, NULL, ENXIO);
sys/cddl/boot/zfs/blkptr.c
47
decode_embedded_bp_compressed(const blkptr_t *bp, void *buf)
sys/cddl/boot/zfs/blkptr.c
52
const uint64_t *bp64 = (const uint64_t *)bp;
sys/cddl/boot/zfs/blkptr.c
54
ASSERT(BP_IS_EMBEDDED(bp));
sys/cddl/boot/zfs/blkptr.c
56
psize = BPE_GET_PSIZE(bp);
sys/cddl/boot/zfs/blkptr.c
65
ASSERT3P(bp64, <, bp + 1);
sys/cddl/boot/zfs/blkptr.c
68
if (!BPE_IS_PAYLOADWORD(bp, bp64))
sys/cddl/boot/zfs/zfsimpl.h
294
#define BPE_GET_ETYPE(bp) \
sys/cddl/boot/zfs/zfsimpl.h
295
(ASSERT(BP_IS_EMBEDDED(bp)), \
sys/cddl/boot/zfs/zfsimpl.h
296
BF64_GET((bp)->blk_prop, 40, 8))
sys/cddl/boot/zfs/zfsimpl.h
297
#define BPE_SET_ETYPE(bp, t) do { \
sys/cddl/boot/zfs/zfsimpl.h
298
ASSERT(BP_IS_EMBEDDED(bp)); \
sys/cddl/boot/zfs/zfsimpl.h
299
BF64_SET((bp)->blk_prop, 40, 8, t); \
sys/cddl/boot/zfs/zfsimpl.h
302
#define BPE_GET_LSIZE(bp) \
sys/cddl/boot/zfs/zfsimpl.h
303
(ASSERT(BP_IS_EMBEDDED(bp)), \
sys/cddl/boot/zfs/zfsimpl.h
304
BF64_GET_SB((bp)->blk_prop, 0, 25, 0, 1))
sys/cddl/boot/zfs/zfsimpl.h
305
#define BPE_SET_LSIZE(bp, x) do { \
sys/cddl/boot/zfs/zfsimpl.h
306
ASSERT(BP_IS_EMBEDDED(bp)); \
sys/cddl/boot/zfs/zfsimpl.h
307
BF64_SET_SB((bp)->blk_prop, 0, 25, 0, 1, x); \
sys/cddl/boot/zfs/zfsimpl.h
310
#define BPE_GET_PSIZE(bp) \
sys/cddl/boot/zfs/zfsimpl.h
311
(ASSERT(BP_IS_EMBEDDED(bp)), \
sys/cddl/boot/zfs/zfsimpl.h
312
BF64_GET_SB((bp)->blk_prop, 25, 7, 0, 1))
sys/cddl/boot/zfs/zfsimpl.h
313
#define BPE_SET_PSIZE(bp, x) do { \
sys/cddl/boot/zfs/zfsimpl.h
314
ASSERT(BP_IS_EMBEDDED(bp)); \
sys/cddl/boot/zfs/zfsimpl.h
315
BF64_SET_SB((bp)->blk_prop, 25, 7, 0, 1, x); \
sys/cddl/boot/zfs/zfsimpl.h
326
#define BPE_IS_PAYLOADWORD(bp, wp) \
sys/cddl/boot/zfs/zfsimpl.h
327
((wp) != &(bp)->blk_prop && (wp) != &(bp)->blk_birth)
sys/cddl/boot/zfs/zfsimpl.h
365
#define BP_GET_LSIZE(bp) \
sys/cddl/boot/zfs/zfsimpl.h
366
(BP_IS_EMBEDDED(bp) ? \
sys/cddl/boot/zfs/zfsimpl.h
367
(BPE_GET_ETYPE(bp) == BP_EMBEDDED_TYPE_DATA ? BPE_GET_LSIZE(bp) : 0): \
sys/cddl/boot/zfs/zfsimpl.h
368
BF64_GET_SB((bp)->blk_prop, 0, SPA_LSIZEBITS, SPA_MINBLOCKSHIFT, 1))
sys/cddl/boot/zfs/zfsimpl.h
369
#define BP_SET_LSIZE(bp, x) do { \
sys/cddl/boot/zfs/zfsimpl.h
370
ASSERT(!BP_IS_EMBEDDED(bp)); \
sys/cddl/boot/zfs/zfsimpl.h
371
BF64_SET_SB((bp)->blk_prop, \
sys/cddl/boot/zfs/zfsimpl.h
375
#define BP_GET_PSIZE(bp) \
sys/cddl/boot/zfs/zfsimpl.h
376
BF64_GET_SB((bp)->blk_prop, 16, SPA_LSIZEBITS, SPA_MINBLOCKSHIFT, 1)
sys/cddl/boot/zfs/zfsimpl.h
377
#define BP_SET_PSIZE(bp, x) \
sys/cddl/boot/zfs/zfsimpl.h
378
BF64_SET_SB((bp)->blk_prop, 16, SPA_LSIZEBITS, SPA_MINBLOCKSHIFT, 1, x)
sys/cddl/boot/zfs/zfsimpl.h
380
#define BP_GET_COMPRESS(bp) BF64_GET((bp)->blk_prop, 32, 7)
sys/cddl/boot/zfs/zfsimpl.h
381
#define BP_SET_COMPRESS(bp, x) BF64_SET((bp)->blk_prop, 32, 7, x)
sys/cddl/boot/zfs/zfsimpl.h
383
#define BP_GET_CHECKSUM(bp) BF64_GET((bp)->blk_prop, 40, 8)
sys/cddl/boot/zfs/zfsimpl.h
384
#define BP_SET_CHECKSUM(bp, x) BF64_SET((bp)->blk_prop, 40, 8, x)
sys/cddl/boot/zfs/zfsimpl.h
386
#define BP_GET_TYPE(bp) BF64_GET((bp)->blk_prop, 48, 8)
sys/cddl/boot/zfs/zfsimpl.h
387
#define BP_SET_TYPE(bp, x) BF64_SET((bp)->blk_prop, 48, 8, x)
sys/cddl/boot/zfs/zfsimpl.h
389
#define BP_GET_LEVEL(bp) BF64_GET((bp)->blk_prop, 56, 5)
sys/cddl/boot/zfs/zfsimpl.h
390
#define BP_SET_LEVEL(bp, x) BF64_SET((bp)->blk_prop, 56, 5, x)
sys/cddl/boot/zfs/zfsimpl.h
392
#define BP_IS_EMBEDDED(bp) BF64_GET((bp)->blk_prop, 39, 1)
sys/cddl/boot/zfs/zfsimpl.h
394
#define BP_GET_DEDUP(bp) BF64_GET((bp)->blk_prop, 62, 1)
sys/cddl/boot/zfs/zfsimpl.h
395
#define BP_SET_DEDUP(bp, x) BF64_SET((bp)->blk_prop, 62, 1, x)
sys/cddl/boot/zfs/zfsimpl.h
397
#define BP_GET_BYTEORDER(bp) BF64_GET((bp)->blk_prop, 63, 1)
sys/cddl/boot/zfs/zfsimpl.h
398
#define BP_SET_BYTEORDER(bp, x) BF64_SET((bp)->blk_prop, 63, 1, x)
sys/cddl/boot/zfs/zfsimpl.h
400
#define BP_PHYSICAL_BIRTH(bp) \
sys/cddl/boot/zfs/zfsimpl.h
401
((bp)->blk_phys_birth ? (bp)->blk_phys_birth : (bp)->blk_birth)
sys/cddl/boot/zfs/zfsimpl.h
403
#define BP_SET_BIRTH(bp, logical, physical) \
sys/cddl/boot/zfs/zfsimpl.h
405
ASSERT(!BP_IS_EMBEDDED(bp)); \
sys/cddl/boot/zfs/zfsimpl.h
406
(bp)->blk_birth = (logical); \
sys/cddl/boot/zfs/zfsimpl.h
407
(bp)->blk_phys_birth = ((logical) == (physical) ? 0 : (physical)); \
sys/cddl/boot/zfs/zfsimpl.h
410
#define BP_GET_FILL(bp) \
sys/cddl/boot/zfs/zfsimpl.h
411
((BP_IS_EMBEDDED(bp)) ? 1 : (bp)->blk_fill)
sys/cddl/boot/zfs/zfsimpl.h
413
#define BP_SET_FILL(bp, fill) \
sys/cddl/boot/zfs/zfsimpl.h
415
(bp)->blk_fill = fill; \
sys/cddl/boot/zfs/zfsimpl.h
418
#define BP_GET_ASIZE(bp) \
sys/cddl/boot/zfs/zfsimpl.h
419
(DVA_GET_ASIZE(&(bp)->blk_dva[0]) + DVA_GET_ASIZE(&(bp)->blk_dva[1]) + \
sys/cddl/boot/zfs/zfsimpl.h
420
DVA_GET_ASIZE(&(bp)->blk_dva[2]))
sys/cddl/boot/zfs/zfsimpl.h
422
#define BP_GET_UCSIZE(bp) \
sys/cddl/boot/zfs/zfsimpl.h
423
((BP_GET_LEVEL(bp) > 0 || dmu_ot[BP_GET_TYPE(bp)].ot_metadata) ? \
sys/cddl/boot/zfs/zfsimpl.h
424
BP_GET_PSIZE(bp) : BP_GET_LSIZE(bp));
sys/cddl/boot/zfs/zfsimpl.h
426
#define BP_GET_NDVAS(bp) \
sys/cddl/boot/zfs/zfsimpl.h
427
(!!DVA_GET_ASIZE(&(bp)->blk_dva[0]) + \
sys/cddl/boot/zfs/zfsimpl.h
428
!!DVA_GET_ASIZE(&(bp)->blk_dva[1]) + \
sys/cddl/boot/zfs/zfsimpl.h
429
!!DVA_GET_ASIZE(&(bp)->blk_dva[2]))
sys/cddl/boot/zfs/zfsimpl.h
452
#define BP_IDENTITY(bp) (&(bp)->blk_dva[0])
sys/cddl/boot/zfs/zfsimpl.h
453
#define BP_IS_GANG(bp) DVA_GET_GANG(BP_IDENTITY(bp))
sys/cddl/boot/zfs/zfsimpl.h
456
#define BP_IS_HOLE(bp) DVA_IS_EMPTY(BP_IDENTITY(bp))
sys/cddl/boot/zfs/zfsimpl.h
457
#define BP_IS_OLDER(bp, txg) (!BP_IS_HOLE(bp) && (bp)->blk_birth < (txg))
sys/cddl/boot/zfs/zfsimpl.h
459
#define BP_ZERO(bp) \
sys/cddl/boot/zfs/zfsimpl.h
461
(bp)->blk_dva[0].dva_word[0] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
462
(bp)->blk_dva[0].dva_word[1] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
463
(bp)->blk_dva[1].dva_word[0] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
464
(bp)->blk_dva[1].dva_word[1] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
465
(bp)->blk_dva[2].dva_word[0] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
466
(bp)->blk_dva[2].dva_word[1] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
467
(bp)->blk_prop = 0; \
sys/cddl/boot/zfs/zfsimpl.h
468
(bp)->blk_pad[0] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
469
(bp)->blk_pad[1] = 0; \
sys/cddl/boot/zfs/zfsimpl.h
470
(bp)->blk_phys_birth = 0; \
sys/cddl/boot/zfs/zfsimpl.h
471
(bp)->blk_birth = 0; \
sys/cddl/boot/zfs/zfsimpl.h
472
(bp)->blk_fill = 0; \
sys/cddl/boot/zfs/zfsimpl.h
473
ZIO_SET_CHECKSUM(&(bp)->blk_cksum, 0, 0, 0, 0); \
sys/cddl/boot/zfs/zfsimpl.h
482
#define BP_SHOULD_BYTESWAP(bp) (BP_GET_BYTEORDER(bp) != ZFS_HOST_BYTEORDER)
sys/cddl/boot/zfs/zfsimpl.h
485
#define BPE_IS_PAYLOADWORD(bp, wp) \
sys/cddl/boot/zfs/zfsimpl.h
486
((wp) != &(bp)->blk_prop && (wp) != &(bp)->blk_birth)
sys/cddl/boot/zfs/zfssubr.c
1363
raidz_checksum_verify(const spa_t *spa, const blkptr_t *bp, void *data,
sys/cddl/boot/zfs/zfssubr.c
1366
return (zio_checksum_verify(spa, bp, data));
sys/cddl/boot/zfs/zfssubr.c
1420
vdev_raidz_combrec(const spa_t *spa, raidz_map_t *rm, const blkptr_t *bp,
sys/cddl/boot/zfs/zfssubr.c
1504
if (raidz_checksum_verify(spa, bp, data, bytes) == 0) {
sys/cddl/boot/zfs/zfssubr.c
1567
vdev_raidz_read(vdev_t *vd, const blkptr_t *bp, void *data,
sys/cddl/boot/zfs/zfssubr.c
1679
rv = raidz_checksum_verify(vd->v_spa, bp, data, bytes);
sys/cddl/boot/zfs/zfssubr.c
1725
rv = raidz_checksum_verify(vd->v_spa, bp, data, bytes);
sys/cddl/boot/zfs/zfssubr.c
1800
(code = vdev_raidz_combrec(vd->v_spa, rm, bp, data, offset, bytes,
sys/cddl/boot/zfs/zfssubr.c
216
zio_checksum_gang_verifier(zio_cksum_t *zcp, const blkptr_t *bp)
sys/cddl/boot/zfs/zfssubr.c
218
const dva_t *dva = BP_IDENTITY(bp);
sys/cddl/boot/zfs/zfssubr.c
219
uint64_t txg = BP_PHYSICAL_BIRTH(bp);
sys/cddl/boot/zfs/zfssubr.c
221
ASSERT(BP_IS_GANG(bp));
sys/cddl/boot/zfs/zfssubr.c
278
zio_checksum_verify(const spa_t *spa, const blkptr_t *bp, void *data)
sys/cddl/boot/zfs/zfssubr.c
287
checksum = BP_GET_CHECKSUM(bp);
sys/cddl/boot/zfs/zfssubr.c
288
size = BP_GET_PSIZE(bp);
sys/cddl/boot/zfs/zfssubr.c
310
zio_checksum_gang_verifier(&verifier, bp);
sys/cddl/boot/zfs/zfssubr.c
313
DVA_GET_OFFSET(BP_IDENTITY(bp)));
sys/cddl/boot/zfs/zfssubr.c
315
verifier = bp->blk_cksum;
sys/cddl/boot/zfs/zfssubr.c
331
byteswap = BP_SHOULD_BYTESWAP(bp);
sys/cddl/boot/zfs/zfssubr.c
332
expected_cksum = bp->blk_cksum;
sys/compat/linux/linux_ioctl.c
1288
bsd_to_linux_msf_lba(u_char af, union msf_lba *bp, union linux_cdrom_addr *lp)
sys/compat/linux/linux_ioctl.c
1291
lp->lba = bp->lba;
sys/compat/linux/linux_ioctl.c
1293
lp->msf.minute = bp->msf.minute;
sys/compat/linux/linux_ioctl.c
1294
lp->msf.second = bp->msf.second;
sys/compat/linux/linux_ioctl.c
1295
lp->msf.frame = bp->msf.frame;
sys/compat/linux/linux_ioctl.c
1313
linux_to_bsd_dvd_struct(l_dvd_struct *lp, struct dvd_struct *bp)
sys/compat/linux/linux_ioctl.c
1315
bp->format = lp->type;
sys/compat/linux/linux_ioctl.c
1316
switch (bp->format) {
sys/compat/linux/linux_ioctl.c
1318
if (bp->layer_num >= 4)
sys/compat/linux/linux_ioctl.c
1320
bp->layer_num = lp->physical.layer_num;
sys/compat/linux/linux_ioctl.c
1323
bp->layer_num = lp->copyright.layer_num;
sys/compat/linux/linux_ioctl.c
1326
bp->agid = lp->disckey.agid;
sys/compat/linux/linux_ioctl.c
1338
bsd_to_linux_dvd_struct(struct dvd_struct *bp, l_dvd_struct *lp)
sys/compat/linux/linux_ioctl.c
1340
switch (bp->format) {
sys/compat/linux/linux_ioctl.c
1342
struct dvd_layer *blp = (struct dvd_layer *)bp->data;
sys/compat/linux/linux_ioctl.c
1343
struct l_dvd_layer *llp = &lp->physical.layer[bp->layer_num];
sys/compat/linux/linux_ioctl.c
1361
lp->copyright.cpst = bp->cpst;
sys/compat/linux/linux_ioctl.c
1362
lp->copyright.rmi = bp->rmi;
sys/compat/linux/linux_ioctl.c
1365
memcpy(lp->disckey.value, bp->data, sizeof(lp->disckey.value));
sys/compat/linux/linux_ioctl.c
1368
lp->bca.len = bp->length;
sys/compat/linux/linux_ioctl.c
1369
memcpy(lp->bca.value, bp->data, sizeof(lp->bca.value));
sys/compat/linux/linux_ioctl.c
1372
lp->manufact.len = bp->length;
sys/compat/linux/linux_ioctl.c
1373
memcpy(lp->manufact.value, bp->data,
sys/compat/linux/linux_ioctl.c
1385
struct dvd_authinfo *bp)
sys/compat/linux/linux_ioctl.c
1390
bp->format = DVD_REPORT_AGID;
sys/compat/linux/linux_ioctl.c
1391
bp->agid = lp->lsa.agid;
sys/compat/linux/linux_ioctl.c
1395
bp->format = DVD_SEND_CHALLENGE;
sys/compat/linux/linux_ioctl.c
1396
bp->agid = lp->hsc.agid;
sys/compat/linux/linux_ioctl.c
1397
memcpy(bp->keychal, lp->hsc.chal, 10);
sys/compat/linux/linux_ioctl.c
1401
bp->format = DVD_REPORT_KEY1;
sys/compat/linux/linux_ioctl.c
1402
bp->agid = lp->lsk.agid;
sys/compat/linux/linux_ioctl.c
1406
bp->format = DVD_REPORT_CHALLENGE;
sys/compat/linux/linux_ioctl.c
1407
bp->agid = lp->lsc.agid;
sys/compat/linux/linux_ioctl.c
1411
bp->format = DVD_SEND_KEY2;
sys/compat/linux/linux_ioctl.c
1412
bp->agid = lp->hsk.agid;
sys/compat/linux/linux_ioctl.c
1413
memcpy(bp->keychal, lp->hsk.key, 5);
sys/compat/linux/linux_ioctl.c
1417
bp->format = DVD_REPORT_TITLE_KEY;
sys/compat/linux/linux_ioctl.c
1418
bp->agid = lp->lstk.agid;
sys/compat/linux/linux_ioctl.c
1419
bp->lba = lp->lstk.lba;
sys/compat/linux/linux_ioctl.c
1423
bp->format = DVD_REPORT_ASF;
sys/compat/linux/linux_ioctl.c
1424
bp->agid = lp->lsasf.agid;
sys/compat/linux/linux_ioctl.c
1428
bp->format = DVD_INVALIDATE_AGID;
sys/compat/linux/linux_ioctl.c
1429
bp->agid = lp->lsa.agid;
sys/compat/linux/linux_ioctl.c
1433
bp->format = DVD_REPORT_RPC;
sys/compat/linux/linux_ioctl.c
1437
bp->format = DVD_SEND_RPC;
sys/compat/linux/linux_ioctl.c
1438
bp->region = lp->hrpcs.pdrc;
sys/compat/linux/linux_ioctl.c
1447
bsd_to_linux_dvd_authinfo(struct dvd_authinfo *bp, l_dvd_authinfo *lp)
sys/compat/linux/linux_ioctl.c
1451
lp->lsa.agid = bp->agid;
sys/compat/linux/linux_ioctl.c
1457
memcpy(lp->lsk.key, bp->keychal, sizeof(lp->lsk.key));
sys/compat/linux/linux_ioctl.c
1460
memcpy(lp->lsc.chal, bp->keychal, sizeof(lp->lsc.chal));
sys/compat/linux/linux_ioctl.c
1466
memcpy(lp->lstk.title_key, bp->keychal,
sys/compat/linux/linux_ioctl.c
1468
lp->lstk.cpm = bp->cpm;
sys/compat/linux/linux_ioctl.c
1469
lp->lstk.cp_sec = bp->cp_sec;
sys/compat/linux/linux_ioctl.c
1470
lp->lstk.cgms = bp->cgms;
sys/compat/linux/linux_ioctl.c
1473
lp->lsasf.asf = bp->asf;
sys/compat/linux/linux_ioctl.c
1478
lp->lrpcs.type = bp->reg_type;
sys/compat/linux/linux_ioctl.c
1479
lp->lrpcs.vra = bp->vend_rsts;
sys/compat/linux/linux_ioctl.c
1480
lp->lrpcs.ucca = bp->user_rsts;
sys/compat/linux/linux_ioctl.c
1481
lp->lrpcs.region_mask = bp->region;
sys/compat/linux/linux_ioctl.c
1482
lp->lrpcs.rpc_scheme = bp->rpc_scheme;
sys/crypto/aesni/aesni_ccm.c
78
uint8_t *bp = (uint8_t*)block;
sys/crypto/aesni/aesni_ccm.c
81
bp[indx] = value & 0xff;
sys/dev/aac/aac.c
1170
aac_submit_bio(struct bio *bp)
sys/dev/aac/aac.c
1175
ad = (struct aac_disk *)bp->bio_disk->d_drv1;
sys/dev/aac/aac.c
1180
aac_enqueue_bio(sc, bp);
sys/dev/aac/aac.c
1193
struct bio *bp;
sys/dev/aac/aac.c
1199
bp = NULL;
sys/dev/aac/aac.c
1202
if ((bp = aac_dequeue_bio(sc)) == NULL)
sys/dev/aac/aac.c
1206
cm->cm_datalen = bp->bio_bcount;
sys/dev/aac/aac.c
1209
cm->cm_private = bp;
sys/dev/aac/aac.c
1226
ad = (struct aac_disk *)bp->bio_disk->d_drv1;
sys/dev/aac/aac.c
1232
raw->BlockNumber = (u_int64_t)bp->bio_pblkno;
sys/dev/aac/aac.c
1233
raw->ByteCount = bp->bio_bcount;
sys/dev/aac/aac.c
1239
if (bp->bio_cmd == BIO_READ) {
sys/dev/aac/aac.c
1248
if (bp->bio_cmd == BIO_READ) {
sys/dev/aac/aac.c
1253
br->BlockNumber = bp->bio_pblkno;
sys/dev/aac/aac.c
1254
br->ByteCount = bp->bio_bcount;
sys/dev/aac/aac.c
1263
bw->BlockNumber = bp->bio_pblkno;
sys/dev/aac/aac.c
1264
bw->ByteCount = bp->bio_bcount;
sys/dev/aac/aac.c
1272
if (bp->bio_cmd == BIO_READ) {
sys/dev/aac/aac.c
1277
br->SectorCount = bp->bio_bcount / AAC_BLOCK_SIZE;
sys/dev/aac/aac.c
1278
br->BlockNumber = bp->bio_pblkno;
sys/dev/aac/aac.c
1289
bw->SectorCount = bp->bio_bcount / AAC_BLOCK_SIZE;
sys/dev/aac/aac.c
1290
bw->BlockNumber = bp->bio_pblkno;
sys/dev/aac/aac.c
1303
if (bp != NULL)
sys/dev/aac/aac.c
1304
aac_enqueue_bio(sc, bp);
sys/dev/aac/aac.c
1318
struct bio *bp;
sys/dev/aac/aac.c
1322
bp = (struct bio *)cm->cm_private;
sys/dev/aac/aac.c
1323
if (bp->bio_cmd == BIO_READ) {
sys/dev/aac/aac.c
1334
bp->bio_resid = 0;
sys/dev/aac/aac.c
1336
bp->bio_error = EIO;
sys/dev/aac/aac.c
1337
bp->bio_flags |= BIO_ERROR;
sys/dev/aac/aac.c
1339
aac_biodone(bp);
sys/dev/aac/aac_disk.c
140
aac_disk_strategy(struct bio *bp)
sys/dev/aac/aac_disk.c
144
sc = (struct aac_disk *)bp->bio_disk->d_drv1;
sys/dev/aac/aac_disk.c
149
bp->bio_flags |= BIO_ERROR;
sys/dev/aac/aac_disk.c
150
bp->bio_error = EINVAL;
sys/dev/aac/aac_disk.c
151
biodone(bp);
sys/dev/aac/aac_disk.c
156
if (bp->bio_bcount == 0) {
sys/dev/aac/aac_disk.c
157
bp->bio_resid = bp->bio_bcount;
sys/dev/aac/aac_disk.c
158
biodone(bp);
sys/dev/aac/aac_disk.c
162
if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE)) {
sys/dev/aac/aac_disk.c
163
biofinish(bp, NULL, EOPNOTSUPP);
sys/dev/aac/aac_disk.c
171
aac_submit_bio(bp);
sys/dev/aac/aac_disk.c
334
aac_biodone(struct bio *bp)
sys/dev/aac/aac_disk.c
338
if (bp->bio_flags & BIO_ERROR) {
sys/dev/aac/aac_disk.c
339
bp->bio_resid = bp->bio_bcount;
sys/dev/aac/aac_disk.c
340
disk_err(bp, "hard error", -1, 1);
sys/dev/aac/aac_disk.c
343
biodone(bp);
sys/dev/aac/aacvar.h
461
extern void aac_submit_bio(struct bio *bp);
sys/dev/aac/aacvar.h
462
extern void aac_biodone(struct bio *bp);
sys/dev/aac/aacvar.h
603
aac_enqueue_bio(struct aac_softc *sc, struct bio *bp)
sys/dev/aac/aacvar.h
605
bioq_insert_tail(&sc->aac_bioq, bp);
sys/dev/aac/aacvar.h
612
struct bio *bp;
sys/dev/aac/aacvar.h
614
if ((bp = bioq_first(&sc->aac_bioq)) != NULL) {
sys/dev/aac/aacvar.h
615
bioq_remove(&sc->aac_bioq, bp);
sys/dev/aac/aacvar.h
618
return(bp);
sys/dev/aacraid/aacraid_var.h
506
extern void aacraid_submit_bio(struct bio *bp);
sys/dev/aacraid/aacraid_var.h
507
extern void aacraid_biodone(struct bio *bp);
sys/dev/acpi_support/atk0110.c
245
ACPI_OBJECT *bp;
sys/dev/acpi_support/atk0110.c
282
bp = buf.Pointer;
sys/dev/acpi_support/atk0110.c
283
sc->sc_asens_all = malloc(sizeof(*sc->sc_asens_all) * bp->Package.Count,
sys/dev/acpi_support/atk0110.c
286
for (i = 0; i < bp->Package.Count; i++) {
sys/dev/acpi_support/atk0110.c
288
err = aibs_add_sensor(sc, &bp->Package.Elements[i], sensor,
sys/dev/acpi_support/atk0110.c
335
ACPI_OBJECT *bp, *o;
sys/dev/acpi_support/atk0110.c
370
bp = b.Pointer;
sys/dev/acpi_support/atk0110.c
371
o = bp->Package.Elements;
sys/dev/acpi_support/atk0110.c
379
if (bp->Package.Count - 1 < n) {
sys/dev/acpi_support/atk0110.c
383
} else if (bp->Package.Count - 1 > n) {
sys/dev/acpi_support/atk0110.c
387
n = bp->Package.Count - 1;
sys/dev/acpi_support/atk0110.c
390
", assume %i\n", name, on, bp->Package.Count - 1, n);
sys/dev/acpi_support/atk0110.c
458
ACPI_OBJECT p, *bp;
sys/dev/acpi_support/atk0110.c
495
bp = b.Pointer;
sys/dev/acpi_support/atk0110.c
496
v = bp->Integer.Value;
sys/dev/acpi_support/atk0110.c
523
ACPI_OBJECT p, *bp;
sys/dev/acpi_support/atk0110.c
549
bp = buf.Pointer;
sys/dev/acpi_support/atk0110.c
550
if (bp->Buffer.Length < 8) {
sys/dev/acpi_support/atk0110.c
554
ret = (uint32_t *)bp->Buffer.Pointer;
sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
738
int bp = 0;
sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
739
for (bp = 0; bp < 30; bp++) {
sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
741
pilot_mask = pilot_mask | 0x1 << bp;
sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
742
chan_mask = chan_mask | 0x1 << bp;
sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
728
int bp = 0;
sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
729
for (bp = 0; bp < 30; bp++) {
sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
731
pilot_mask = pilot_mask | 0x1 << bp;
sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
732
chan_mask = chan_mask | 0x1 << bp;
sys/dev/ath/if_ath_tx.c
369
int i, bp, dsp;
sys/dev/ath/if_ath_tx.c
397
bp = dsp = 0;
sys/dev/ath/if_ath_tx.c
401
bufAddrList[bp] = bf->bf_segs[i].ds_addr;
sys/dev/ath/if_ath_tx.c
402
segLenList[bp] = bf->bf_segs[i].ds_len;
sys/dev/ath/if_ath_tx.c
403
bp++;
sys/dev/ath/if_ath_tx.c
409
if ((i != bf->bf_nseg - 1) && (bp < numTxMaps))
sys/dev/ath/if_ath_tx.c
415
bp = 0;
sys/dev/bce/if_bce.c
4104
cpu_reg.bp = BCE_RXP_CPU_HW_BREAKPOINT;
sys/dev/bce/if_bce.c
4137
cpu_reg.bp = BCE_RXP_CPU_HW_BREAKPOINT;
sys/dev/bce/if_bce.c
4234
cpu_reg.bp = BCE_TXP_CPU_HW_BREAKPOINT;
sys/dev/bce/if_bce.c
4330
cpu_reg.bp = BCE_TPAT_CPU_HW_BREAKPOINT;
sys/dev/bce/if_bce.c
4426
cpu_reg.bp = BCE_CP_CPU_HW_BREAKPOINT;
sys/dev/bce/if_bce.c
4522
cpu_reg.bp = BCE_COM_CPU_HW_BREAKPOINT;
sys/dev/bce/if_bcereg.h
519
#define BCE_CHIP_BOND(bp) (((sc)->bce_chipid) & 0x0000000f)
sys/dev/bce/if_bcereg.h
6180
u32 bp;
sys/dev/bnxt/bnxt_en/bnxt.h
1244
#define BNXT_TRUFLOW_EN(bp) ((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN)
sys/dev/bnxt/bnxt_en/bnxt.h
1256
#define BNXT_SW_RES_LMT(bp) ((bp)->fw_cap & BNXT_FW_CAP_SW_MAX_RESOURCE_LIMITS)
sys/dev/bnxt/bnxt_en/bnxt.h
1296
#define BNXT_NO_FW_ACCESS(bp) \
sys/dev/bnxt/bnxt_en/bnxt.h
1297
test_bit(BNXT_STATE_FW_FATAL_COND, &(bp)->state)
sys/dev/bnxt/bnxt_en/bnxt.h
1381
int bnxt_read_sfp_module_eeprom_info(struct bnxt_softc *bp, uint16_t i2c_addr,
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1024
int bnxt_hwrm_func_drv_rgtr(struct bnxt_softc *bp, unsigned long *bmap, int bmap_size,
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1030
(void *)bp->hwrm_cmd_resp.idi_vaddr;
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1036
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_DRV_RGTR);
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1045
if (bp->fw_cap & BNXT_FW_CAP_HOT_RESET)
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1047
if (bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1050
if (bp->fw_cap & BNXT_FW_CAP_NPAR_1_2)
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1056
if (BNXT_PF(bp)) {
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1061
if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE)
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1069
!(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)) {
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1087
rc = hwrm_send_message(bp, &req, sizeof(req));
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
1092
bp->fw_cap |= BNXT_FW_CAP_IF_CHANGE;
sys/dev/bnxt/bnxt_en/bnxt_hwrm.h
52
int bnxt_hwrm_func_drv_rgtr(struct bnxt_softc *bp, unsigned long *bmap, int bmap_size,
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
1559
void simulate_reset(struct bnxt_softc *bp, char *fwcli_string)
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
1564
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_DBG_FW_CLI);
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
1571
BNXT_HWRM_LOCK(bp);
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
1572
rc = _hwrm_send_message(bp, &req, sizeof(req));
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
1574
device_printf(bp->dev, " Manual FW fault failed, rc:%x\n", rc);
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
1576
BNXT_HWRM_UNLOCK(bp);
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
39
extern void bnxt_fw_reset(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
40
extern void bnxt_queue_sp_work(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
104
mtx_lock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
113
mtx_unlock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
117
static void bnxt_fill_msix_vecs(struct bnxt_softc *bp, struct bnxt_msix_entry *ent)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
119
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
125
ent[i].vector = bp->irq_tbl[idx + i].vector;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
127
if (BNXT_CHIP_P5_PLUS(bp))
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
128
ent[i].db_offset = bp->db_offset;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
138
struct bnxt_softc *bp = edev->softc;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
147
idx = bp->total_irqs - BNXT_ROCE_IRQ_COUNT;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
150
mtx_lock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
154
bnxt_fill_msix_vecs(bp, ent);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
156
mtx_unlock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
162
struct bnxt_softc *bp = edev->softc;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
170
mtx_lock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
177
mtx_unlock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
182
int bnxt_get_ulp_msix_num(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
184
if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) {
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
185
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
192
int bnxt_get_ulp_msix_base(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
194
if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) {
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
195
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
227
void bnxt_ulp_stop(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
229
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
237
edev->en_state = bp->state;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
248
void bnxt_ulp_start(struct bnxt_softc *bp, int err)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
250
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
258
edev->en_state = bp->state;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
273
void bnxt_ulp_sriov_cfg(struct bnxt_softc *bp, int num_vfs)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
275
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
298
void bnxt_ulp_shutdown(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
300
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
317
void bnxt_ulp_irq_stop(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
319
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
325
if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) {
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
338
void bnxt_ulp_async_events(struct bnxt_softc *bp, struct hwrm_async_event_cmpl *cmpl)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
341
struct bnxt_en_dev *edev = bp->edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
373
struct bnxt_softc *bp = edev->softc;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
379
mtx_lock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
384
bnxt_hwrm_func_drv_rgtr(bp, events_bmap, max_id + 1, true);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
385
mtx_unlock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
438
struct bnxt_softc *bp = bnxt_adev->edev->softc;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
442
bp->edev = NULL;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
445
static inline void bnxt_set_edev_info(struct bnxt_en_dev *edev, struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
448
edev->net = bp->ifp;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
449
edev->pdev = bp->pdev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
450
edev->softc = bp;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
451
edev->l2_db_size = bp->db_size;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
452
edev->l2_db_offset = bp->db_offset;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
453
mtx_init(&bp->en_ops_lock, "Ethernet ops lock", NULL, MTX_DEF);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
455
if (bp->flags & BNXT_FLAG_ROCEV1_CAP)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
457
if (bp->flags & BNXT_FLAG_ROCEV2_CAP)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
459
if (bp->is_asym_q)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
461
if (BNXT_SW_RES_LMT(bp))
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
463
edev->hwrm_bar = bp->hwrm_bar;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
464
edev->port_partition_type = bp->port_partition_type;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
466
memcpy(edev->board_part_number, bp->board_partno, BNXT_VPD_PN_FLD_LEN - 1);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
482
int bnxt_rdma_aux_device_add(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
484
struct bnxt_aux_dev *bnxt_adev = bp->aux_dev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
489
if (bnxt_populate_irq(bp))
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
492
device_printf(bp->dev, "V:D:SV:SD %x:%x:%x:%x, irq 0x%x, "
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
494
bp->pdev->vendor, bp->pdev->device, bp->pdev->subsystem_vendor,
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
495
bp->pdev->subsystem_device, bp->pdev->irq, bp->pdev->devfn,
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
496
bp->pdev->class, bp->pdev->revision, bp->pdev->msi_enabled);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
501
aux_dev->dev.parent = &bp->pdev->dev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
510
bnxt_set_edev_info(edev, bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
512
bp->edev = edev;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
528
bp->edev = NULL;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
57
struct bnxt_softc *bp = edev->softc;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
64
mtx_lock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
67
device_printf(bp->dev, "ulp id %d already registered\n", ulp_id);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
78
if (test_bit(BNXT_STATE_OPEN, &bp->state) && bp->is_dev_init)
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
79
bnxt_hwrm_vnic_cfg(bp, &bp->vnic_info);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
83
mtx_unlock(&bp->en_ops_lock);
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
89
struct bnxt_softc *bp = edev->softc;
sys/dev/bnxt/bnxt_en/bnxt_ulp.c
98
device_printf(bp->dev, "ulp id %d not registered\n", ulp_id);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
155
int bnxt_get_ulp_msix_num(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
156
int bnxt_get_ulp_msix_base(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
157
int bnxt_get_ulp_stat_ctxs(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
158
void bnxt_ulp_stop(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
159
void bnxt_ulp_start(struct bnxt_softc *bp, int err);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
160
void bnxt_ulp_sriov_cfg(struct bnxt_softc *bp, int num_vfs);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
161
void bnxt_ulp_shutdown(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
162
void bnxt_ulp_irq_stop(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
163
void bnxt_ulp_irq_restart(struct bnxt_softc *bp, int err);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
164
void bnxt_ulp_async_events(struct bnxt_softc *bp, struct hwrm_async_event_cmpl *cmpl);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
167
int bnxt_rdma_aux_device_add(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/bnxt_ulp.h
168
int bnxt_rdma_aux_device_del(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1618
static int bnxt_hwrm_poll(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1621
(void *)bp->hwrm_cmd_resp.idi_vaddr;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1625
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VER_GET);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1631
rc = _hwrm_send_message(bp, &req, sizeof(req));
sys/dev/bnxt/bnxt_en/if_bnxt.c
1641
static void bnxt_rtnl_lock_sp(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1648
clear_bit(BNXT_STATE_IN_SP_TASK, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1652
static void bnxt_rtnl_unlock_sp(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1654
set_bit(BNXT_STATE_IN_SP_TASK, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1665
static u32 bnxt_fw_health_readl(struct bnxt_softc *bp, int reg_idx)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1667
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1675
pci_read_config_dword(bp->pdev, reg_off, &val);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1681
val = readl_fbsd(bp, reg_off, 0);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1684
val = readl_fbsd(bp, reg_off, 2);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1692
static void bnxt_fw_reset_close(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1695
bnxt_ulp_stop(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1700
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
1703
val = pci_read_config(bp->dev, PCI_SUBSYSTEM_ID, 2);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1705
bp->fw_reset_min_dsecs = 0;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1707
bnxt_fw_fatal_close(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1710
iflib_request_reset(bp->ctx);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1711
bnxt_stop(bp->ctx);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1712
bnxt_hwrm_func_drv_unrgtr(bp, false);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1714
for (i = bp->nrxqsets-1; i>=0; i--) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
1715
if (BNXT_CHIP_P5_PLUS(bp))
sys/dev/bnxt/bnxt_en/if_bnxt.c
1716
iflib_irq_free(bp->ctx, &bp->nq_rings[i].irq);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1718
iflib_irq_free(bp->ctx, &bp->rx_cp_rings[i].irq);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1721
if (pci_is_enabled(bp->pdev))
sys/dev/bnxt/bnxt_en/if_bnxt.c
1722
pci_disable_device(bp->pdev);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1723
pci_disable_busmaster(bp->dev);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1724
bnxt_free_ctx_mem(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1727
static bool is_bnxt_fw_ok(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1729
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1733
val = bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1737
val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1747
void bnxt_fw_reset(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1749
bnxt_rtnl_lock_sp(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1750
if (test_bit(BNXT_STATE_OPEN, &bp->state) &&
sys/dev/bnxt/bnxt_en/if_bnxt.c
1751
!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
1753
set_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1754
bnxt_fw_reset_close(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1756
if ((bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
1757
bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW_DOWN;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1760
bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1761
tmo = bp->fw_reset_min_dsecs * HZ /10;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1763
bnxt_queue_fw_reset_work(bp, tmo);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1765
bnxt_rtnl_unlock_sp(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1768
static void bnxt_queue_fw_reset_work(struct bnxt_softc *bp, unsigned long delay)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1770
if (!(test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)))
sys/dev/bnxt/bnxt_en/if_bnxt.c
1773
if (BNXT_PF(bp))
sys/dev/bnxt/bnxt_en/if_bnxt.c
1774
queue_delayed_work(bnxt_pf_wq, &bp->fw_reset_task, delay);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1776
schedule_delayed_work(&bp->fw_reset_task, delay);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1779
void bnxt_queue_sp_work(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1781
if (BNXT_PF(bp))
sys/dev/bnxt/bnxt_en/if_bnxt.c
1782
queue_work(bnxt_pf_wq, &bp->sp_task);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1784
schedule_work(&bp->sp_task);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1787
static void bnxt_fw_reset_writel(struct bnxt_softc *bp, int reg_idx)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1789
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1799
pci_write_config_dword(bp->pdev, reg_off, val);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1802
writel_fbsd(bp, BNXT_GRCPF_REG_WINDOW_BASE_OUT + 4, 0, reg_off & BNXT_GRC_BASE_MASK);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1806
writel_fbsd(bp, reg_off, 0, val);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1809
writel_fbsd(bp, reg_off, 2, val);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1813
pci_read_config_dword(bp->pdev, 0, &val);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1818
static void bnxt_reset_all(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1820
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1823
if (bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
1824
bp->fw_reset_timestamp = jiffies;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1830
bnxt_fw_reset_writel(bp, i);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1834
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FW_RESET);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1839
rc = hwrm_send_message(bp, &req, sizeof(req));
sys/dev/bnxt/bnxt_en/if_bnxt.c
1842
device_printf(bp->dev, "Unable to reset FW rc=%d\n", rc);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1844
bp->fw_reset_timestamp = jiffies;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1847
static int __bnxt_alloc_fw_health(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1849
if (bp->fw_health)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1852
bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1853
if (!bp->fw_health)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1856
mutex_init(&bp->fw_health->lock);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1860
static int bnxt_alloc_fw_health(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1864
if (!(bp->fw_cap & BNXT_FW_CAP_HOT_RESET) &&
sys/dev/bnxt/bnxt_en/if_bnxt.c
1865
!(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY))
sys/dev/bnxt/bnxt_en/if_bnxt.c
1868
rc = __bnxt_alloc_fw_health(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1870
bp->fw_cap &= ~BNXT_FW_CAP_HOT_RESET;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1871
bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1878
static inline void __bnxt_map_fw_health_reg(struct bnxt_softc *bp, u32 reg)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1880
writel_fbsd(bp, BNXT_GRCPF_REG_WINDOW_BASE_OUT + BNXT_FW_HEALTH_WIN_MAP_OFF, 0, reg & BNXT_GRC_BASE_MASK);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1883
static int bnxt_map_fw_health_regs(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1885
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1889
bp->fw_health->status_reliable = false;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1890
bp->fw_health->resets_reliable = false;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1903
bp->fw_health->status_reliable = true;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1904
bp->fw_health->resets_reliable = true;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1908
__bnxt_map_fw_health_reg(bp, reg_base);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1912
static void bnxt_inv_fw_health_reg(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1914
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1929
static int bnxt_hwrm_error_recovery_qcfg(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1931
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1933
(void *)bp->hwrm_cmd_resp.idi_vaddr;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1937
if (!(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY))
sys/dev/bnxt/bnxt_en/if_bnxt.c
1940
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_ERROR_RECOVERY_QCFG);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1941
rc = _hwrm_send_message(bp, &req, sizeof(req));
sys/dev/bnxt/bnxt_en/if_bnxt.c
1947
!(bp->fw_cap & BNXT_FW_CAP_KONG_MB_CHNL)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
1985
rc = bnxt_map_fw_health_regs(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
1987
bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY;
sys/dev/bnxt/bnxt_en/if_bnxt.c
1991
static int bnxt_drv_rgtr(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
1998
if (bnxt_alloc_fw_health(bp)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
1999
device_printf(bp->dev, "no memory for firmware error recovery\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2001
rc = bnxt_hwrm_error_recovery_qcfg(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2003
device_printf(bp->dev, "hwrm query error recovery failure rc: %d\n",
sys/dev/bnxt/bnxt_en/if_bnxt.c
2006
rc = bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, false); //sumit dbg: revisit the params
sys/dev/bnxt/bnxt_en/if_bnxt.c
2012
static bool bnxt_fw_reset_timeout(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
2014
return time_after(jiffies, bp->fw_reset_timestamp +
sys/dev/bnxt/bnxt_en/if_bnxt.c
2015
(bp->fw_reset_max_dsecs * HZ / 10));
sys/dev/bnxt/bnxt_en/if_bnxt.c
2018
static int bnxt_open(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
2021
if (BNXT_PF(bp))
sys/dev/bnxt/bnxt_en/if_bnxt.c
2022
rc = bnxt_hwrm_nvm_get_dev_info(bp, &bp->nvm_info->mfg_id,
sys/dev/bnxt/bnxt_en/if_bnxt.c
2023
&bp->nvm_info->device_id, &bp->nvm_info->sector_size,
sys/dev/bnxt/bnxt_en/if_bnxt.c
2024
&bp->nvm_info->size, &bp->nvm_info->reserved_size,
sys/dev/bnxt/bnxt_en/if_bnxt.c
2025
&bp->nvm_info->available_size);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2028
rc = bnxt_hwrm_queue_qportcfg(bp, HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_TX);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2030
device_printf(bp->dev, "reinit: hwrm qportcfg (tx) failed\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2033
if (bp->is_asym_q) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2034
rc = bnxt_hwrm_queue_qportcfg(bp,
sys/dev/bnxt/bnxt_en/if_bnxt.c
2037
device_printf(bp->dev, "re-init: hwrm qportcfg (rx) failed\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2040
bnxt_verify_asym_queues(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2042
bp->rx_max_q = bp->tx_max_q;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2043
memcpy(bp->rx_q_info, bp->tx_q_info, sizeof(bp->rx_q_info));
sys/dev/bnxt/bnxt_en/if_bnxt.c
2044
memcpy(bp->rx_q_ids, bp->tx_q_ids, sizeof(bp->rx_q_ids));
sys/dev/bnxt/bnxt_en/if_bnxt.c
2047
rc = bnxt_hwrm_func_qcaps(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2052
rc = bnxt_drv_rgtr(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2055
if (bp->hwrm_spec_code >= 0x10803) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2056
rc = bnxt_alloc_ctx_mem(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2058
device_printf(bp->dev, "attach: alloc_ctx_mem failed\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2061
rc = bnxt_hwrm_func_resc_qcaps(bp, true);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2063
bp->flags |= BNXT_FLAG_FW_CAP_NEW_RM;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2066
if (BNXT_CHIP_P5_PLUS(bp))
sys/dev/bnxt/bnxt_en/if_bnxt.c
2067
bnxt_hwrm_reserve_pf_rings(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2069
rc = bnxt_hwrm_func_qcfg(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2071
device_printf(bp->dev, "re-init: hwrm func qcfg failed\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2075
bnxt_msix_intr_assign(bp->ctx, 0);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2076
bnxt_init(bp->ctx);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2077
bnxt_intr_enable(bp->ctx);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2079
if (test_and_clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2080
if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2081
bnxt_ulp_start(bp, 0);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2085
device_printf(bp->dev, "Network interface is UP and operational\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2089
static void bnxt_fw_reset_abort(struct bnxt_softc *bp, int rc)
sys/dev/bnxt/bnxt_en/if_bnxt.c
2091
clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2092
if (bp->fw_reset_state != BNXT_FW_RESET_STATE_POLL_VF) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2093
bnxt_ulp_start(bp, rc);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2095
bp->fw_reset_state = 0;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2100
struct bnxt_softc *bp = container_of(work, struct bnxt_softc, fw_reset_task.work);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2103
if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2104
device_printf(bp->dev, "bnxt_fw_reset_task() called when not in fw reset mode!\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2108
switch (bp->fw_reset_state) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2112
val = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2114
!bnxt_fw_reset_timeout(bp)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2115
bnxt_queue_fw_reset_work(bp, HZ / 5);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2119
if (!bp->fw_health->primary) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2120
u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2122
bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2123
bnxt_queue_fw_reset_work(bp, wait_dsecs * HZ / 10);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2126
bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2130
bnxt_reset_all(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2131
bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2132
bnxt_queue_fw_reset_work(bp, bp->fw_reset_min_dsecs * HZ / 10);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2135
bnxt_inv_fw_health_reg(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2136
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) &&
sys/dev/bnxt/bnxt_en/if_bnxt.c
2137
!bp->fw_reset_min_dsecs) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2140
val = pci_read_config(bp->dev, PCI_SUBSYSTEM_ID, 2);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2142
if (bnxt_fw_reset_timeout(bp)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2143
device_printf(bp->dev, "Firmware reset aborted, PCI config space invalid\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2147
bnxt_queue_fw_reset_work(bp, HZ / 1000);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2151
clear_bit(BNXT_STATE_FW_FATAL_COND, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2152
clear_bit(BNXT_STATE_FW_NON_FATAL_COND, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2153
if (!pci_is_enabled(bp->pdev)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2154
if (pci_enable_device(bp->pdev)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2155
device_printf(bp->dev, "Cannot re-enable PCI device\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2160
pci_set_master(bp->pdev);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2161
bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2164
bp->hwrm_cmd_timeo = SHORT_HWRM_CMD_TIMEOUT;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2165
rc = bnxt_hwrm_poll(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2167
if (bnxt_fw_reset_timeout(bp)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2168
device_printf(bp->dev, "Firmware reset aborted\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2171
bnxt_queue_fw_reset_work(bp, HZ / 5);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2174
bp->hwrm_cmd_timeo = DFLT_HWRM_CMD_TIMEOUT;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2175
bp->fw_reset_state = BNXT_FW_RESET_STATE_OPENING;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2178
rc = bnxt_open(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2180
device_printf(bp->dev, "bnxt_open() failed during FW reset\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2181
bnxt_fw_reset_abort(bp, rc);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2186
if ((bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY) &&
sys/dev/bnxt/bnxt_en/if_bnxt.c
2187
bp->fw_health->enabled) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2188
bp->fw_health->last_fw_reset_cnt =
sys/dev/bnxt/bnxt_en/if_bnxt.c
2189
bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2191
bp->fw_reset_state = 0;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2193
clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2194
bnxt_ulp_start(bp, 0);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2195
clear_bit(BNXT_STATE_FW_ACTIVATE, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2196
set_bit(BNXT_STATE_OPEN, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2202
if (bp->fw_health->status_reliable ||
sys/dev/bnxt/bnxt_en/if_bnxt.c
2203
(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2204
u32 sts = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2206
device_printf(bp->dev, "fw_health_status 0x%x\n", sts);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2210
bnxt_fw_reset_abort(bp, rc);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2214
static void bnxt_force_fw_reset(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
2216
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2219
if (!test_bit(BNXT_STATE_OPEN, &bp->state) ||
sys/dev/bnxt/bnxt_en/if_bnxt.c
2220
test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
sys/dev/bnxt/bnxt_en/if_bnxt.c
2222
bnxt_fw_reset_close(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2227
bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2229
bp->fw_reset_timestamp = jiffies + wait_dsecs * HZ / 10;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2231
bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2234
bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2235
bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2236
bnxt_queue_fw_reset_work(bp, wait_dsecs * HZ / 10);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2239
static void bnxt_fw_exception(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
2241
device_printf(bp->dev, "Detected firmware fatal condition, initiating reset\n");
sys/dev/bnxt/bnxt_en/if_bnxt.c
2242
set_bit(BNXT_STATE_FW_FATAL_COND, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2243
bnxt_rtnl_lock_sp(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2244
bnxt_force_fw_reset(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2245
bnxt_rtnl_unlock_sp(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2248
static void __bnxt_fw_recover(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
2250
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) ||
sys/dev/bnxt/bnxt_en/if_bnxt.c
2251
test_bit(BNXT_STATE_FW_NON_FATAL_COND, &bp->state))
sys/dev/bnxt/bnxt_en/if_bnxt.c
2252
bnxt_fw_reset(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2254
bnxt_fw_exception(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2257
static void bnxt_devlink_health_fw_report(struct bnxt_softc *bp)
sys/dev/bnxt/bnxt_en/if_bnxt.c
2259
struct bnxt_fw_health *fw_health = bp->fw_health;
sys/dev/bnxt/bnxt_en/if_bnxt.c
2265
__bnxt_fw_recover(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2272
struct bnxt_softc *bp = container_of(work, struct bnxt_softc, sp_task);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2274
set_bit(BNXT_STATE_IN_SP_TASK, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2276
if (!test_bit(BNXT_STATE_OPEN, &bp->state)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2277
clear_bit(BNXT_STATE_IN_SP_TASK, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2281
if (test_and_clear_bit(BNXT_FW_RESET_NOTIFY_SP_EVENT, &bp->sp_event)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2282
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) ||
sys/dev/bnxt/bnxt_en/if_bnxt.c
2283
test_bit(BNXT_STATE_FW_NON_FATAL_COND, &bp->state))
sys/dev/bnxt/bnxt_en/if_bnxt.c
2284
bnxt_devlink_health_fw_report(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2286
bnxt_fw_reset(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2289
if (test_and_clear_bit(BNXT_FW_EXCEPTION_SP_EVENT, &bp->sp_event)) {
sys/dev/bnxt/bnxt_en/if_bnxt.c
2290
if (!is_bnxt_fw_ok(bp))
sys/dev/bnxt/bnxt_en/if_bnxt.c
2291
bnxt_devlink_health_fw_report(bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
2294
clear_bit(BNXT_STATE_IN_SP_TASK, &bp->state);
sys/dev/bnxt/bnxt_en/if_bnxt.c
252
static void bnxt_queue_fw_reset_work(struct bnxt_softc *bp, unsigned long delay);
sys/dev/bnxt/bnxt_en/if_bnxt.c
253
void bnxt_queue_sp_work(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
255
void bnxt_fw_reset(struct bnxt_softc *bp);
sys/dev/bnxt/bnxt_en/if_bnxt.c
287
void writel_fbsd(struct bnxt_softc *bp, u32, u8, u32);
sys/dev/bnxt/bnxt_en/if_bnxt.c
288
u32 readl_fbsd(struct bnxt_softc *bp, u32, u8);
sys/dev/bnxt/bnxt_en/if_bnxt.c
290
u32 readl_fbsd(struct bnxt_softc *bp, u32 reg_off, u8 bar_idx)
sys/dev/bnxt/bnxt_en/if_bnxt.c
294
return bus_space_read_4(bp->doorbell_bar.tag, bp->doorbell_bar.handle, reg_off);
sys/dev/bnxt/bnxt_en/if_bnxt.c
296
return bus_space_read_4(bp->hwrm_bar.tag, bp->hwrm_bar.handle, reg_off);
sys/dev/bnxt/bnxt_en/if_bnxt.c
299
void writel_fbsd(struct bnxt_softc *bp, u32 reg_off, u8 bar_idx, u32 val)
sys/dev/bnxt/bnxt_en/if_bnxt.c
303
bus_space_write_4(bp->doorbell_bar.tag, bp->doorbell_bar.handle, reg_off, htole32(val));
sys/dev/bnxt/bnxt_en/if_bnxt.c
305
bus_space_write_4(bp->hwrm_bar.tag, bp->hwrm_bar.handle, reg_off, htole32(val));
sys/dev/bnxt/bnxt_en/if_bnxt.c
433
bnxt_set_db_mask(struct bnxt_softc *bp, struct bnxt_ring *db,
sys/dev/bnxt/bnxt_en/if_bnxt.c
436
if (BNXT_CHIP_P7(bp)) {
sys/dev/bnxt/bnxt_re/bnxt_re.h
1052
void writel_fbsd(struct bnxt_softc *bp, u32, u8, u32);
sys/dev/bnxt/bnxt_re/bnxt_re.h
1053
u32 readl_fbsd(struct bnxt_softc *bp, u32, u8);
sys/dev/bnxt/bnxt_re/main.c
115
void writel_fbsd(struct bnxt_softc *bp, u32, u8, u32);
sys/dev/bnxt/bnxt_re/main.c
116
u32 readl_fbsd(struct bnxt_softc *bp, u32, u8);
sys/dev/bnxt/bnxt_re/main.c
158
u32 readl_fbsd(struct bnxt_softc *bp, u32 reg_off, u8 bar_idx)
sys/dev/bnxt/bnxt_re/main.c
162
return bus_space_read_8(bp->doorbell_bar.tag, bp->doorbell_bar.handle, reg_off);
sys/dev/bnxt/bnxt_re/main.c
164
return bus_space_read_8(bp->hwrm_bar.tag, bp->hwrm_bar.handle, reg_off);
sys/dev/bnxt/bnxt_re/main.c
167
void writel_fbsd(struct bnxt_softc *bp, u32 reg_off, u8 bar_idx, u32 val)
sys/dev/bnxt/bnxt_re/main.c
170
bus_space_write_8(bp->doorbell_bar.tag, bp->doorbell_bar.handle, reg_off, htole32(val));
sys/dev/bnxt/bnxt_re/main.c
172
bus_space_write_8(bp->hwrm_bar.tag, bp->hwrm_bar.handle, reg_off, htole32(val));
sys/dev/cfi/cfi_disk.c
170
cfi_disk_read(struct cfi_softc *sc, struct bio *bp)
sys/dev/cfi/cfi_disk.c
178
bp->bio_error = cfi_block_finish(sc);
sys/dev/cfi/cfi_disk.c
179
if (bp->bio_error) {
sys/dev/cfi/cfi_disk.c
180
bp->bio_flags |= BIO_ERROR;
sys/dev/cfi/cfi_disk.c
184
if (bp->bio_offset > sc->sc_size) {
sys/dev/cfi/cfi_disk.c
185
bp->bio_flags |= BIO_ERROR;
sys/dev/cfi/cfi_disk.c
186
bp->bio_error = EIO;
sys/dev/cfi/cfi_disk.c
189
resid = bp->bio_bcount;
sys/dev/cfi/cfi_disk.c
191
uint8_t *dp = (uint8_t *)bp->bio_data;
sys/dev/cfi/cfi_disk.c
192
while (resid > 0 && bp->bio_offset < sc->sc_size) {
sys/dev/cfi/cfi_disk.c
193
*dp++ = cfi_read_raw(sc, bp->bio_offset);
sys/dev/cfi/cfi_disk.c
194
bp->bio_offset += 1, resid -= 1;
sys/dev/cfi/cfi_disk.c
197
uint16_t *dp = (uint16_t *)bp->bio_data;
sys/dev/cfi/cfi_disk.c
198
while (resid > 0 && bp->bio_offset < sc->sc_size) {
sys/dev/cfi/cfi_disk.c
199
*dp++ = cfi_read_raw(sc, bp->bio_offset);
sys/dev/cfi/cfi_disk.c
200
bp->bio_offset += 2, resid -= 2;
sys/dev/cfi/cfi_disk.c
203
uint32_t *dp = (uint32_t *)bp->bio_data;
sys/dev/cfi/cfi_disk.c
204
while (resid > 0 && bp->bio_offset < sc->sc_size) {
sys/dev/cfi/cfi_disk.c
205
*dp++ = cfi_read_raw(sc, bp->bio_offset);
sys/dev/cfi/cfi_disk.c
206
bp->bio_offset += 4, resid -= 4;
sys/dev/cfi/cfi_disk.c
209
bp->bio_resid = resid;
sys/dev/cfi/cfi_disk.c
211
biodone(bp);
sys/dev/cfi/cfi_disk.c
215
cfi_disk_write(struct cfi_softc *sc, struct bio *bp)
sys/dev/cfi/cfi_disk.c
223
if (bp->bio_offset > sc->sc_size) {
sys/dev/cfi/cfi_disk.c
224
bp->bio_flags |= BIO_ERROR;
sys/dev/cfi/cfi_disk.c
225
bp->bio_error = EIO;
sys/dev/cfi/cfi_disk.c
228
resid = bp->bio_bcount;
sys/dev/cfi/cfi_disk.c
236
if (bp->bio_offset < sc->sc_wrofs ||
sys/dev/cfi/cfi_disk.c
237
bp->bio_offset >= top)
sys/dev/cfi/cfi_disk.c
243
bp->bio_error = cfi_block_start(sc, bp->bio_offset);
sys/dev/cfi/cfi_disk.c
244
if (bp->bio_error) {
sys/dev/cfi/cfi_disk.c
245
bp->bio_flags |= BIO_ERROR;
sys/dev/cfi/cfi_disk.c
251
bcopy(bp->bio_data,
sys/dev/cfi/cfi_disk.c
252
sc->sc_wrbuf + bp->bio_offset - sc->sc_wrofs,
sys/dev/cfi/cfi_disk.c
253
MIN(top - bp->bio_offset, resid));
sys/dev/cfi/cfi_disk.c
254
resid -= MIN(top - bp->bio_offset, resid);
sys/dev/cfi/cfi_disk.c
256
bp->bio_resid = resid;
sys/dev/cfi/cfi_disk.c
258
biodone(bp);
sys/dev/cfi/cfi_disk.c
266
struct bio *bp;
sys/dev/cfi/cfi_disk.c
270
bp = bioq_takefirst(&sc->bioq);
sys/dev/cfi/cfi_disk.c
272
if (bp == NULL)
sys/dev/cfi/cfi_disk.c
275
switch (bp->bio_cmd) {
sys/dev/cfi/cfi_disk.c
277
cfi_disk_read(cfi, bp);
sys/dev/cfi/cfi_disk.c
280
cfi_disk_write(cfi, bp);
sys/dev/cfi/cfi_disk.c
287
cfi_disk_getattr(struct bio *bp)
sys/dev/cfi/cfi_disk.c
293
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL)
sys/dev/cfi/cfi_disk.c
296
dsc = bp->bio_disk->d_drv1;
sys/dev/cfi/cfi_disk.c
300
if (strcmp(bp->bio_attribute, "CFI::device") == 0) {
sys/dev/cfi/cfi_disk.c
301
if (bp->bio_length != sizeof(dev))
sys/dev/cfi/cfi_disk.c
303
bcopy(&dev, bp->bio_data, sizeof(dev));
sys/dev/cfi/cfi_disk.c
310
cfi_disk_strategy(struct bio *bp)
sys/dev/cfi/cfi_disk.c
312
struct cfi_disk_softc *sc = bp->bio_disk->d_drv1;
sys/dev/cfi/cfi_disk.c
315
biofinish(bp, NULL, EINVAL);
sys/dev/cfi/cfi_disk.c
318
if (bp->bio_bcount == 0) {
sys/dev/cfi/cfi_disk.c
319
bp->bio_resid = bp->bio_bcount;
sys/dev/cfi/cfi_disk.c
320
biodone(bp);
sys/dev/cfi/cfi_disk.c
323
switch (bp->bio_cmd) {
sys/dev/cfi/cfi_disk.c
328
bioq_insert_tail(&sc->bioq, bp);
sys/dev/cfi/cfi_disk.c
333
biofinish(bp, NULL, EOPNOTSUPP);
sys/dev/cxgbe/cudbg/cudbg_entity.h
551
u32 bp; /* => undef,*/
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
620
struct bio *bp, size_t offset, size_t len, int flags)
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
638
MPASS(bp->bio_flags & BIO_UNMAPPED);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
639
if (offset < PAGE_SIZE - bp->bio_ma_offset) {
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
640
page_offset = bp->bio_ma_offset + offset;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
643
offset -= PAGE_SIZE - bp->bio_ma_offset;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
665
VM_PAGE_TO_PHYS(bp->bio_ma[i]);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
712
mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1,
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
727
pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1,
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
809
size_t pdu_off, struct bio *bp, size_t bio_off, size_t len)
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
820
MPASS(bp->bio_flags & BIO_UNMAPPED);
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
821
if (bio_off < PAGE_SIZE - bp->bio_ma_offset) {
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
822
page_offset = bp->bio_ma_offset + bio_off;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
825
bio_off -= PAGE_SIZE - bp->bio_ma_offset;
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
834
mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1,
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
839
pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1,
sys/dev/cxgbe/tom/t4_ddp.c
1445
t4_alloc_page_pods_for_bio(struct ppod_region *pr, struct bio *bp,
sys/dev/cxgbe/tom/t4_ddp.c
1449
MPASS(bp->bio_flags & BIO_UNMAPPED);
sys/dev/cxgbe/tom/t4_ddp.c
1451
return (t4_alloc_page_pods_for_vmpages(pr, bp->bio_ma, bp->bio_ma_n,
sys/dev/cxgbe/tom/t4_ddp.c
1812
struct ppod_reservation *prsv, struct bio *bp, struct mbufq *wrq)
sys/dev/cxgbe/tom/t4_ddp.c
1824
MPASS(bp->bio_flags & BIO_UNMAPPED);
sys/dev/cxgbe/tom/t4_ddp.c
1864
ppod->len_offset = htobe64(V_PPOD_LEN(bp->bio_bcount) |
sys/dev/cxgbe/tom/t4_ddp.c
1865
V_PPOD_OFST(bp->bio_ma_offset));
sys/dev/cxgbe/tom/t4_ddp.c
1869
if (idx < bp->bio_ma_n) {
sys/dev/cxgbe/tom/t4_ddp.c
1870
pa = VM_PAGE_TO_PHYS(bp->bio_ma[idx]);
sys/dev/dpaa/bman.c
106
memset(&bp, 0, sizeof(bp));
sys/dev/dpaa/bman.c
107
bp.guestId = NCSW_MASTER_ID;
sys/dev/dpaa/bman.c
108
bp.baseAddress = rman_get_bushandle(sc->sc_rres);
sys/dev/dpaa/bman.c
109
bp.totalNumOfBuffers = BMAN_MAX_BUFFERS;
sys/dev/dpaa/bman.c
110
bp.f_Exception = bman_exception;
sys/dev/dpaa/bman.c
111
bp.h_App = sc;
sys/dev/dpaa/bman.c
112
bp.errIrq = (uintptr_t)sc->sc_ires;
sys/dev/dpaa/bman.c
113
bp.partBpidBase = 0;
sys/dev/dpaa/bman.c
114
bp.partNumOfPools = BM_MAX_NUM_OF_POOLS;
sys/dev/dpaa/bman.c
116
sc->sc_bh = BM_Config(&bp);
sys/dev/dpaa/bman.c
82
t_BmParam bp;
sys/dev/fdc/fdc.c
1035
KASSERT(0 == 1, ("Wrong bio_cmd %x\n", bp->bio_cmd));
sys/dev/fdc/fdc.c
1042
if (i == 0 && (fdc->flags & FDC_NODMA) && (bp->bio_cmd == BIO_READ))
sys/dev/fdc/fdc.c
1048
bp->bio_cmd == BIO_READ ? ISADMA_READ : ISADMA_WRITE,
sys/dev/fdc/fdc.c
1112
switch(bp->bio_cmd) {
sys/dev/fdc/fdc.c
1115
idp = (struct fdc_readid *)bp->bio_data;
sys/dev/fdc/fdc.c
1126
bp->bio_pblkno += nsect;
sys/dev/fdc/fdc.c
1127
bp->bio_resid -= fd->fd_iosize;
sys/dev/fdc/fdc.c
1128
bp->bio_completed += fd->fd_iosize;
sys/dev/fdc/fdc.c
1137
if (bp->bio_resid > 0)
sys/dev/fdc/fdc.c
1161
if (fdc->bp != NULL)
sys/dev/fdc/fdc.c
1162
g_print_bio("", fdc->bp, "");
sys/dev/fdc/fdc.c
1178
fd_enqueue(struct fd_data *fd, struct bio *bp)
sys/dev/fdc/fdc.c
1189
bioq_disksort(&fdc->head, bp);
sys/dev/fdc/fdc.c
1193
bioq_insert_tail(&fd->fd_bq, bp);
sys/dev/fdc/fdc.c
1268
struct bio *bp;
sys/dev/fdc/fdc.c
1273
bp = malloc(sizeof(struct bio), M_TEMP, M_WAITOK | M_ZERO);
sys/dev/fdc/fdc.c
1280
bp->bio_cmd = cmd;
sys/dev/fdc/fdc.c
1283
bp->bio_pblkno =
sys/dev/fdc/fdc.c
1286
bp->bio_length = sizeof *finfo;
sys/dev/fdc/fdc.c
1289
bp->bio_pblkno =
sys/dev/fdc/fdc.c
1292
bp->bio_length = sizeof(struct fdc_readid);
sys/dev/fdc/fdc.c
1297
bp->bio_offset = bp->bio_pblkno * fd->sectorsize;
sys/dev/fdc/fdc.c
1298
bp->bio_data = data;
sys/dev/fdc/fdc.c
1299
bp->bio_driver1 = fd;
sys/dev/fdc/fdc.c
1300
bp->bio_flags = 0;
sys/dev/fdc/fdc.c
1302
fd_enqueue(fd, bp);
sys/dev/fdc/fdc.c
1305
tsleep(bp, PRIBIO, "fdwait", hz);
sys/dev/fdc/fdc.c
1306
} while (!(bp->bio_flags & BIO_DONE));
sys/dev/fdc/fdc.c
1307
error = bp->bio_error;
sys/dev/fdc/fdc.c
1309
free(bp, M_TEMP);
sys/dev/fdc/fdc.c
1463
fd_start(struct bio *bp)
sys/dev/fdc/fdc.c
1467
fd = bp->bio_to->geom->softc;
sys/dev/fdc/fdc.c
1468
bp->bio_driver1 = fd;
sys/dev/fdc/fdc.c
1469
if (bp->bio_cmd == BIO_GETATTR) {
sys/dev/fdc/fdc.c
1470
if (g_handleattr_int(bp, "GEOM::fwsectors", fd->ft->sectrac))
sys/dev/fdc/fdc.c
1472
if (g_handleattr_int(bp, "GEOM::fwheads", fd->ft->heads))
sys/dev/fdc/fdc.c
1474
g_io_deliver(bp, ENOIOCTL);
sys/dev/fdc/fdc.c
1477
if (!(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)) {
sys/dev/fdc/fdc.c
1478
g_io_deliver(bp, EOPNOTSUPP);
sys/dev/fdc/fdc.c
1481
bp->bio_pblkno = bp->bio_offset / fd->sectorsize;
sys/dev/fdc/fdc.c
1482
bp->bio_resid = bp->bio_length;
sys/dev/fdc/fdc.c
1483
fd_enqueue(fd, bp);
sys/dev/fdc/fdc.c
635
struct bio *bp;
sys/dev/fdc/fdc.c
644
bp = bioq_takefirst(&fd->fd_bq);
sys/dev/fdc/fdc.c
645
if (bp == NULL)
sys/dev/fdc/fdc.c
647
bioq_disksort(&fd->fdc->head, bp);
sys/dev/fdc/fdc.c
710
struct bio *bp;
sys/dev/fdc/fdc.c
713
bp = fdc->bp;
sys/dev/fdc/fdc.c
717
if (bp->bio_cmd == BIO_READ) {
sys/dev/fdc/fdc.c
732
struct bio *bp;
sys/dev/fdc/fdc.c
735
bp = fdc->bp;
sys/dev/fdc/fdc.c
740
fdc->bp = NULL;
sys/dev/fdc/fdc.c
743
if (bp->bio_to != NULL) {
sys/dev/fdc/fdc.c
746
g_io_deliver(bp, error);
sys/dev/fdc/fdc.c
749
bp->bio_error = error;
sys/dev/fdc/fdc.c
750
bp->bio_flags |= BIO_DONE;
sys/dev/fdc/fdc.c
751
wakeup(bp);
sys/dev/fdc/fdc.c
761
struct bio *bp;
sys/dev/fdc/fdc.c
773
bp = fdc->bp;
sys/dev/fdc/fdc.c
775
if (bp != NULL &&
sys/dev/fdc/fdc.c
790
bp->bio_cmd == BIO_READ ? ISADMA_READ : ISADMA_WRITE,
sys/dev/fdc/fdc.c
813
if (fdc->bp == NULL) {
sys/dev/fdc/fdc.c
816
fdc->bp = bioq_takefirst(&fdc->head);
sys/dev/fdc/fdc.c
817
if (fdc->bp == NULL)
sys/dev/fdc/fdc.c
820
} while (fdc->bp == NULL &&
sys/dev/fdc/fdc.c
824
if (fdc->bp == NULL)
sys/dev/fdc/fdc.c
831
bp = fdc->bp;
sys/dev/fdc/fdc.c
832
fd = fdc->fd = bp->bio_driver1;
sys/dev/fdc/fdc.c
834
fd->fd_ioptr = bp->bio_data;
sys/dev/fdc/fdc.c
835
if (bp->bio_cmd == BIO_FMT) {
sys/dev/fdc/fdc.c
838
fd->fd_iosize = bp->bio_length - i;
sys/dev/fdc/fdc.c
849
if (bp->bio_cmd == BIO_PROBE) {
sys/dev/fdc/fdc.c
883
if (bp->bio_cmd == BIO_FMT || bp->bio_cmd == BIO_WRITE) {
sys/dev/fdc/fdc.c
894
cylinder = bp->bio_pblkno / i;
sys/dev/fdc/fdc.c
896
sec = bp->bio_pblkno % i;
sys/dev/fdc/fdc.c
903
(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)) {
sys/dev/fdc/fdc.c
904
fd->fd_iosize = imin(nsect * fd->sectorsize, bp->bio_resid);
sys/dev/fdc/fdc.c
906
} else if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/dev/fdc/fdc.c
956
bp->bio_cmd, bp->bio_pblkno, fd->fd_iosize,
sys/dev/fdc/fdc.c
960
if ((bp->bio_cmd == BIO_READ ||
sys/dev/fdc/fdc.c
961
bp->bio_cmd == BIO_WRITE ||
sys/dev/fdc/fdc.c
962
bp->bio_cmd == BIO_FMT)
sys/dev/fdc/fdc.c
965
bp->bio_cmd == BIO_READ ? ISADMA_READ : ISADMA_WRITE,
sys/dev/fdc/fdc.c
974
if (bp->bio_cmd == BIO_READ ||
sys/dev/fdc/fdc.c
975
bp->bio_cmd == BIO_WRITE ||
sys/dev/fdc/fdc.c
976
bp->bio_cmd == BIO_FMT)
sys/dev/fdc/fdc.c
978
if (bp->bio_cmd == BIO_WRITE ||
sys/dev/fdc/fdc.c
979
bp->bio_cmd == BIO_FMT)
sys/dev/fdc/fdc.c
983
switch(bp->bio_cmd) {
sys/dev/fdc/fdc.c
986
finfo = (struct fd_formb *)bp->bio_data;
sys/dev/fdc/fdcvar.h
56
struct bio *bp; /* active buffer */
sys/dev/firewire/fwcrom.c
188
uint32_t *bp;
sys/dev/firewire/fwcrom.c
210
bp = (uint32_t *)&buf[0];
sys/dev/firewire/fwcrom.c
215
*bp++ = ntohl(textleaf->text[i]);
sys/dev/firewire/fwdev.c
859
fw_strategy(struct bio *bp)
sys/dev/firewire/fwdev.c
863
dev = bp->bio_dev;
sys/dev/firewire/fwdev.c
865
fwmem_strategy(bp);
sys/dev/firewire/fwdev.c
869
bp->bio_error = EOPNOTSUPP;
sys/dev/firewire/fwdev.c
870
bp->bio_flags |= BIO_ERROR;
sys/dev/firewire/fwdev.c
871
bp->bio_resid = bp->bio_bcount;
sys/dev/firewire/fwdev.c
872
biodone(bp);
sys/dev/firewire/fwmem.c
328
struct bio *bp;
sys/dev/firewire/fwmem.c
330
bp = (struct bio *)xfer->sc;
sys/dev/firewire/fwmem.c
331
bp->bio_error = xfer->resp;
sys/dev/firewire/fwmem.c
333
if (bp->bio_error != 0) {
sys/dev/firewire/fwmem.c
335
printf("%s: err=%d\n", __func__, bp->bio_error);
sys/dev/firewire/fwmem.c
336
bp->bio_flags |= BIO_ERROR;
sys/dev/firewire/fwmem.c
337
bp->bio_resid = bp->bio_bcount;
sys/dev/firewire/fwmem.c
341
biodone(bp);
sys/dev/firewire/fwmem.c
345
fwmem_strategy(struct bio *bp)
sys/dev/firewire/fwmem.c
353
dev = bp->bio_dev;
sys/dev/firewire/fwmem.c
366
iolen = MIN(bp->bio_bcount, MAXLEN);
sys/dev/firewire/fwmem.c
367
if (bp->bio_cmd == BIO_READ) {
sys/dev/firewire/fwmem.c
368
if (iolen == 4 && (bp->bio_offset & 3) == 0)
sys/dev/firewire/fwmem.c
370
(void *)bp, fwmem_speed,
sys/dev/firewire/fwmem.c
371
bp->bio_offset >> 32, bp->bio_offset & 0xffffffff,
sys/dev/firewire/fwmem.c
372
bp->bio_data, fwmem_biodone);
sys/dev/firewire/fwmem.c
375
(void *)bp, fwmem_speed,
sys/dev/firewire/fwmem.c
376
bp->bio_offset >> 32, bp->bio_offset & 0xffffffff,
sys/dev/firewire/fwmem.c
377
iolen, bp->bio_data, fwmem_biodone);
sys/dev/firewire/fwmem.c
379
if (iolen == 4 && (bp->bio_offset & 3) == 0)
sys/dev/firewire/fwmem.c
381
(void *)bp, fwmem_speed,
sys/dev/firewire/fwmem.c
382
bp->bio_offset >> 32, bp->bio_offset & 0xffffffff,
sys/dev/firewire/fwmem.c
383
bp->bio_data, fwmem_biodone);
sys/dev/firewire/fwmem.c
386
(void *)bp, fwmem_speed,
sys/dev/firewire/fwmem.c
387
bp->bio_offset >> 32, bp->bio_offset & 0xffffffff,
sys/dev/firewire/fwmem.c
388
iolen, bp->bio_data, fwmem_biodone);
sys/dev/firewire/fwmem.c
395
bp->bio_resid = bp->bio_bcount - iolen;
sys/dev/firewire/fwmem.c
400
bp->bio_error = err;
sys/dev/firewire/fwmem.c
401
bp->bio_flags |= BIO_ERROR;
sys/dev/firewire/fwmem.c
402
bp->bio_resid = bp->bio_bcount;
sys/dev/firewire/fwmem.c
403
biodone(bp);
sys/dev/flash/at45d.c
118
static int at45d_getattr(struct bio *bp);
sys/dev/flash/at45d.c
119
static void at45d_strategy(struct bio *bp);
sys/dev/flash/at45d.c
404
at45d_getattr(struct bio *bp)
sys/dev/flash/at45d.c
412
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL)
sys/dev/flash/at45d.c
414
if (strcmp(bp->bio_attribute, "SPI::device") != 0)
sys/dev/flash/at45d.c
416
sc = bp->bio_disk->d_drv1;
sys/dev/flash/at45d.c
417
if (bp->bio_length != sizeof(sc->dev))
sys/dev/flash/at45d.c
419
bcopy(&sc->dev, bp->bio_data, sizeof(sc->dev));
sys/dev/flash/at45d.c
424
at45d_strategy(struct bio *bp)
sys/dev/flash/at45d.c
428
sc = (struct at45d_softc *)bp->bio_disk->d_drv1;
sys/dev/flash/at45d.c
430
bioq_disksort(&sc->bio_queue, bp);
sys/dev/flash/at45d.c
440
struct bio *bp;
sys/dev/flash/at45d.c
466
bp = bioq_takefirst(&sc->bio_queue);
sys/dev/flash/at45d.c
467
if (bp == NULL)
sys/dev/flash/at45d.c
469
} while (bp == NULL);
sys/dev/flash/at45d.c
473
buf = bp->bio_data;
sys/dev/flash/at45d.c
474
len = resid = bp->bio_bcount;
sys/dev/flash/at45d.c
475
page = bp->bio_offset / sc->pagesize;
sys/dev/flash/at45d.c
476
offset = bp->bio_offset % sc->pagesize;
sys/dev/flash/at45d.c
478
switch (bp->bio_cmd) {
sys/dev/flash/at45d.c
506
if (bp->bio_cmd == BIO_WRITE) {
sys/dev/flash/at45d.c
537
if (err == 0 && bp->bio_cmd != BIO_READ)
sys/dev/flash/at45d.c
543
if (bp->bio_cmd == BIO_WRITE) {
sys/dev/flash/at45d.c
569
if (bp->bio_cmd == BIO_READ)
sys/dev/flash/at45d.c
576
bp->bio_flags |= BIO_ERROR;
sys/dev/flash/at45d.c
577
bp->bio_error = berr;
sys/dev/flash/at45d.c
579
bp->bio_resid = resid;
sys/dev/flash/at45d.c
580
biodone(bp);
sys/dev/flash/cqspi.c
167
struct bio *bp;
sys/dev/flash/cqspi.c
178
ret = xdma_dequeue_bio(sc->xchan_tx, &bp, &st);
sys/dev/flash/cqspi.c
200
struct bio *bp;
sys/dev/flash/cqspi.c
211
ret = xdma_dequeue_bio(sc->xchan_rx, &bp, &st);
sys/dev/flash/cqspi.c
409
cqspi_write(device_t dev, device_t child, struct bio *bp,
sys/dev/flash/cqspi.c
449
xdma_enqueue_bio(sc->xchan_tx, &bp,
sys/dev/flash/cqspi.c
466
cqspi_read(device_t dev, device_t child, struct bio *bp,
sys/dev/flash/cqspi.c
501
xdma_enqueue_bio(sc->xchan_rx, &bp, sc->sram_phys, 4, 4,
sys/dev/flash/flexspi/flex_spi.c
128
static void flex_spi_strategy(struct bio *bp);
sys/dev/flash/flexspi/flex_spi.c
129
static int flex_spi_getattr(struct bio *bp);
sys/dev/flash/flexspi/flex_spi.c
890
flex_spi_strategy(struct bio *bp)
sys/dev/flash/flexspi/flex_spi.c
894
sc = (struct flex_spi_softc *)bp->bio_disk->d_drv1;
sys/dev/flash/flexspi/flex_spi.c
896
bioq_disksort(&sc->bio_queue, bp);
sys/dev/flash/flexspi/flex_spi.c
902
flex_spi_getattr(struct bio *bp)
sys/dev/flash/flexspi/flex_spi.c
907
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL) {
sys/dev/flash/flexspi/flex_spi.c
911
sc = bp->bio_disk->d_drv1;
sys/dev/flash/flexspi/flex_spi.c
914
if (strcmp(bp->bio_attribute, "SPI::device") != 0) {
sys/dev/flash/flexspi/flex_spi.c
918
if (bp->bio_length != sizeof(dev)) {
sys/dev/flash/flexspi/flex_spi.c
922
bcopy(&dev, bp->bio_data, sizeof(dev));
sys/dev/flash/flexspi/flex_spi.c
931
struct bio *bp;
sys/dev/flash/flexspi/flex_spi.c
943
bp = bioq_first(&sc->bio_queue);
sys/dev/flash/flexspi/flex_spi.c
944
if (bp == NULL)
sys/dev/flash/flexspi/flex_spi.c
947
} while (bp == NULL);
sys/dev/flash/flexspi/flex_spi.c
948
bioq_remove(&sc->bio_queue, bp);
sys/dev/flash/flexspi/flex_spi.c
951
switch (bp->bio_cmd) {
sys/dev/flash/flexspi/flex_spi.c
953
bp->bio_error = flex_spi_read(sc, bp->bio_offset,
sys/dev/flash/flexspi/flex_spi.c
954
bp->bio_data, bp->bio_bcount);
sys/dev/flash/flexspi/flex_spi.c
957
bp->bio_error = flex_spi_write(sc, bp->bio_offset,
sys/dev/flash/flexspi/flex_spi.c
958
bp->bio_data, bp->bio_bcount);
sys/dev/flash/flexspi/flex_spi.c
961
bp->bio_error = EINVAL;
sys/dev/flash/flexspi/flex_spi.c
963
biodone(bp);
sys/dev/flash/mx25l.c
113
static void mx25l_strategy(struct bio *bp);
sys/dev/flash/mx25l.c
114
static int mx25l_getattr(struct bio *bp);
sys/dev/flash/mx25l.c
598
mx25l_strategy(struct bio *bp)
sys/dev/flash/mx25l.c
602
sc = (struct mx25l_softc *)bp->bio_disk->d_drv1;
sys/dev/flash/mx25l.c
604
bioq_disksort(&sc->sc_bio_queue, bp);
sys/dev/flash/mx25l.c
610
mx25l_getattr(struct bio *bp)
sys/dev/flash/mx25l.c
615
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL)
sys/dev/flash/mx25l.c
618
sc = bp->bio_disk->d_drv1;
sys/dev/flash/mx25l.c
621
if (strcmp(bp->bio_attribute, "SPI::device") == 0) {
sys/dev/flash/mx25l.c
622
if (bp->bio_length != sizeof(dev))
sys/dev/flash/mx25l.c
624
bcopy(&dev, bp->bio_data, sizeof(dev));
sys/dev/flash/mx25l.c
634
struct bio *bp;
sys/dev/flash/mx25l.c
645
bp = bioq_first(&sc->sc_bio_queue);
sys/dev/flash/mx25l.c
646
if (bp == NULL)
sys/dev/flash/mx25l.c
648
} while (bp == NULL);
sys/dev/flash/mx25l.c
649
bioq_remove(&sc->sc_bio_queue, bp);
sys/dev/flash/mx25l.c
652
switch (bp->bio_cmd) {
sys/dev/flash/mx25l.c
654
bp->bio_error = mx25l_read(sc, bp->bio_offset,
sys/dev/flash/mx25l.c
655
bp->bio_data, bp->bio_bcount);
sys/dev/flash/mx25l.c
658
bp->bio_error = mx25l_write(sc, bp->bio_offset,
sys/dev/flash/mx25l.c
659
bp->bio_data, bp->bio_bcount);
sys/dev/flash/mx25l.c
662
bp->bio_error = EOPNOTSUPP;
sys/dev/flash/mx25l.c
666
biodone(bp);
sys/dev/flash/n25q.c
135
static void n25q_strategy(struct bio *bp);
sys/dev/flash/n25q.c
136
static int n25q_getattr(struct bio *bp);
sys/dev/flash/n25q.c
188
n25q_write(device_t dev, struct bio *bp, off_t offset, caddr_t data, off_t count)
sys/dev/flash/n25q.c
202
err = QSPI_WRITE(pdev, dev, bp, offset, data, count);
sys/dev/flash/n25q.c
208
n25q_read(device_t dev, struct bio *bp, off_t offset, caddr_t data, off_t count)
sys/dev/flash/n25q.c
230
err = QSPI_READ(pdev, dev, bp, offset, data, count);
sys/dev/flash/n25q.c
386
n25q_strategy(struct bio *bp)
sys/dev/flash/n25q.c
390
sc = (struct n25q_softc *)bp->bio_disk->d_drv1;
sys/dev/flash/n25q.c
393
bioq_disksort(&sc->sc_bio_queue, bp);
sys/dev/flash/n25q.c
399
n25q_getattr(struct bio *bp)
sys/dev/flash/n25q.c
404
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL) {
sys/dev/flash/n25q.c
408
sc = bp->bio_disk->d_drv1;
sys/dev/flash/n25q.c
411
if (strcmp(bp->bio_attribute, "SPI::device") == 0) {
sys/dev/flash/n25q.c
412
if (bp->bio_length != sizeof(dev)) {
sys/dev/flash/n25q.c
415
bcopy(&dev, bp->bio_data, sizeof(dev));
sys/dev/flash/n25q.c
426
struct bio *bp;
sys/dev/flash/n25q.c
442
bp = bioq_first(&sc->sc_bio_queue);
sys/dev/flash/n25q.c
443
if (bp == NULL)
sys/dev/flash/n25q.c
445
} while (bp == NULL);
sys/dev/flash/n25q.c
446
bioq_remove(&sc->sc_bio_queue, bp);
sys/dev/flash/n25q.c
449
switch (bp->bio_cmd) {
sys/dev/flash/n25q.c
451
bp->bio_error = n25q_read(dev, bp, bp->bio_offset,
sys/dev/flash/n25q.c
452
bp->bio_data, bp->bio_bcount);
sys/dev/flash/n25q.c
455
bp->bio_error = n25q_write(dev, bp, bp->bio_offset,
sys/dev/flash/n25q.c
456
bp->bio_data, bp->bio_bcount);
sys/dev/flash/n25q.c
459
bp->bio_error = EOPNOTSUPP;
sys/dev/flash/n25q.c
462
biodone(bp);
sys/dev/flash/w25n.c
101
static void w25n_strategy(struct bio *bp);
sys/dev/flash/w25n.c
102
static int w25n_getattr(struct bio *bp);
sys/dev/flash/w25n.c
511
w25n_strategy(struct bio *bp)
sys/dev/flash/w25n.c
515
sc = (struct w25n_softc *)bp->bio_disk->d_drv1;
sys/dev/flash/w25n.c
517
bioq_disksort(&sc->sc_bio_queue, bp);
sys/dev/flash/w25n.c
523
w25n_getattr(struct bio *bp)
sys/dev/flash/w25n.c
528
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL)
sys/dev/flash/w25n.c
531
sc = bp->bio_disk->d_drv1;
sys/dev/flash/w25n.c
534
if (strcmp(bp->bio_attribute, "SPI::device") == 0) {
sys/dev/flash/w25n.c
535
if (bp->bio_length != sizeof(dev))
sys/dev/flash/w25n.c
537
bcopy(&dev, bp->bio_data, sizeof(dev));
sys/dev/flash/w25n.c
547
struct bio *bp;
sys/dev/flash/w25n.c
558
bp = bioq_first(&sc->sc_bio_queue);
sys/dev/flash/w25n.c
559
if (bp == NULL)
sys/dev/flash/w25n.c
561
} while (bp == NULL);
sys/dev/flash/w25n.c
562
bioq_remove(&sc->sc_bio_queue, bp);
sys/dev/flash/w25n.c
565
switch (bp->bio_cmd) {
sys/dev/flash/w25n.c
567
bp->bio_error = w25n_read(sc, bp->bio_offset,
sys/dev/flash/w25n.c
568
bp->bio_data, bp->bio_bcount);
sys/dev/flash/w25n.c
571
bp->bio_error = w25n_write(sc, bp->bio_offset,
sys/dev/flash/w25n.c
572
bp->bio_data, bp->bio_bcount);
sys/dev/flash/w25n.c
575
bp->bio_error = EOPNOTSUPP;
sys/dev/flash/w25n.c
579
biodone(bp);
sys/dev/ida/ida.c
481
ida_submit_buf(struct ida_softc *ida, struct bio *bp)
sys/dev/ida/ida.c
484
bioq_insert_tail(&ida->bio_queue, bp);
sys/dev/ida/ida.c
495
struct bio *bp;
sys/dev/ida/ida.c
502
bp = bioq_first(&ida->bio_queue);
sys/dev/ida/ida.c
503
if (bp == NULL)
sys/dev/ida/ida.c
510
bioq_remove(&ida->bio_queue, bp);
sys/dev/ida/ida.c
511
qcb->buf = bp;
sys/dev/ida/ida.c
512
qcb->flags = bp->bio_cmd == BIO_READ ? DMA_DATA_IN : DMA_DATA_OUT;
sys/dev/ida/ida.c
515
drv = bp->bio_driver1;
sys/dev/ida/ida.c
517
hwqcb->req.blkno = bp->bio_pblkno;
sys/dev/ida/ida.c
518
hwqcb->req.bcount = howmany(bp->bio_bcount, DEV_BSIZE);
sys/dev/ida/ida.c
519
hwqcb->req.command = bp->bio_cmd == BIO_READ ? CMD_READ : CMD_WRITE;
sys/dev/ida/ida.c
521
error = ida_map_qcb(ida, qcb, bp->bio_data, bp->bio_bcount);
sys/dev/ida/ida_disk.c
100
if (drv->flags & DRV_WRITEPROT && (bp->bio_cmd == BIO_WRITE)) {
sys/dev/ida/ida_disk.c
101
bp->bio_error = EROFS;
sys/dev/ida/ida_disk.c
105
if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE)) {
sys/dev/ida/ida_disk.c
106
bp->bio_error = EOPNOTSUPP;
sys/dev/ida/ida_disk.c
110
bp->bio_driver1 = drv;
sys/dev/ida/ida_disk.c
111
ida_submit_buf(drv->controller, bp);
sys/dev/ida/ida_disk.c
115
bp->bio_flags |= BIO_ERROR;
sys/dev/ida/ida_disk.c
120
bp->bio_resid = bp->bio_bcount;
sys/dev/ida/ida_disk.c
121
biodone(bp);
sys/dev/ida/ida_disk.c
149
idad_intr(struct bio *bp)
sys/dev/ida/ida_disk.c
152
if (bp->bio_flags & BIO_ERROR)
sys/dev/ida/ida_disk.c
153
bp->bio_error = EIO;
sys/dev/ida/ida_disk.c
155
bp->bio_resid = 0;
sys/dev/ida/ida_disk.c
157
biodone(bp);
sys/dev/ida/ida_disk.c
87
idad_strategy(struct bio *bp)
sys/dev/ida/ida_disk.c
91
drv = bp->bio_disk->d_drv1;
sys/dev/ida/ida_disk.c
93
bp->bio_error = EINVAL;
sys/dev/ida/idavar.h
203
extern void ida_submit_buf(struct ida_softc *ida, struct bio *bp);
sys/dev/ida/idavar.h
206
extern void idad_intr(struct bio *bp);
sys/dev/irdma/irdma_hmc.c
205
sd_entry->u.bp.addr.pa;
sys/dev/irdma/irdma_hmc.c
396
&sd_entry->u.bp.addr;
sys/dev/irdma/irdma_hmc.c
559
irdma_memcpy(&sd_entry->u.bp.addr, &dma_mem,
sys/dev/irdma/irdma_hmc.c
560
sizeof(sd_entry->u.bp.addr));
sys/dev/irdma/irdma_hmc.c
562
sd_entry->u.bp.sd_pd_index = sd_index;
sys/dev/irdma/irdma_hmc.c
569
sd_entry->u.bp.use_cnt++;
sys/dev/irdma/irdma_hmc.c
630
irdma_memcpy(&pd_entry->bp.addr, page, sizeof(pd_entry->bp.addr));
sys/dev/irdma/irdma_hmc.c
631
pd_entry->bp.sd_pd_index = pd_index;
sys/dev/irdma/irdma_hmc.c
632
pd_entry->bp.entry_type = IRDMA_SD_TYPE_PAGED;
sys/dev/irdma/irdma_hmc.c
642
pd_entry->bp.use_cnt++;
sys/dev/irdma/irdma_hmc.c
684
if (--pd_entry->bp.use_cnt)
sys/dev/irdma/irdma_hmc.c
695
mem = &pd_entry->bp.addr;
sys/dev/irdma/irdma_hmc.c
718
if (--sd_entry->u.bp.use_cnt)
sys/dev/irdma/irdma_hmc.h
117
struct irdma_hmc_bp bp;
sys/dev/irdma/irdma_hmc.h
98
struct irdma_hmc_bp bp;
sys/dev/irdma/irdma_pble.c
146
chunk->vaddr = (u8 *)sd_entry->u.bp.addr.va + offset;
sys/dev/irdma/irdma_pble.c
322
sd_entry->u.bp.addr.pa;
sys/dev/iscsi/icl_soft.c
1111
struct bio *bp, size_t offset, size_t len, int flags)
sys/dev/iscsi/icl_soft.c
1126
MPASS(bp->bio_flags & BIO_UNMAPPED);
sys/dev/iscsi/icl_soft.c
1127
if (offset < PAGE_SIZE - bp->bio_ma_offset) {
sys/dev/iscsi/icl_soft.c
1128
page_offset = bp->bio_ma_offset + offset;
sys/dev/iscsi/icl_soft.c
1131
offset -= PAGE_SIZE - bp->bio_ma_offset;
sys/dev/iscsi/icl_soft.c
1153
VM_PAGE_TO_PHYS(bp->bio_ma[i]);
sys/dev/iscsi/icl_soft.c
1199
vaddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(bp->bio_ma[i]));
sys/dev/iscsi/icl_soft.c
1270
size_t pdu_off, struct bio *bp, size_t bio_off, size_t len)
sys/dev/iscsi/icl_soft.c
1276
MPASS(bp->bio_flags & BIO_UNMAPPED);
sys/dev/iscsi/icl_soft.c
1277
if (bio_off < PAGE_SIZE - bp->bio_ma_offset) {
sys/dev/iscsi/icl_soft.c
1278
page_offset = bp->bio_ma_offset + bio_off;
sys/dev/iscsi/icl_soft.c
1281
bio_off -= PAGE_SIZE - bp->bio_ma_offset;
sys/dev/iscsi/icl_soft.c
1290
vaddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(bp->bio_ma[i]));
sys/dev/iscsi/icl_wrappers.h
60
icl_pdu_append_bio(struct icl_pdu *ip, struct bio *bp, size_t offset,
sys/dev/iscsi/icl_wrappers.h
64
return (ICL_CONN_PDU_APPEND_BIO(ip->ip_conn, ip, bp, offset, len,
sys/dev/iscsi/icl_wrappers.h
76
icl_pdu_get_bio(struct icl_pdu *ip, size_t pdu_off, struct bio *bp,
sys/dev/iscsi/icl_wrappers.h
80
ICL_CONN_PDU_GET_BIO(ip->ip_conn, ip, pdu_off, bp, bio_off, len);
sys/dev/iser/icl_iser.c
116
struct bio *bp, size_t offset, size_t len, int flags)
sys/dev/iser/icl_iser.c
146
size_t pdu_off, struct bio *bp, size_t bio_off,
sys/dev/iser/iser_initiator.c
301
iser_bio_to_sg(struct bio *bp, struct iser_data_buf *data_buf)
sys/dev/iser/iser_initiator.c
308
tlen = bp->bio_bcount;
sys/dev/iser/iser_initiator.c
309
offset = bp->bio_ma_offset;
sys/dev/iser/iser_initiator.c
314
sg_set_page(sg, bp->bio_ma[i], len, offset);
sys/dev/ixl/i40e_hmc.c
103
i40e_memcpy(&sd_entry->u.bp.addr,
sys/dev/ixl/i40e_hmc.c
106
sd_entry->u.bp.sd_pd_index = sd_index;
sys/dev/ixl/i40e_hmc.c
116
I40E_INC_BP_REFCNT(&sd_entry->u.bp);
sys/dev/ixl/i40e_hmc.c
185
i40e_memcpy(&pd_entry->bp.addr, page,
sys/dev/ixl/i40e_hmc.c
187
pd_entry->bp.sd_pd_index = pd_index;
sys/dev/ixl/i40e_hmc.c
188
pd_entry->bp.entry_type = I40E_SD_TYPE_PAGED;
sys/dev/ixl/i40e_hmc.c
203
I40E_INC_BP_REFCNT(&pd_entry->bp);
sys/dev/ixl/i40e_hmc.c
251
I40E_DEC_BP_REFCNT(&pd_entry->bp);
sys/dev/ixl/i40e_hmc.c
252
if (pd_entry->bp.ref_cnt)
sys/dev/ixl/i40e_hmc.c
265
ret_code = i40e_free_dma_mem(hw, &(pd_entry->bp.addr));
sys/dev/ixl/i40e_hmc.c
287
I40E_DEC_BP_REFCNT(&sd_entry->u.bp);
sys/dev/ixl/i40e_hmc.c
288
if (sd_entry->u.bp.ref_cnt) {
sys/dev/ixl/i40e_hmc.c
320
return i40e_free_dma_mem(hw, &(sd_entry->u.bp.addr));
sys/dev/ixl/i40e_hmc.h
116
#define I40E_INC_BP_REFCNT(bp) ((bp)->ref_cnt++)
sys/dev/ixl/i40e_hmc.h
120
#define I40E_DEC_BP_REFCNT(bp) ((bp)->ref_cnt--)
sys/dev/ixl/i40e_hmc.h
70
struct i40e_hmc_bp bp;
sys/dev/ixl/i40e_hmc.h
91
struct i40e_hmc_bp bp;
sys/dev/ixl/i40e_lan_hmc.c
1283
*object_base = (u8 *)pd_entry->bp.addr.va + obj_offset_in_pd;
sys/dev/ixl/i40e_lan_hmc.c
1287
*object_base = (u8 *)sd_entry->u.bp.addr.va + obj_offset_in_sd;
sys/dev/ixl/i40e_lan_hmc.c
426
I40E_SET_PF_SD_ENTRY(hw, sd_entry->u.bp.addr.pa,
sys/dev/md/md.c
1000
if (bp->bio_cmd == BIO_READ) {
sys/dev/md/md.c
1024
bp->bio_resid -= iolen;
sys/dev/md/md.c
1030
bp->bio_resid = auio.uio_resid;
sys/dev/md/md.c
1038
mdstart_swap(struct md_s *sc, struct bio *bp)
sys/dev/md/md.c
1046
switch (bp->bio_cmd) {
sys/dev/md/md.c
1057
p = bp->bio_data;
sys/dev/md/md.c
1058
ma_offs = (bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0 ?
sys/dev/md/md.c
1059
bp->bio_ma_offset : 0;
sys/dev/md/md.c
1060
vlist = (bp->bio_flags & BIO_VLIST) != 0 ?
sys/dev/md/md.c
1061
(bus_dma_segment_t *)bp->bio_data : NULL;
sys/dev/md/md.c
1070
offs = bp->bio_offset % PAGE_SIZE;
sys/dev/md/md.c
1071
lastp = (bp->bio_offset + bp->bio_length - 1) / PAGE_SIZE;
sys/dev/md/md.c
1072
lastend = (bp->bio_offset + bp->bio_length - 1) % PAGE_SIZE + 1;
sys/dev/md/md.c
1076
for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) {
sys/dev/md/md.c
1080
if (bp->bio_cmd == BIO_READ) {
sys/dev/md/md.c
1101
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/dev/md/md.c
1102
pmap_copy_pages(&m, offs, bp->bio_ma,
sys/dev/md/md.c
1104
} else if ((bp->bio_flags & BIO_VLIST) != 0) {
sys/dev/md/md.c
1112
} else if (bp->bio_cmd == BIO_WRITE) {
sys/dev/md/md.c
1126
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/dev/md/md.c
1127
pmap_copy_pages(bp->bio_ma, ma_offs, &m,
sys/dev/md/md.c
1129
} else if ((bp->bio_flags & BIO_VLIST) != 0) {
sys/dev/md/md.c
1138
} else if (bp->bio_cmd == BIO_DELETE) {
sys/dev/md/md.c
1188
mdstart_null(struct md_s *sc, struct bio *bp)
sys/dev/md/md.c
1191
switch (bp->bio_cmd) {
sys/dev/md/md.c
1193
bzero(bp->bio_data, bp->bio_length);
sys/dev/md/md.c
1194
cpu_flush_dcache(bp->bio_data, bp->bio_length);
sys/dev/md/md.c
1199
bp->bio_resid = 0;
sys/dev/md/md.c
1204
md_handleattr(struct md_s *sc, struct bio *bp)
sys/dev/md/md.c
1207
(g_handleattr_int(bp, "GEOM::fwsectors", sc->fwsectors) != 0 ||
sys/dev/md/md.c
1208
g_handleattr_int(bp, "GEOM::fwheads", sc->fwheads) != 0))
sys/dev/md/md.c
1210
if (g_handleattr_int(bp, "GEOM::candelete", sc->candelete) != 0)
sys/dev/md/md.c
1213
g_handleattr_str(bp, "GEOM::ident", sc->ident) != 0)
sys/dev/md/md.c
1215
if (g_handleattr_int(bp, "MNT::verified", (sc->flags & MD_VERIFY) != 0))
sys/dev/md/md.c
1217
g_io_deliver(bp, EOPNOTSUPP);
sys/dev/md/md.c
1224
struct bio *bp;
sys/dev/md/md.c
1241
bp = bioq_takefirst(&sc->bio_queue);
sys/dev/md/md.c
1242
if (!bp) {
sys/dev/md/md.c
1247
if (bp->bio_cmd == BIO_GETATTR) {
sys/dev/md/md.c
1248
md_handleattr(sc, bp);
sys/dev/md/md.c
1250
error = sc->start(sc, bp);
sys/dev/md/md.c
1251
if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/dev/md/md.c
1260
bp->bio_bcount = bp->bio_length;
sys/dev/md/md.c
1261
devstat_end_transaction_bio(sc->devstat, bp);
sys/dev/md/md.c
1263
bp->bio_completed = bp->bio_length - bp->bio_resid;
sys/dev/md/md.c
1264
g_io_deliver(bp, error);
sys/dev/md/md.c
265
int (*start)(struct md_s *sc, struct bio *bp);
sys/dev/md/md.c
491
g_md_start(struct bio *bp)
sys/dev/md/md.c
495
sc = bp->bio_to->geom->softc;
sys/dev/md/md.c
496
if ((bp->bio_cmd == BIO_READ) || (bp->bio_cmd == BIO_WRITE)) {
sys/dev/md/md.c
497
devstat_start_transaction_bio(sc->devstat, bp);
sys/dev/md/md.c
500
bioq_disksort(&sc->bio_queue, bp);
sys/dev/md/md.c
654
mdstart_malloc(struct md_s *sc, struct bio *bp)
sys/dev/md/md.c
663
switch (bp->bio_cmd) {
sys/dev/md/md.c
674
notmapped = (bp->bio_flags & BIO_UNMAPPED) != 0;
sys/dev/md/md.c
675
vlist = (bp->bio_flags & BIO_VLIST) != 0 ?
sys/dev/md/md.c
676
(bus_dma_segment_t *)bp->bio_data : NULL;
sys/dev/md/md.c
678
m = bp->bio_ma;
sys/dev/md/md.c
679
ma_offs = bp->bio_ma_offset;
sys/dev/md/md.c
683
ma_offs = bp->bio_ma_offset;
sys/dev/md/md.c
686
dst = bp->bio_data;
sys/dev/md/md.c
689
nsec = bp->bio_length / sc->sectorsize;
sys/dev/md/md.c
690
secno = bp->bio_offset / sc->sectorsize;
sys/dev/md/md.c
694
if (bp->bio_cmd == BIO_DELETE) {
sys/dev/md/md.c
697
} else if (bp->bio_cmd == BIO_READ) {
sys/dev/md/md.c
736
} else if (bp->bio_cmd == BIO_WRITE) {
sys/dev/md/md.c
818
bp->bio_resid = 0;
sys/dev/md/md.c
865
mdstart_preload(struct md_s *sc, struct bio *bp)
sys/dev/md/md.c
869
p = sc->s_preload.pl_ptr + bp->bio_offset;
sys/dev/md/md.c
870
switch (bp->bio_cmd) {
sys/dev/md/md.c
872
if ((bp->bio_flags & BIO_VLIST) != 0) {
sys/dev/md/md.c
873
mdcopyto_vlist(p, (bus_dma_segment_t *)bp->bio_data,
sys/dev/md/md.c
874
bp->bio_ma_offset, bp->bio_length);
sys/dev/md/md.c
876
bcopy(p, bp->bio_data, bp->bio_length);
sys/dev/md/md.c
878
cpu_flush_dcache(bp->bio_data, bp->bio_length);
sys/dev/md/md.c
881
if ((bp->bio_flags & BIO_VLIST) != 0) {
sys/dev/md/md.c
882
mdcopyfrom_vlist((bus_dma_segment_t *)bp->bio_data,
sys/dev/md/md.c
883
bp->bio_ma_offset, p, bp->bio_length);
sys/dev/md/md.c
885
bcopy(bp->bio_data, p, bp->bio_length);
sys/dev/md/md.c
889
bp->bio_resid = 0;
sys/dev/md/md.c
894
mdstart_vnode(struct md_s *sc, struct bio *bp)
sys/dev/md/md.c
911
ma_offs = bp->bio_ma_offset;
sys/dev/md/md.c
912
off = bp->bio_offset;
sys/dev/md/md.c
913
len = bp->bio_length;
sys/dev/md/md.c
924
switch (bp->bio_cmd) {
sys/dev/md/md.c
945
bp->bio_resid = len;
sys/dev/md/md.c
953
auio.uio_offset = (vm_ooffset_t)bp->bio_offset;
sys/dev/md/md.c
954
auio.uio_resid = bp->bio_length;
sys/dev/md/md.c
958
if ((bp->bio_flags & BIO_VLIST) != 0) {
sys/dev/md/md.c
959
piov = malloc(sizeof(*piov) * bp->bio_ma_n, M_MD, M_WAITOK);
sys/dev/md/md.c
961
vlist = (bus_dma_segment_t *)bp->bio_data;
sys/dev/md/md.c
975
} else if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/dev/md/md.c
976
bp->bio_resid = len;
sys/dev/md/md.c
984
pmap_qenter(sc->s_vnode.kva, &bp->bio_ma[atop(ma_offs)],
sys/dev/md/md.c
994
aiov.iov_base = bp->bio_data;
sys/dev/md/md.c
995
aiov.iov_len = bp->bio_length;
sys/dev/mfi/mfivar.h
548
mfi_enqueue_bio(struct mfi_softc *sc, struct bio *bp)
sys/dev/mfi/mfivar.h
550
bioq_insert_tail(&sc->mfi_bioq, bp);
sys/dev/mfi/mfivar.h
557
struct bio *bp;
sys/dev/mfi/mfivar.h
559
if ((bp = bioq_first(&sc->mfi_bioq)) != NULL) {
sys/dev/mfi/mfivar.h
560
bioq_remove(&sc->mfi_bioq, bp);
sys/dev/mfi/mfivar.h
563
return (bp);
sys/dev/mlx/mlx.c
1840
struct bio *bp;
sys/dev/mlx/mlx.c
1849
bp = mc->mc_private;
sys/dev/mlx/mlx.c
1851
if (bp->bio_cmd == BIO_READ) {
sys/dev/mlx/mlx.c
1860
mlxd = bp->bio_disk->d_drv1;
sys/dev/mlx/mlx.c
1862
blkcount = howmany(bp->bio_bcount, MLX_BLKSIZE);
sys/dev/mlx/mlx.c
1864
if ((bp->bio_pblkno + blkcount) > sc->mlx_sysdrive[driveno].ms_size)
sys/dev/mlx/mlx.c
1867
(long long)bp->bio_pblkno, blkcount,
sys/dev/mlx/mlx.c
1878
bp->bio_pblkno, /* physical block number */
sys/dev/mlx/mlx.c
1887
bp->bio_pblkno, /* physical block number */
sys/dev/mlx/mlx.c
1910
struct bio *bp;
sys/dev/mlx/mlx.c
1921
if ((bp = bioq_first(&sc->mlx_bioq)) == NULL)
sys/dev/mlx/mlx.c
1932
bioq_remove(&sc->mlx_bioq, bp);
sys/dev/mlx/mlx.c
1937
mc->mc_private = bp;
sys/dev/mlx/mlx.c
1938
mc->mc_data = bp->bio_data;
sys/dev/mlx/mlx.c
1939
mc->mc_length = bp->bio_bcount;
sys/dev/mlx/mlx.c
1958
struct bio *bp = mc->mc_private;
sys/dev/mlx/mlx.c
1959
struct mlxd_softc *mlxd = bp->bio_disk->d_drv1;
sys/dev/mlx/mlx.c
1963
bp->bio_error = EIO;
sys/dev/mlx/mlx.c
1964
bp->bio_flags |= BIO_ERROR;
sys/dev/mlx/mlx.c
1977
bp->bio_bcount, bp->bio_bcount / MLX_BLKSIZE, bp->bio_pblkno);
sys/dev/mlx/mlx.c
1984
mlxd_intr(bp);
sys/dev/mlx/mlx.c
733
mlx_submit_buf(struct mlx_softc *sc, struct bio *bp)
sys/dev/mlx/mlx.c
739
bioq_insert_tail(&sc->mlx_bioq, bp);
sys/dev/mlx/mlx_disk.c
143
mlxd_strategy(struct bio *bp)
sys/dev/mlx/mlx_disk.c
145
struct mlxd_softc *sc = bp->bio_disk->d_drv1;
sys/dev/mlx/mlx_disk.c
151
bp->bio_error = EINVAL;
sys/dev/mlx/mlx_disk.c
152
bp->bio_flags |= BIO_ERROR;
sys/dev/mlx/mlx_disk.c
156
if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE)) {
sys/dev/mlx/mlx_disk.c
157
bp->bio_error = EOPNOTSUPP;
sys/dev/mlx/mlx_disk.c
165
bp->bio_error = ENXIO;
sys/dev/mlx/mlx_disk.c
166
bp->bio_flags |= BIO_ERROR;
sys/dev/mlx/mlx_disk.c
170
mlx_submit_buf(sc->mlxd_controller, bp);
sys/dev/mlx/mlx_disk.c
178
bp->bio_resid = bp->bio_bcount;
sys/dev/mlx/mlx_disk.c
179
biodone(bp);
sys/dev/mlx/mlx_disk.c
184
mlxd_intr(struct bio *bp)
sys/dev/mlx/mlx_disk.c
189
if (bp->bio_flags & BIO_ERROR)
sys/dev/mlx/mlx_disk.c
190
bp->bio_error = EIO;
sys/dev/mlx/mlx_disk.c
192
bp->bio_resid = 0;
sys/dev/mlx/mlx_disk.c
194
biodone(bp);
sys/dev/mlx/mlxvar.h
224
extern int mlx_submit_buf(struct mlx_softc *sc, struct bio *bp);
sys/dev/mlx/mlxvar.h
228
extern void mlxd_intr(struct bio *bp);
sys/dev/mmc/mmcsd.c
1070
mmcsd_getattr(struct bio *bp)
sys/dev/mmc/mmcsd.c
1075
if (strcmp(bp->bio_attribute, "MMC::device") == 0) {
sys/dev/mmc/mmcsd.c
1076
if (bp->bio_length != sizeof(dev))
sys/dev/mmc/mmcsd.c
1078
part = bp->bio_disk->d_drv1;
sys/dev/mmc/mmcsd.c
1080
bcopy(&dev, bp->bio_data, sizeof(dev));
sys/dev/mmc/mmcsd.c
1081
bp->bio_completed = bp->bio_length;
sys/dev/mmc/mmcsd.c
1162
mmcsd_rw(struct mmcsd_part *part, struct bio *bp)
sys/dev/mmc/mmcsd.c
1178
block = bp->bio_pblkno;
sys/dev/mmc/mmcsd.c
1180
end = bp->bio_pblkno + (bp->bio_bcount / sz);
sys/dev/mmc/mmcsd.c
1182
vaddr = bp->bio_data + (block - bp->bio_pblkno) * sz;
sys/dev/mmc/mmcsd.c
1191
if (bp->bio_cmd == BIO_READ) {
sys/dev/mmc/mmcsd.c
1209
if (bp->bio_cmd == BIO_READ)
sys/dev/mmc/mmcsd.c
1237
mmcsd_delete(struct mmcsd_part *part, struct bio *bp)
sys/dev/mmc/mmcsd.c
1252
block = bp->bio_pblkno;
sys/dev/mmc/mmcsd.c
1254
end = bp->bio_pblkno + (bp->bio_bcount / sz);
sys/dev/mmc/mmcsd.c
1318
block = bp->bio_pblkno;
sys/dev/mmc/mmcsd.c
1338
block = bp->bio_pblkno;
sys/dev/mmc/mmcsd.c
1352
block = bp->bio_pblkno;
sys/dev/mmc/mmcsd.c
1357
if (bp->bio_pblkno >= part->eblock || block == start) {
sys/dev/mmc/mmcsd.c
1374
struct bio bp;
sys/dev/mmc/mmcsd.c
1397
g_reset_bio(&bp);
sys/dev/mmc/mmcsd.c
1398
bp.bio_disk = disk;
sys/dev/mmc/mmcsd.c
1399
bp.bio_pblkno = offset / disk->d_sectorsize;
sys/dev/mmc/mmcsd.c
1400
bp.bio_bcount = length;
sys/dev/mmc/mmcsd.c
1401
bp.bio_data = virtual;
sys/dev/mmc/mmcsd.c
1402
bp.bio_cmd = BIO_WRITE;
sys/dev/mmc/mmcsd.c
1403
end = bp.bio_pblkno + bp.bio_bcount / disk->d_sectorsize;
sys/dev/mmc/mmcsd.c
1412
block = mmcsd_rw(part, &bp);
sys/dev/mmc/mmcsd.c
1423
struct bio *bp;
sys/dev/mmc/mmcsd.c
1438
bp = bioq_takefirst(&part->bio_queue);
sys/dev/mmc/mmcsd.c
1439
if (bp == NULL)
sys/dev/mmc/mmcsd.c
1442
} while (bp == NULL);
sys/dev/mmc/mmcsd.c
1444
if (__predict_false(bp->bio_cmd == BIO_FLUSH)) {
sys/dev/mmc/mmcsd.c
1446
bp->bio_error = EIO;
sys/dev/mmc/mmcsd.c
1447
bp->bio_flags |= BIO_ERROR;
sys/dev/mmc/mmcsd.c
1449
biodone(bp);
sys/dev/mmc/mmcsd.c
1452
if (bp->bio_cmd != BIO_READ && part->ro) {
sys/dev/mmc/mmcsd.c
1453
bp->bio_error = EROFS;
sys/dev/mmc/mmcsd.c
1454
bp->bio_resid = bp->bio_bcount;
sys/dev/mmc/mmcsd.c
1455
bp->bio_flags |= BIO_ERROR;
sys/dev/mmc/mmcsd.c
1456
biodone(bp);
sys/dev/mmc/mmcsd.c
1461
block = bp->bio_pblkno;
sys/dev/mmc/mmcsd.c
1462
end = bp->bio_pblkno + (bp->bio_bcount / sz);
sys/dev/mmc/mmcsd.c
1470
if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/dev/mmc/mmcsd.c
1474
block = mmcsd_rw(part, bp);
sys/dev/mmc/mmcsd.c
1475
} else if (bp->bio_cmd == BIO_DELETE)
sys/dev/mmc/mmcsd.c
1476
block = mmcsd_delete(part, bp);
sys/dev/mmc/mmcsd.c
1482
bp->bio_error = (abio_error == 0) ? EIO : abio_error;
sys/dev/mmc/mmcsd.c
1483
bp->bio_resid = (end - block) * sz;
sys/dev/mmc/mmcsd.c
1484
bp->bio_flags |= BIO_ERROR;
sys/dev/mmc/mmcsd.c
1486
bp->bio_resid = 0;
sys/dev/mmc/mmcsd.c
1487
biodone(bp);
sys/dev/mmc/mmcsd.c
172
static void mmcsd_strategy(struct bio *bp);
sys/dev/mmc/mmcsd.c
182
static daddr_t mmcsd_delete(struct mmcsd_part *part, struct bio *bp);
sys/dev/mmc/mmcsd.c
190
static daddr_t mmcsd_rw(struct mmcsd_part *part, struct bio *bp);
sys/dev/mmc/mmcsd.c
794
mmcsd_strategy(struct bio *bp)
sys/dev/mmc/mmcsd.c
798
part = bp->bio_disk->d_drv1;
sys/dev/mmc/mmcsd.c
801
bioq_disksort(&part->bio_queue, bp);
sys/dev/mmc/mmcsd.c
806
biofinish(bp, NULL, ENXIO);
sys/dev/nvd/nvd.c
181
nvd_bio_submit(struct nvd_disk *ndisk, struct bio *bp)
sys/dev/nvd/nvd.c
185
bp->bio_driver1 = NULL;
sys/dev/nvd/nvd.c
186
if (__predict_false(bp->bio_flags & BIO_ORDERED))
sys/dev/nvd/nvd.c
190
err = nvme_ns_bio_process(ndisk->ns, bp, nvd_done);
sys/dev/nvd/nvd.c
192
if (__predict_false(bp->bio_flags & BIO_ORDERED)) {
sys/dev/nvd/nvd.c
201
bp->bio_error = err;
sys/dev/nvd/nvd.c
202
bp->bio_flags |= BIO_ERROR;
sys/dev/nvd/nvd.c
203
bp->bio_resid = bp->bio_bcount;
sys/dev/nvd/nvd.c
204
biodone(bp);
sys/dev/nvd/nvd.c
209
nvd_strategy(struct bio *bp)
sys/dev/nvd/nvd.c
211
struct nvd_disk *ndisk = (struct nvd_disk *)bp->bio_disk->d_drv1;
sys/dev/nvd/nvd.c
217
if (__predict_false(bp->bio_flags & BIO_ORDERED)) {
sys/dev/nvd/nvd.c
220
nvd_bio_submit(ndisk, bp);
sys/dev/nvd/nvd.c
224
nvd_bio_submit(ndisk, bp);
sys/dev/nvd/nvd.c
233
bioq_insert_tail(&ndisk->bioq, bp);
sys/dev/nvd/nvd.c
241
struct bio *bp;
sys/dev/nvd/nvd.c
246
while ((bp = bioq_takefirst(&ndisk->bioq)) != NULL) {
sys/dev/nvd/nvd.c
247
if (__predict_false(bp->bio_flags & BIO_ORDERED))
sys/dev/nvd/nvd.c
249
bp->bio_error = ENXIO;
sys/dev/nvd/nvd.c
250
bp->bio_flags |= BIO_ERROR;
sys/dev/nvd/nvd.c
251
bp->bio_resid = bp->bio_bcount;
sys/dev/nvd/nvd.c
252
biodone(bp);
sys/dev/nvd/nvd.c
293
nvd_getattr(struct bio *bp)
sys/dev/nvd/nvd.c
295
struct nvd_disk *ndisk = (struct nvd_disk *)bp->bio_disk->d_drv1;
sys/dev/nvd/nvd.c
299
if (!strcmp("GEOM::lunid", bp->bio_attribute)) {
sys/dev/nvd/nvd.c
308
if (bp->bio_length < sizeof(nsdata->nguid) * 2 + 1)
sys/dev/nvd/nvd.c
311
sprintf(&bp->bio_data[i * 2], "%02x",
sys/dev/nvd/nvd.c
314
bp->bio_completed = bp->bio_length;
sys/dev/nvd/nvd.c
324
if (bp->bio_length < sizeof(nsdata->eui64) * 2 + 1)
sys/dev/nvd/nvd.c
327
sprintf(&bp->bio_data[i * 2], "%02x",
sys/dev/nvd/nvd.c
330
bp->bio_completed = bp->bio_length;
sys/dev/nvd/nvd.c
340
struct bio *bp = (struct bio *)arg;
sys/dev/nvd/nvd.c
341
struct nvd_disk *ndisk = bp->bio_disk->d_drv1;
sys/dev/nvd/nvd.c
343
if (__predict_false(bp->bio_flags & BIO_ORDERED)) {
sys/dev/nvd/nvd.c
353
biodone(bp);
sys/dev/nvd/nvd.c
360
struct bio *bp;
sys/dev/nvd/nvd.c
364
bp = bioq_takefirst(&ndisk->bioq);
sys/dev/nvd/nvd.c
366
if (bp == NULL)
sys/dev/nvd/nvd.c
369
if (__predict_false(bp->bio_flags & BIO_ORDERED)) {
sys/dev/nvd/nvd.c
385
nvd_bio_submit(ndisk, bp);
sys/dev/nvdimm/nvdimm_spa.c
291
nvdimm_spa_g_all_unmapped(struct nvdimm_spa_dev *dev, struct bio *bp, int rw)
sys/dev/nvdimm/nvdimm_spa.c
293
struct vm_page maa[bp->bio_ma_n];
sys/dev/nvdimm/nvdimm_spa.c
294
vm_page_t ma[bp->bio_ma_n];
sys/dev/nvdimm/nvdimm_spa.c
302
trunc_page(bp->bio_offset) + PAGE_SIZE * i, mattr);
sys/dev/nvdimm/nvdimm_spa.c
306
pmap_copy_pages(ma, bp->bio_offset & PAGE_MASK, bp->bio_ma,
sys/dev/nvdimm/nvdimm_spa.c
307
bp->bio_ma_offset, bp->bio_length);
sys/dev/nvdimm/nvdimm_spa.c
309
pmap_copy_pages(bp->bio_ma, bp->bio_ma_offset, ma,
sys/dev/nvdimm/nvdimm_spa.c
310
bp->bio_offset & PAGE_MASK, bp->bio_length);
sys/dev/nvdimm/nvdimm_spa.c
317
struct bio *bp;
sys/dev/nvdimm/nvdimm_spa.c
326
bp = bioq_takefirst(&sc->spa_g_queue);
sys/dev/nvdimm/nvdimm_spa.c
327
if (bp != NULL)
sys/dev/nvdimm/nvdimm_spa.c
340
if (bp->bio_cmd != BIO_READ && bp->bio_cmd != BIO_WRITE &&
sys/dev/nvdimm/nvdimm_spa.c
341
bp->bio_cmd != BIO_FLUSH) {
sys/dev/nvdimm/nvdimm_spa.c
347
if (bp->bio_cmd == BIO_FLUSH) {
sys/dev/nvdimm/nvdimm_spa.c
363
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/dev/nvdimm/nvdimm_spa.c
366
bp->bio_offset;
sys/dev/nvdimm/nvdimm_spa.c
367
aiovec.iov_len = bp->bio_length;
sys/dev/nvdimm/nvdimm_spa.c
370
auio.uio_resid = bp->bio_length;
sys/dev/nvdimm/nvdimm_spa.c
371
auio.uio_offset = bp->bio_offset;
sys/dev/nvdimm/nvdimm_spa.c
373
auio.uio_rw = bp->bio_cmd == BIO_READ ?
sys/dev/nvdimm/nvdimm_spa.c
376
error = uiomove_fromphys(bp->bio_ma,
sys/dev/nvdimm/nvdimm_spa.c
377
bp->bio_ma_offset, bp->bio_length, &auio);
sys/dev/nvdimm/nvdimm_spa.c
378
bp->bio_resid = auio.uio_resid;
sys/dev/nvdimm/nvdimm_spa.c
380
nvdimm_spa_g_all_unmapped(sc->dev, bp,
sys/dev/nvdimm/nvdimm_spa.c
381
bp->bio_cmd);
sys/dev/nvdimm/nvdimm_spa.c
382
bp->bio_resid = bp->bio_length;
sys/dev/nvdimm/nvdimm_spa.c
386
aiovec.iov_base = bp->bio_data;
sys/dev/nvdimm/nvdimm_spa.c
387
aiovec.iov_len = bp->bio_length;
sys/dev/nvdimm/nvdimm_spa.c
390
auio.uio_resid = bp->bio_length;
sys/dev/nvdimm/nvdimm_spa.c
391
auio.uio_offset = bp->bio_offset;
sys/dev/nvdimm/nvdimm_spa.c
393
auio.uio_rw = bp->bio_cmd == BIO_READ ? UIO_READ :
sys/dev/nvdimm/nvdimm_spa.c
397
bp->bio_resid = auio.uio_resid;
sys/dev/nvdimm/nvdimm_spa.c
399
bp->bio_bcount = bp->bio_length;
sys/dev/nvdimm/nvdimm_spa.c
400
devstat_end_transaction_bio(sc->spa_g_devstat, bp);
sys/dev/nvdimm/nvdimm_spa.c
402
bp->bio_completed = bp->bio_length;
sys/dev/nvdimm/nvdimm_spa.c
403
g_io_deliver(bp, error);
sys/dev/nvdimm/nvdimm_spa.c
408
nvdimm_spa_g_start(struct bio *bp)
sys/dev/nvdimm/nvdimm_spa.c
412
sc = bp->bio_to->geom->softc;
sys/dev/nvdimm/nvdimm_spa.c
413
if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/dev/nvdimm/nvdimm_spa.c
414
devstat_start_transaction_bio(sc->spa_g_devstat, bp);
sys/dev/nvdimm/nvdimm_spa.c
417
bioq_disksort(&sc->spa_g_queue, bp);
sys/dev/nvme/nvme.h
1958
int nvme_ns_cmd_write_bio(struct nvme_namespace *ns, struct bio *bp,
sys/dev/nvme/nvme.h
1963
int nvme_ns_cmd_read_bio(struct nvme_namespace *ns, struct bio *bp,
sys/dev/nvme/nvme.h
2014
int nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp,
sys/dev/nvme/nvme_ns.c
143
struct bio *bp = arg;
sys/dev/nvme/nvme_ns.c
146
bp->bio_error = EIO;
sys/dev/nvme/nvme_ns.c
147
bp->bio_flags |= BIO_ERROR;
sys/dev/nvme/nvme_ns.c
148
bp->bio_resid = bp->bio_bcount;
sys/dev/nvme/nvme_ns.c
150
bp->bio_resid = 0;
sys/dev/nvme/nvme_ns.c
152
biodone(bp);
sys/dev/nvme/nvme_ns.c
156
nvme_ns_strategy(struct bio *bp)
sys/dev/nvme/nvme_ns.c
161
ns = bp->bio_dev->si_drv1;
sys/dev/nvme/nvme_ns.c
162
err = nvme_ns_bio_process(ns, bp, nvme_ns_strategy_done);
sys/dev/nvme/nvme_ns.c
165
bp->bio_error = err;
sys/dev/nvme/nvme_ns.c
166
bp->bio_flags |= BIO_ERROR;
sys/dev/nvme/nvme_ns.c
167
bp->bio_resid = bp->bio_bcount;
sys/dev/nvme/nvme_ns.c
168
biodone(bp);
sys/dev/nvme/nvme_ns.c
255
struct bio *bp = arg;
sys/dev/nvme/nvme_ns.c
258
bp_cb_fn = bp->bio_driver1;
sys/dev/nvme/nvme_ns.c
260
if (bp->bio_driver2)
sys/dev/nvme/nvme_ns.c
261
free(bp->bio_driver2, M_NVME);
sys/dev/nvme/nvme_ns.c
264
bp->bio_flags |= BIO_ERROR;
sys/dev/nvme/nvme_ns.c
265
if (bp->bio_error == 0)
sys/dev/nvme/nvme_ns.c
266
bp->bio_error = EIO;
sys/dev/nvme/nvme_ns.c
269
if ((bp->bio_flags & BIO_ERROR) == 0)
sys/dev/nvme/nvme_ns.c
270
bp->bio_resid = 0;
sys/dev/nvme/nvme_ns.c
272
bp->bio_resid = bp->bio_bcount;
sys/dev/nvme/nvme_ns.c
274
bp_cb_fn(bp, status);
sys/dev/nvme/nvme_ns.c
376
nvme_construct_child_bios(struct bio *bp, uint32_t alignment, int *num_bios)
sys/dev/nvme/nvme_ns.c
387
*num_bios = nvme_get_num_segments(bp->bio_offset, bp->bio_bcount,
sys/dev/nvme/nvme_ns.c
393
bp->bio_children = *num_bios;
sys/dev/nvme/nvme_ns.c
394
bp->bio_inbed = 0;
sys/dev/nvme/nvme_ns.c
395
cur_offset = bp->bio_offset;
sys/dev/nvme/nvme_ns.c
396
rem_bcount = bp->bio_bcount;
sys/dev/nvme/nvme_ns.c
397
data = bp->bio_data;
sys/dev/nvme/nvme_ns.c
398
ma_offset = bp->bio_ma_offset;
sys/dev/nvme/nvme_ns.c
399
ma = bp->bio_ma;
sys/dev/nvme/nvme_ns.c
403
child->bio_parent = bp;
sys/dev/nvme/nvme_ns.c
404
child->bio_cmd = bp->bio_cmd;
sys/dev/nvme/nvme_ns.c
408
child->bio_flags = bp->bio_flags;
sys/dev/nvme/nvme_ns.c
409
if (bp->bio_flags & BIO_UNMAPPED) {
sys/dev/nvme/nvme_ns.c
432
nvme_ns_split_bio(struct nvme_namespace *ns, struct bio *bp,
sys/dev/nvme/nvme_ns.c
439
child_bios = nvme_construct_child_bios(bp, alignment, &num_bios);
sys/dev/nvme/nvme_ns.c
448
nvme_bio_child_inbed(bp, err);
sys/dev/nvme/nvme_ns.c
458
nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp,
sys/dev/nvme/nvme_ns.c
465
bp->bio_driver1 = cb_fn;
sys/dev/nvme/nvme_ns.c
468
(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)) {
sys/dev/nvme/nvme_ns.c
469
num_bios = nvme_get_num_segments(bp->bio_offset,
sys/dev/nvme/nvme_ns.c
470
bp->bio_bcount, ns->boundary);
sys/dev/nvme/nvme_ns.c
472
return (nvme_ns_split_bio(ns, bp, ns->boundary));
sys/dev/nvme/nvme_ns.c
475
switch (bp->bio_cmd) {
sys/dev/nvme/nvme_ns.c
477
err = nvme_ns_cmd_read_bio(ns, bp, nvme_ns_bio_done, bp);
sys/dev/nvme/nvme_ns.c
480
err = nvme_ns_cmd_write_bio(ns, bp, nvme_ns_bio_done, bp);
sys/dev/nvme/nvme_ns.c
483
err = nvme_ns_cmd_flush(ns, nvme_ns_bio_done, bp);
sys/dev/nvme/nvme_ns.c
494
htole32(bp->bio_bcount/nvme_ns_get_sector_size(ns));
sys/dev/nvme/nvme_ns.c
496
htole64(bp->bio_offset/nvme_ns_get_sector_size(ns));
sys/dev/nvme/nvme_ns.c
497
bp->bio_driver2 = dsm_range;
sys/dev/nvme/nvme_ns.c
499
nvme_ns_bio_done, bp);
sys/dev/nvme/nvme_ns.c
56
static struct bio ** nvme_construct_child_bios(struct bio *bp,
sys/dev/nvme/nvme_ns.c
60
struct bio *bp,
sys/dev/nvme/nvme_ns_cmd.c
100
lba_count = bp->bio_bcount / nvme_ns_get_sector_size(ns);
sys/dev/nvme/nvme_ns_cmd.c
51
nvme_ns_cmd_read_bio(struct nvme_namespace *ns, struct bio *bp,
sys/dev/nvme/nvme_ns_cmd.c
58
req = nvme_allocate_request_bio(bp, M_NOWAIT, cb_fn, cb_arg);
sys/dev/nvme/nvme_ns_cmd.c
61
lba = bp->bio_offset / nvme_ns_get_sector_size(ns);
sys/dev/nvme/nvme_ns_cmd.c
62
lba_count = bp->bio_bcount / nvme_ns_get_sector_size(ns);
sys/dev/nvme/nvme_ns_cmd.c
89
nvme_ns_cmd_write_bio(struct nvme_namespace *ns, struct bio *bp,
sys/dev/nvme/nvme_ns_cmd.c
96
req = nvme_allocate_request_bio(bp, M_NOWAIT, cb_fn, cb_arg);
sys/dev/nvme/nvme_ns_cmd.c
99
lba = bp->bio_offset / nvme_ns_get_sector_size(ns);
sys/dev/ofw/ofw_disk.c
104
struct bio *bp;
sys/dev/ofw/ofw_disk.c
112
bp = bioq_takefirst(&sc->ofwd_bio_queue);
sys/dev/ofw/ofw_disk.c
113
if (!bp) {
sys/dev/ofw/ofw_disk.c
119
if (bp->bio_cmd == BIO_GETATTR) {
sys/dev/ofw/ofw_disk.c
122
error = ofwd_startio(sc, bp);
sys/dev/ofw/ofw_disk.c
125
bp->bio_completed = bp->bio_length;
sys/dev/ofw/ofw_disk.c
126
g_io_deliver(bp, error);
sys/dev/ofw/ofw_disk.c
187
g_ofwd_start(struct bio *bp)
sys/dev/ofw/ofw_disk.c
191
sc = bp->bio_to->geom->softc;
sys/dev/ofw/ofw_disk.c
193
bioq_disksort(&sc->ofwd_bio_queue, bp);
sys/dev/ofw/ofw_disk.c
77
ofwd_startio(struct ofwd_softc *sc, struct bio *bp)
sys/dev/ofw/ofw_disk.c
81
r = OF_seek(sc->ofwd_instance, bp->bio_offset);
sys/dev/ofw/ofw_disk.c
83
switch (bp->bio_cmd) {
sys/dev/ofw/ofw_disk.c
85
r = OF_read(sc->ofwd_instance, (void *)bp->bio_data,
sys/dev/ofw/ofw_disk.c
86
bp->bio_length);
sys/dev/ofw/ofw_disk.c
89
r = OF_write(sc->ofwd_instance, (void *)bp->bio_data,
sys/dev/ofw/ofw_disk.c
90
bp->bio_length);
sys/dev/ofw/ofw_disk.c
93
if (r != bp->bio_length)
sys/dev/ofw/ofw_disk.c
96
bp->bio_resid = 0;
sys/dev/ow/owc_gpiobus.c
169
#define GETPIN(sc, bp) gpio_pin_is_active((sc)->sc_pin, (bp))
sys/dev/ppbus/if_plip.c
526
u_char *bp;
sys/dev/ppbus/if_plip.c
547
bp = sc->sc_ifbuf;
sys/dev/ppbus/if_plip.c
554
*bp++ = j;
sys/dev/ppbus/if_plip.c
563
len = bp - sc->sc_ifbuf;
sys/dev/ppbus/if_plip.c
588
bp = sc->sc_ifbuf;
sys/dev/ppbus/if_plip.c
601
*bp++= trecvh[cl] | trecvl[c];
sys/dev/ppbus/if_plip.c
615
len = bp - sc->sc_ifbuf;
sys/dev/pst/pst-raid.c
206
pststrategy(struct bio *bp)
sys/dev/pst/pst-raid.c
208
struct pst_softc *psc = bp->bio_disk->d_drv1;
sys/dev/pst/pst-raid.c
211
bioq_disksort(&psc->queue, bp);
sys/dev/pst/pst-raid.c
220
struct bio *bp;
sys/dev/pst/pst-raid.c
225
(bp = bioq_first(&psc->queue))) {
sys/dev/pst/pst-raid.c
227
bioq_remove(&psc->queue, bp);
sys/dev/pst/pst-raid.c
231
biofinish(request->bp, NULL, ENOMEM);
sys/dev/pst/pst-raid.c
239
request->bp = bp;
sys/dev/pst/pst-raid.c
241
biofinish(request->bp, NULL, error);
sys/dev/pst/pst-raid.c
258
request->bp->bio_resid = request->bp->bio_bcount - reply->donecount;
sys/dev/pst/pst-raid.c
259
biofinish(request->bp, NULL, reply->status ? EIO : 0);
sys/dev/pst/pst-raid.c
280
switch (request->bp->bio_cmd) {
sys/dev/pst/pst-raid.c
294
printf("pst: unknown command type 0x%02x\n", request->bp->bio_cmd);
sys/dev/pst/pst-raid.c
300
msg->bytecount = request->bp->bio_bcount;
sys/dev/pst/pst-raid.c
301
msg->lba = ((u_int64_t)request->bp->bio_pblkno) * (DEV_BSIZE * 1LL);
sys/dev/pst/pst-raid.c
303
if (!iop_create_sgl((struct i2o_basic_message *)msg, request->bp->bio_data,
sys/dev/pst/pst-raid.c
304
request->bp->bio_bcount, sgl_flag))
sys/dev/pst/pst-raid.c
322
request->mfa, request->bp->bio_cmd);
sys/dev/pst/pst-raid.c
327
biofinish(request->bp, NULL, EIO);
sys/dev/pst/pst-raid.c
333
biofinish(request->bp, NULL, error);
sys/dev/pst/pst-raid.c
70
struct bio *bp; /* associated bio ptr */
sys/dev/virtio/block/virtio_blk.c
1099
struct bio *bp;
sys/dev/virtio/block/virtio_blk.c
1110
bp = bioq_takefirst(bioq);
sys/dev/virtio/block/virtio_blk.c
1111
req->vbr_bp = bp;
sys/dev/virtio/block/virtio_blk.c
1115
switch (bp->bio_cmd) {
sys/dev/virtio/block/virtio_blk.c
1122
req->vbr_hdr->sector = vtblk_gtoh64(sc, bp->bio_offset /
sys/dev/virtio/block/virtio_blk.c
1127
req->vbr_hdr->sector = vtblk_gtoh64(sc, bp->bio_offset /
sys/dev/virtio/block/virtio_blk.c
1132
req->vbr_hdr->sector = vtblk_gtoh64(sc, bp->bio_offset /
sys/dev/virtio/block/virtio_blk.c
1136
panic("%s: bio with unhandled cmd: %d", __func__, bp->bio_cmd);
sys/dev/virtio/block/virtio_blk.c
1139
if (bp->bio_flags & BIO_ORDERED)
sys/dev/virtio/block/virtio_blk.c
1149
struct bio *bp = req->vbr_bp;
sys/dev/virtio/block/virtio_blk.c
1159
(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)) {
sys/dev/virtio/block/virtio_blk.c
1181
struct bio *bp;
sys/dev/virtio/block/virtio_blk.c
1188
bp = req->vbr_bp;
sys/dev/virtio/block/virtio_blk.c
1216
if (bp->bio_flags & BIO_ORDERED) {
sys/dev/virtio/block/virtio_blk.c
1234
if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/dev/virtio/block/virtio_blk.c
1244
__func__, bp, error);
sys/dev/virtio/block/virtio_blk.c
1250
error = sglist_append_bio(sg, bp);
sys/dev/virtio/block/virtio_blk.c
1253
__func__, bp, error);
sys/dev/virtio/block/virtio_blk.c
1258
if (bp->bio_cmd == BIO_READ)
sys/dev/virtio/block/virtio_blk.c
1260
} else if (bp->bio_cmd == BIO_DELETE) {
sys/dev/virtio/block/virtio_blk.c
1269
bp->bio_driver1 = discard;
sys/dev/virtio/block/virtio_blk.c
1270
discard->sector = vtblk_gtoh64(sc, bp->bio_offset / VTBLK_BSIZE);
sys/dev/virtio/block/virtio_blk.c
1271
discard->num_sectors = vtblk_gtoh32(sc, bp->bio_bcount / VTBLK_BSIZE);
sys/dev/virtio/block/virtio_blk.c
1275
__func__, bp, error);
sys/dev/virtio/block/virtio_blk.c
1287
switch (bp->bio_cmd) {
sys/dev/virtio/block/virtio_blk.c
1346
struct bio *bp;
sys/dev/virtio/block/virtio_blk.c
1353
bp = req->vbr_bp;
sys/dev/virtio/block/virtio_blk.c
1355
switch (bp->bio_cmd) {
sys/dev/virtio/block/virtio_blk.c
1368
bp->bio_error = vtblk_request_error(req);
sys/dev/virtio/block/virtio_blk.c
1369
return (bp);
sys/dev/virtio/block/virtio_blk.c
1376
struct bio *bp;
sys/dev/virtio/block/virtio_blk.c
1379
bp = vtblk_queue_complete_one(sc, req);
sys/dev/virtio/block/virtio_blk.c
1381
TAILQ_INSERT_TAIL(queue, bp, bio_queue);
sys/dev/virtio/block/virtio_blk.c
1389
struct bio *bp, *tmp;
sys/dev/virtio/block/virtio_blk.c
1391
TAILQ_FOREACH_SAFE(bp, queue, bio_queue, tmp) {
sys/dev/virtio/block/virtio_blk.c
1392
if (bp->bio_error != 0)
sys/dev/virtio/block/virtio_blk.c
1393
disk_err(bp, "hard error", -1, 1);
sys/dev/virtio/block/virtio_blk.c
1394
vtblk_bio_done(sc, bp, bp->bio_error);
sys/dev/virtio/block/virtio_blk.c
1422
struct bio *bp;
sys/dev/virtio/block/virtio_blk.c
1442
bp = bioq_takefirst(bioq);
sys/dev/virtio/block/virtio_blk.c
1443
vtblk_bio_done(sc, bp, ENXIO);
sys/dev/virtio/block/virtio_blk.c
1480
vtblk_bio_done(struct vtblk_softc *sc, struct bio *bp, int error)
sys/dev/virtio/block/virtio_blk.c
1488
bp->bio_resid = bp->bio_bcount;
sys/dev/virtio/block/virtio_blk.c
1489
bp->bio_error = error;
sys/dev/virtio/block/virtio_blk.c
1490
bp->bio_flags |= BIO_ERROR;
sys/dev/virtio/block/virtio_blk.c
1492
kmsan_mark_bio(bp, KMSAN_STATE_INITED);
sys/dev/virtio/block/virtio_blk.c
1495
if (bp->bio_driver1 != NULL) {
sys/dev/virtio/block/virtio_blk.c
1496
free(bp->bio_driver1, M_DEVBUF);
sys/dev/virtio/block/virtio_blk.c
1497
bp->bio_driver1 = NULL;
sys/dev/virtio/block/virtio_blk.c
1500
biodone(bp);
sys/dev/virtio/block/virtio_blk.c
1596
struct bio *bp;
sys/dev/virtio/block/virtio_blk.c
1613
bp = vtblk_queue_complete_one(sc, req);
sys/dev/virtio/block/virtio_blk.c
1614
error = bp->bio_error;
sys/dev/virtio/block/virtio_blk.c
671
vtblk_strategy(struct bio *bp)
sys/dev/virtio/block/virtio_blk.c
675
if ((sc = bp->bio_disk->d_drv1) == NULL) {
sys/dev/virtio/block/virtio_blk.c
676
vtblk_bio_done(NULL, bp, EINVAL);
sys/dev/virtio/block/virtio_blk.c
680
if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE) &&
sys/dev/virtio/block/virtio_blk.c
681
(bp->bio_cmd != BIO_FLUSH) && (bp->bio_cmd != BIO_DELETE)) {
sys/dev/virtio/block/virtio_blk.c
682
vtblk_bio_done(sc, bp, EOPNOTSUPP);
sys/dev/virtio/block/virtio_blk.c
690
vtblk_bio_done(sc, bp, ENXIO);
sys/dev/virtio/block/virtio_blk.c
694
bioq_insert_tail(&sc->vtblk_bioq, bp);
sys/dev/xdma/xdma.h
103
struct bio *bp;
sys/dev/xdma/xdma.h
260
int xdma_dequeue_bio(xdma_channel_t *xchan, struct bio **bp,
sys/dev/xdma/xdma.h
262
int xdma_enqueue_bio(xdma_channel_t *xchan, struct bio **bp, bus_addr_t addr,
sys/dev/xdma/xdma_bio.c
46
xdma_dequeue_bio(xdma_channel_t *xchan, struct bio **bp,
sys/dev/xdma/xdma_bio.c
62
*bp = xr->bp;
sys/dev/xdma/xdma_bio.c
73
xdma_enqueue_bio(xdma_channel_t *xchan, struct bio **bp,
sys/dev/xdma/xdma_bio.c
84
xr->bp = *bp;
sys/dev/xdma/xdma_queue.c
87
xr->bp = NULL;
sys/dev/xdma/xdma_sg.c
418
xr->buf.map, xr->bp, xdma_dmamap_cb, &slr, BUS_DMA_NOWAIT);
sys/dev/xen/blkfront/blkfront.c
338
struct bio *bp;
sys/dev/xen/blkfront/blkfront.c
343
bp = xbd_dequeue_bio(sc);
sys/dev/xen/blkfront/blkfront.c
344
if (bp == NULL)
sys/dev/xen/blkfront/blkfront.c
349
xbd_requeue_bio(sc, bp);
sys/dev/xen/blkfront/blkfront.c
359
xbd_requeue_bio(sc, bp);
sys/dev/xen/blkfront/blkfront.c
364
cm->cm_bp = bp;
sys/dev/xen/blkfront/blkfront.c
366
((blkif_sector_t)bp->bio_pblkno * sc->xbd_disk->d_sectorsize) >>
sys/dev/xen/blkfront/blkfront.c
369
switch (bp->bio_cmd) {
sys/dev/xen/blkfront/blkfront.c
375
if ((bp->bio_flags & BIO_ORDERED) != 0) {
sys/dev/xen/blkfront/blkfront.c
404
biofinish(bp, NULL, EOPNOTSUPP);
sys/dev/xen/blkfront/blkfront.c
464
struct bio *bp;
sys/dev/xen/blkfront/blkfront.c
466
bp = cm->cm_bp;
sys/dev/xen/blkfront/blkfront.c
469
disk_err(bp, "disk error" , -1, 0);
sys/dev/xen/blkfront/blkfront.c
471
bp->bio_flags |= BIO_ERROR;
sys/dev/xen/blkfront/blkfront.c
474
if (bp->bio_flags & BIO_ERROR)
sys/dev/xen/blkfront/blkfront.c
475
bp->bio_error = EIO;
sys/dev/xen/blkfront/blkfront.c
477
bp->bio_resid = 0;
sys/dev/xen/blkfront/blkfront.c
480
biodone(bp);
sys/dev/xen/blkfront/blkfront.c
723
xbd_strategy(struct bio *bp)
sys/dev/xen/blkfront/blkfront.c
725
struct xbd_softc *sc = bp->bio_disk->d_drv1;
sys/dev/xen/blkfront/blkfront.c
729
bp->bio_error = EINVAL;
sys/dev/xen/blkfront/blkfront.c
730
bp->bio_flags |= BIO_ERROR;
sys/dev/xen/blkfront/blkfront.c
731
bp->bio_resid = bp->bio_bcount;
sys/dev/xen/blkfront/blkfront.c
732
biodone(bp);
sys/dev/xen/blkfront/blkfront.c
741
xbd_enqueue_bio(sc, bp);
sys/dev/xen/blkfront/block.h
319
xbd_enqueue_bio(struct xbd_softc *sc, struct bio *bp)
sys/dev/xen/blkfront/block.h
321
bioq_insert_tail(&sc->xbd_bioq, bp);
sys/dev/xen/blkfront/block.h
326
xbd_requeue_bio(struct xbd_softc *sc, struct bio *bp)
sys/dev/xen/blkfront/block.h
328
bioq_insert_head(&sc->xbd_bioq, bp);
sys/dev/xen/blkfront/block.h
335
struct bio *bp;
sys/dev/xen/blkfront/block.h
337
if ((bp = bioq_first(&sc->xbd_bioq)) != NULL) {
sys/dev/xen/blkfront/block.h
338
bioq_remove(&sc->xbd_bioq, bp);
sys/dev/xen/blkfront/block.h
341
return (bp);
sys/fs/cd9660/cd9660_lookup.c
104
struct buf *bp; /* a buffer of directory entries */
sys/fs/cd9660/cd9660_lookup.c
132
bp = NULL;
sys/fs/cd9660/cd9660_lookup.c
174
(error = cd9660_blkatoff(vdp, (off_t)i_offset, NULL, &bp)))
sys/fs/cd9660/cd9660_lookup.c
189
if (bp != NULL)
sys/fs/cd9660/cd9660_lookup.c
190
brelse(bp);
sys/fs/cd9660/cd9660_lookup.c
192
cd9660_blkatoff(vdp, (off_t)i_offset, NULL, &bp)) != 0)
sys/fs/cd9660/cd9660_lookup.c
200
((char *)bp->b_data + entryoffsetinblock);
sys/fs/cd9660/cd9660_lookup.c
256
ino = dbtob(bp->b_blkno)
sys/fs/cd9660/cd9660_lookup.c
273
ino = dbtob(bp->b_blkno) + entryoffsetinblock;
sys/fs/cd9660/cd9660_lookup.c
291
if (bp != NULL)
sys/fs/cd9660/cd9660_lookup.c
292
brelse(bp);
sys/fs/cd9660/cd9660_lookup.c
294
(off_t)saveoffset, NULL, &bp)) != 0)
sys/fs/cd9660/cd9660_lookup.c
299
((char *)bp->b_data + entryoffsetinblock);
sys/fs/cd9660/cd9660_lookup.c
316
if (bp != NULL)
sys/fs/cd9660/cd9660_lookup.c
317
brelse(bp);
sys/fs/cd9660/cd9660_lookup.c
372
brelse(bp);
sys/fs/cd9660/cd9660_lookup.c
430
struct buf *bp;
sys/fs/cd9660/cd9660_lookup.c
440
if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) {
sys/fs/cd9660/cd9660_lookup.c
441
brelse(bp);
sys/fs/cd9660/cd9660_lookup.c
455
if (bp->b_blkno == bp->b_lblkno) {
sys/fs/cd9660/cd9660_lookup.c
456
bp->b_blkno = (ip->iso_start + bp->b_lblkno) << (bshift - DEV_BSHIFT);
sys/fs/cd9660/cd9660_lookup.c
460
*res = (char *)bp->b_data + blkoff(imp, offset);
sys/fs/cd9660/cd9660_lookup.c
461
*bpp = bp;
sys/fs/cd9660/cd9660_node.c
119
if (!bp
sys/fs/cd9660/cd9660_node.c
124
bp = bp2;
sys/fs/cd9660/cd9660_node.c
126
if (bp) {
sys/fs/cd9660/cd9660_node.c
127
ap = (struct iso_extended_attributes *)bp->b_data;
sys/fs/cd9660/cd9660_node.c
161
struct buf *bp, enum ISO_FTYPE ftype)
sys/fs/cd9660/cd9660_node.c
168
if (!bp
sys/fs/cd9660/cd9660_node.c
173
bp = bp2;
sys/fs/cd9660/cd9660_node.c
175
if (bp) {
sys/fs/cd9660/cd9660_node.c
176
ap = (struct iso_extended_attributes *)bp->b_data;
sys/fs/cd9660/cd9660_node.c
99
struct buf *bp, enum ISO_FTYPE ftype)
sys/fs/cd9660/cd9660_rrip.c
467
struct buf *bp = NULL;
sys/fs/cd9660/cd9660_rrip.c
528
if (bp != NULL) {
sys/fs/cd9660/cd9660_rrip.c
529
brelse(bp);
sys/fs/cd9660/cd9660_rrip.c
530
bp = NULL;
sys/fs/cd9660/cd9660_rrip.c
535
ana->imp->logical_block_size, NOCRED, &bp) != 0)
sys/fs/cd9660/cd9660_rrip.c
538
phead = (ISO_SUSP_HEADER *)(bp->b_data + ana->iso_ce_off);
sys/fs/cd9660/cd9660_rrip.c
543
if (bp)
sys/fs/cd9660/cd9660_rrip.c
544
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
209
struct buf *bp = NULL;
sys/fs/cd9660/cd9660_vfsops.c
264
iso_bsize, NOCRED, &bp)) != 0)
sys/fs/cd9660/cd9660_vfsops.c
267
vdp = (struct iso_volume_descriptor *)bp->b_data;
sys/fs/cd9660/cd9660_vfsops.c
279
pribp = bp;
sys/fs/cd9660/cd9660_vfsops.c
280
bp = NULL;
sys/fs/cd9660/cd9660_vfsops.c
289
supbp = bp;
sys/fs/cd9660/cd9660_vfsops.c
290
bp = NULL;
sys/fs/cd9660/cd9660_vfsops.c
314
if (bp != NULL) {
sys/fs/cd9660/cd9660_vfsops.c
315
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
316
bp = NULL;
sys/fs/cd9660/cd9660_vfsops.c
320
if (bp != NULL) {
sys/fs/cd9660/cd9660_vfsops.c
321
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
322
bp = NULL;
sys/fs/cd9660/cd9660_vfsops.c
425
isomp->logical_block_size, NOCRED, &bp)) != 0)
sys/fs/cd9660/cd9660_vfsops.c
428
rootp = (struct iso_directory_record *)bp->b_data;
sys/fs/cd9660/cd9660_vfsops.c
440
bp->b_flags |= B_AGE;
sys/fs/cd9660/cd9660_vfsops.c
441
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
442
bp = NULL;
sys/fs/cd9660/cd9660_vfsops.c
503
if (bp != NULL)
sys/fs/cd9660/cd9660_vfsops.c
504
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
676
struct buf *bp;
sys/fs/cd9660/cd9660_vfsops.c
748
imp->logical_block_size, NOCRED, &bp);
sys/fs/cd9660/cd9660_vfsops.c
754
isodir = (struct iso_directory_record *)(bp->b_data + off);
sys/fs/cd9660/cd9660_vfsops.c
759
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
769
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
777
bp = NULL;
sys/fs/cd9660/cd9660_vfsops.c
787
if (bp != NULL)
sys/fs/cd9660/cd9660_vfsops.c
788
brelse(bp);
sys/fs/cd9660/cd9660_vfsops.c
789
if ((error = cd9660_blkatoff(vp, (off_t)0, NULL, &bp)) != 0) {
sys/fs/cd9660/cd9660_vfsops.c
793
isodir = (struct iso_directory_record *)bp->b_data;
sys/fs/cd9660/cd9660_vfsops.c
826
brelse(bp);
sys/fs/cd9660/cd9660_vnops.c
276
struct buf *bp;
sys/fs/cd9660/cd9660_vnops.c
308
(ap->a_ioflag >> 16), 0, &bp);
sys/fs/cd9660/cd9660_vnops.c
310
error = bread(vp, lbn, size, NOCRED, &bp);
sys/fs/cd9660/cd9660_vnops.c
316
&rasize, 1, NOCRED, &bp);
sys/fs/cd9660/cd9660_vnops.c
318
error = bread(vp, lbn, size, NOCRED, &bp);
sys/fs/cd9660/cd9660_vnops.c
322
n = MIN(n, size - bp->b_resid);
sys/fs/cd9660/cd9660_vnops.c
324
error = uiomove(bp->b_data + on, (int)n, uio);
sys/fs/cd9660/cd9660_vnops.c
325
brelse(bp);
sys/fs/cd9660/cd9660_vnops.c
436
struct buf *bp = NULL;
sys/fs/cd9660/cd9660_vnops.c
477
(error = cd9660_blkatoff(vdp, (off_t)idp->curroff, NULL, &bp))) {
sys/fs/cd9660/cd9660_vnops.c
490
if (bp != NULL)
sys/fs/cd9660/cd9660_vnops.c
491
brelse(bp);
sys/fs/cd9660/cd9660_vnops.c
493
cd9660_blkatoff(vdp, (off_t)idp->curroff, NULL, &bp)) != 0)
sys/fs/cd9660/cd9660_vnops.c
501
((char *)bp->b_data + entryoffsetinblock);
sys/fs/cd9660/cd9660_vnops.c
534
idp->current.d_fileno = dbtob(bp->b_blkno) +
sys/fs/cd9660/cd9660_vnops.c
599
if (bp)
sys/fs/cd9660/cd9660_vnops.c
600
brelse (bp);
sys/fs/cd9660/cd9660_vnops.c
625
struct buf *bp;
sys/fs/cd9660/cd9660_vnops.c
644
imp->logical_block_size, NOCRED, &bp);
sys/fs/cd9660/cd9660_vnops.c
652
dirp = (ISODIR *)(bp->b_data + (ip->i_number & imp->im_bmask));
sys/fs/cd9660/cd9660_vnops.c
660
brelse(bp);
sys/fs/cd9660/cd9660_vnops.c
679
brelse(bp);
sys/fs/cd9660/cd9660_vnops.c
685
brelse(bp);
sys/fs/cd9660/cd9660_vnops.c
708
struct buf *bp = ap->a_bp;
sys/fs/cd9660/cd9660_vnops.c
716
if (bp->b_blkno == bp->b_lblkno) {
sys/fs/cd9660/cd9660_vnops.c
717
bp->b_blkno = (ip->iso_start + bp->b_lblkno) <<
sys/fs/cd9660/cd9660_vnops.c
720
bp->b_iooffset = dbtob(bp->b_blkno);
sys/fs/cd9660/cd9660_vnops.c
722
BO_STRATEGY(bo, bp);
sys/fs/ext2fs/ext2_alloc.c
1003
struct buf *bp;
sys/fs/ext2fs/ext2_alloc.c
1017
(int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_alloc.c
1023
error = ext2_cg_block_bitmap_init(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1027
ext2_gd_b_bitmap_csum_set(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1029
error = ext2_gd_b_bitmap_csum_verify(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1033
error = ext2_b_bitmap_validate(fs,bp, cg);
sys/fs/ext2fs/ext2_alloc.c
1044
bbp = (char *)bp->b_data;
sys/fs/ext2fs/ext2_alloc.c
1135
ext2_gd_b_bitmap_csum_set(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1136
bdwrite(bp);
sys/fs/ext2fs/ext2_alloc.c
1141
brelse(bp);
sys/fs/ext2fs/ext2_alloc.c
1154
struct buf *bp;
sys/fs/ext2fs/ext2_alloc.c
1169
(int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_alloc.c
1173
bbp = (char *)bp->b_data;
sys/fs/ext2fs/ext2_alloc.c
1245
bdwrite(bp);
sys/fs/ext2fs/ext2_alloc.c
1252
brelse(bp);
sys/fs/ext2fs/ext2_alloc.c
1260
struct buf *bp;
sys/fs/ext2fs/ext2_alloc.c
1276
bp = getblk(ip->i_devvp, fsbtodb(fs,
sys/fs/ext2fs/ext2_alloc.c
1279
if (!bp)
sys/fs/ext2fs/ext2_alloc.c
1282
vfs_bio_bzero_buf(bp, 0, fs->e2fs_bsize);
sys/fs/ext2fs/ext2_alloc.c
1283
bawrite(bp);
sys/fs/ext2fs/ext2_alloc.c
1311
struct buf *bp;
sys/fs/ext2fs/ext2_alloc.c
1326
(int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_alloc.c
1336
memset(bp->b_data, 0, ibytes - 1);
sys/fs/ext2fs/ext2_alloc.c
1337
ext2_fix_bitmap_tail(bp->b_data, ibytes,
sys/fs/ext2fs/ext2_alloc.c
1343
ext2_gd_i_bitmap_csum_set(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1346
brelse(bp);
sys/fs/ext2fs/ext2_alloc.c
1351
error = ext2_gd_i_bitmap_csum_verify(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1353
brelse(bp);
sys/fs/ext2fs/ext2_alloc.c
1362
brelse(bp);
sys/fs/ext2fs/ext2_alloc.c
1366
ibp = (char *)bp->b_data;
sys/fs/ext2fs/ext2_alloc.c
1383
brelse(bp);
sys/fs/ext2fs/ext2_alloc.c
1409
ext2_gd_i_bitmap_csum_set(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1410
bdwrite(bp);
sys/fs/ext2fs/ext2_alloc.c
1422
struct buf *bp;
sys/fs/ext2fs/ext2_alloc.c
1437
(int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_alloc.c
1441
bbp = (char *)bp->b_data;
sys/fs/ext2fs/ext2_alloc.c
1455
ext2_gd_b_bitmap_csum_set(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1456
bdwrite(bp);
sys/fs/ext2fs/ext2_alloc.c
1468
struct buf *bp;
sys/fs/ext2fs/ext2_alloc.c
1483
(int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_alloc.c
1487
ibp = (char *)bp->b_data;
sys/fs/ext2fs/ext2_alloc.c
1507
ext2_gd_i_bitmap_csum_set(fs, cg, bp);
sys/fs/ext2fs/ext2_alloc.c
1508
bdwrite(bp);
sys/fs/ext2fs/ext2_alloc.c
888
ext2_cg_block_bitmap_init(struct m_ext2fs *fs, int cg, struct buf *bp)
sys/fs/ext2fs/ext2_alloc.c
896
memset(bp->b_data, 0, fs->e2fs_bsize);
sys/fs/ext2fs/ext2_alloc.c
903
setbit(bp->b_data, bit);
sys/fs/ext2fs/ext2_alloc.c
912
setbit(bp->b_data, tmp - start);
sys/fs/ext2fs/ext2_alloc.c
917
setbit(bp->b_data, tmp - start);
sys/fs/ext2fs/ext2_alloc.c
925
setbit(bp->b_data, tmp - start);
sys/fs/ext2fs/ext2_alloc.c
935
bp->b_data);
sys/fs/ext2fs/ext2_alloc.c
945
ext2_b_bitmap_validate(struct m_ext2fs *fs, struct buf *bp, int cg)
sys/fs/ext2fs/ext2_alloc.c
968
if (offset >= max_bit || !isset(bp->b_data, offset)) {
sys/fs/ext2fs/ext2_alloc.c
976
if (offset >= max_bit || !isset(bp->b_data, offset)) {
sys/fs/ext2fs/ext2_balloc.c
103
struct buf *bp, *nbp;
sys/fs/ext2fs/ext2_balloc.c
139
error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_balloc.c
143
bp->b_blkno = fsbtodb(fs, nb);
sys/fs/ext2fs/ext2_balloc.c
145
*bpp = bp;
sys/fs/ext2fs/ext2_balloc.c
161
bp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0);
sys/fs/ext2fs/ext2_balloc.c
162
bp->b_blkno = fsbtodb(fs, newb);
sys/fs/ext2fs/ext2_balloc.c
164
vfs_bio_clrbuf(bp);
sys/fs/ext2fs/ext2_balloc.c
166
ip->i_db[lbn] = dbtofsb(fs, bp->b_blkno);
sys/fs/ext2fs/ext2_balloc.c
168
*bpp = bp;
sys/fs/ext2fs/ext2_balloc.c
196
bp = getblk(vp, indirs[1].in_lbn, fs->e2fs_bsize, 0, 0, 0);
sys/fs/ext2fs/ext2_balloc.c
197
bp->b_blkno = fsbtodb(fs, newb);
sys/fs/ext2fs/ext2_balloc.c
198
vfs_bio_clrbuf(bp);
sys/fs/ext2fs/ext2_balloc.c
203
if ((error = bwrite(bp)) != 0) {
sys/fs/ext2fs/ext2_balloc.c
215
indirs[i].in_lbn, (int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_balloc.c
219
bap = (e2fs_daddr_t *)bp->b_data;
sys/fs/ext2fs/ext2_balloc.c
225
bqrelse(bp);
sys/fs/ext2fs/ext2_balloc.c
231
bp->b_lblkno);
sys/fs/ext2fs/ext2_balloc.c
234
brelse(bp);
sys/fs/ext2fs/ext2_balloc.c
249
brelse(bp);
sys/fs/ext2fs/ext2_balloc.c
258
bwrite(bp);
sys/fs/ext2fs/ext2_balloc.c
260
if (bp->b_bufsize == fs->e2fs_bsize)
sys/fs/ext2fs/ext2_balloc.c
261
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_balloc.c
262
bdwrite(bp);
sys/fs/ext2fs/ext2_balloc.c
271
bp->b_lblkno);
sys/fs/ext2fs/ext2_balloc.c
274
brelse(bp);
sys/fs/ext2fs/ext2_balloc.c
290
bwrite(bp);
sys/fs/ext2fs/ext2_balloc.c
292
if (bp->b_bufsize == fs->e2fs_bsize)
sys/fs/ext2fs/ext2_balloc.c
293
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_balloc.c
294
bdwrite(bp);
sys/fs/ext2fs/ext2_balloc.c
299
brelse(bp);
sys/fs/ext2fs/ext2_balloc.c
60
struct buf *bp = NULL;
sys/fs/ext2fs/ext2_balloc.c
73
bp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0);
sys/fs/ext2fs/ext2_balloc.c
74
if(!bp)
sys/fs/ext2fs/ext2_balloc.c
77
error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_balloc.c
83
bp->b_blkno = fsbtodb(fs, newblk);
sys/fs/ext2fs/ext2_balloc.c
85
vfs_bio_clrbuf(bp);
sys/fs/ext2fs/ext2_balloc.c
87
*bpp = bp;
sys/fs/ext2fs/ext2_bmap.c
157
struct buf *bp;
sys/fs/ext2fs/ext2_bmap.c
165
bp = getblk(vp, lbn, mp->mnt_stat.f_iosize, 0, 0, 0);
sys/fs/ext2fs/ext2_bmap.c
166
if ((bp->b_flags & B_CACHE) == 0) {
sys/fs/ext2fs/ext2_bmap.c
170
bp->b_blkno = blkptrtodb(ump, daddr);
sys/fs/ext2fs/ext2_bmap.c
171
bp->b_iocmd = BIO_READ;
sys/fs/ext2fs/ext2_bmap.c
172
bp->b_flags &= ~B_INVAL;
sys/fs/ext2fs/ext2_bmap.c
173
bp->b_ioflags &= ~BIO_ERROR;
sys/fs/ext2fs/ext2_bmap.c
174
vfs_busy_pages(bp, 0);
sys/fs/ext2fs/ext2_bmap.c
175
bp->b_iooffset = dbtob(bp->b_blkno);
sys/fs/ext2fs/ext2_bmap.c
176
bstrategy(bp);
sys/fs/ext2fs/ext2_bmap.c
180
racct_add_buf(curproc, bp, 0);
sys/fs/ext2fs/ext2_bmap.c
185
error = bufwait(bp);
sys/fs/ext2fs/ext2_bmap.c
187
brelse(bp);
sys/fs/ext2fs/ext2_bmap.c
191
*bpp = bp;
sys/fs/ext2fs/ext2_bmap.c
213
struct buf *bp;
sys/fs/ext2fs/ext2_bmap.c
267
for (bp = NULL, ++ap; --num; ++ap) {
sys/fs/ext2fs/ext2_bmap.c
281
if (bp)
sys/fs/ext2fs/ext2_bmap.c
282
bqrelse(bp);
sys/fs/ext2fs/ext2_bmap.c
283
error = readindir(vp, metalbn, daddr, &bp);
sys/fs/ext2fs/ext2_bmap.c
287
daddr = le32toh(((e2fs_daddr_t *)bp->b_data)[ap->in_off]);
sys/fs/ext2fs/ext2_bmap.c
292
((e2fs_daddr_t *)bp->b_data)[bn - 1],
sys/fs/ext2fs/ext2_bmap.c
293
((e2fs_daddr_t *)bp->b_data)[bn]);
sys/fs/ext2fs/ext2_bmap.c
299
((e2fs_daddr_t *)bp->b_data)[bn],
sys/fs/ext2fs/ext2_bmap.c
300
((e2fs_daddr_t *)bp->b_data)[bn + 1]);
sys/fs/ext2fs/ext2_bmap.c
305
if (bp)
sys/fs/ext2fs/ext2_bmap.c
306
bqrelse(bp);
sys/fs/ext2fs/ext2_bmap.c
329
struct buf *bp;
sys/fs/ext2fs/ext2_bmap.c
339
bp = NULL;
sys/fs/ext2fs/ext2_bmap.c
376
if (bp != NULL)
sys/fs/ext2fs/ext2_bmap.c
377
bqrelse(bp);
sys/fs/ext2fs/ext2_bmap.c
378
error = readindir(vp, ap->in_lbn, daddr, &bp);
sys/fs/ext2fs/ext2_bmap.c
388
daddr = le32toh(((e2fs_daddr_t *)bp->b_data)[off]);
sys/fs/ext2fs/ext2_bmap.c
407
if (bp != NULL)
sys/fs/ext2fs/ext2_bmap.c
408
bqrelse(bp);
sys/fs/ext2fs/ext2_csum.c
144
ext2_extattr_blk_csum_verify(struct inode *ip, struct buf *bp)
sys/fs/ext2fs/ext2_csum.c
148
header = (struct ext2fs_extattr_header *)bp->b_data;
sys/fs/ext2fs/ext2_csum.c
160
ext2_extattr_blk_csum_set(struct inode *ip, struct buf *bp)
sys/fs/ext2fs/ext2_csum.c
167
header = (struct ext2fs_extattr_header *)bp->b_data;
sys/fs/ext2fs/ext2_csum.c
349
ext2_dir_blk_csum_verify(struct inode *ip, struct buf *bp)
sys/fs/ext2fs/ext2_csum.c
360
ep = (struct ext2fs_direct_2 *)bp->b_data;
sys/fs/ext2fs/ext2_csum.c
489
ext2_gd_i_bitmap_csum_verify(struct m_ext2fs *fs, int cg, struct buf *bp)
sys/fs/ext2fs/ext2_csum.c
497
calculated = calculate_crc32c(fs->e2fs_csum_seed, bp->b_data,
sys/fs/ext2fs/ext2_csum.c
515
ext2_gd_i_bitmap_csum_set(struct m_ext2fs *fs, int cg, struct buf *bp)
sys/fs/ext2fs/ext2_csum.c
522
csum = calculate_crc32c(fs->e2fs_csum_seed, bp->b_data,
sys/fs/ext2fs/ext2_csum.c
530
ext2_gd_b_bitmap_csum_verify(struct m_ext2fs *fs, int cg, struct buf *bp)
sys/fs/ext2fs/ext2_csum.c
539
calculated = calculate_crc32c(fs->e2fs_csum_seed, bp->b_data, size);
sys/fs/ext2fs/ext2_csum.c
556
ext2_gd_b_bitmap_csum_set(struct m_ext2fs *fs, int cg, struct buf *bp)
sys/fs/ext2fs/ext2_csum.c
564
csum = calculate_crc32c(fs->e2fs_csum_seed, bp->b_data, size);
sys/fs/ext2fs/ext2_extattr.c
1004
return (bwrite(bp));
sys/fs/ext2fs/ext2_extattr.c
1067
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
1079
fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extattr.c
1085
header = EXT2_HDR(bp);
sys/fs/ext2fs/ext2_extattr.c
1088
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1092
error = ext2_extattr_block_check(ip, bp);
sys/fs/ext2fs/ext2_extattr.c
1094
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1099
error = ext2_extattr_block_clone(ip, &bp);
sys/fs/ext2fs/ext2_extattr.c
1101
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1105
header = EXT2_HDR(bp);
sys/fs/ext2fs/ext2_extattr.c
1109
for (entry = EXT2_FIRST_ENTRY(bp); !EXT2_IS_LAST_ENTRY(entry);
sys/fs/ext2fs/ext2_extattr.c
1119
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1129
size = ext2_extattr_get_size(EXT2_FIRST_ENTRY(bp), entry,
sys/fs/ext2fs/ext2_extattr.c
1132
if (size > bp->b_bufsize) {
sys/fs/ext2fs/ext2_extattr.c
1133
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1137
ext2_extattr_set_exist_entry(bp->b_data, EXT2_FIRST_ENTRY(bp),
sys/fs/ext2fs/ext2_extattr.c
1138
entry, bp->b_data + bp->b_bufsize, uio);
sys/fs/ext2fs/ext2_extattr.c
1140
size = ext2_extattr_get_size(EXT2_FIRST_ENTRY(bp), NULL,
sys/fs/ext2fs/ext2_extattr.c
1143
if (size > bp->b_bufsize) {
sys/fs/ext2fs/ext2_extattr.c
1144
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1148
entry = ext2_extattr_set_new_entry(bp->b_data, EXT2_FIRST_ENTRY(bp),
sys/fs/ext2fs/ext2_extattr.c
1149
name, attrnamespace, bp->b_data + bp->b_bufsize, uio);
sys/fs/ext2fs/ext2_extattr.c
1154
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1160
ext2_extattr_blk_csum_set(ip, bp);
sys/fs/ext2fs/ext2_extattr.c
1162
return (bwrite(bp));
sys/fs/ext2fs/ext2_extattr.c
1179
bp = getblk(ip->i_devvp, fsbtodb(fs, ip->i_facl), fs->e2fs_bsize, 0, 0, 0);
sys/fs/ext2fs/ext2_extattr.c
1180
if (!bp) {
sys/fs/ext2fs/ext2_extattr.c
1188
header = EXT2_HDR(bp);
sys/fs/ext2fs/ext2_extattr.c
1194
memcpy(bp->b_data, header, sizeof(struct ext2fs_extattr_header));
sys/fs/ext2fs/ext2_extattr.c
1195
memset(EXT2_FIRST_ENTRY(bp), 0, sizeof(uint32_t));
sys/fs/ext2fs/ext2_extattr.c
1197
entry = ext2_extattr_set_new_entry(bp->b_data, EXT2_FIRST_ENTRY(bp),
sys/fs/ext2fs/ext2_extattr.c
1198
name, attrnamespace, bp->b_data + bp->b_bufsize, uio);
sys/fs/ext2fs/ext2_extattr.c
1203
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1208
ext2_extattr_blk_csum_set(ip, bp);
sys/fs/ext2fs/ext2_extattr.c
1210
return (bwrite(bp));
sys/fs/ext2fs/ext2_extattr.c
1216
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
1226
fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extattr.c
1232
header = EXT2_HDR(bp);
sys/fs/ext2fs/ext2_extattr.c
1235
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1239
error = ext2_extattr_check(EXT2_FIRST_ENTRY(bp),
sys/fs/ext2fs/ext2_extattr.c
1240
bp->b_data + bp->b_bufsize);
sys/fs/ext2fs/ext2_extattr.c
1242
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
1248
bwrite(bp);
sys/fs/ext2fs/ext2_extattr.c
1251
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
175
ext2_extattr_block_check(struct inode *ip, struct buf *bp)
sys/fs/ext2fs/ext2_extattr.c
180
header = (struct ext2fs_extattr_header *)bp->b_data;
sys/fs/ext2fs/ext2_extattr.c
183
bp->b_data + bp->b_bufsize);
sys/fs/ext2fs/ext2_extattr.c
187
return (ext2_extattr_blk_csum_verify(ip, bp));
sys/fs/ext2fs/ext2_extattr.c
195
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
206
(int)fs->e2fs_bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_extattr.c
207
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
212
((char *)bp->b_data +
sys/fs/ext2fs/ext2_extattr.c
220
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
227
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
241
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
259
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
269
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
279
fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extattr.c
285
header = EXT2_HDR(bp);
sys/fs/ext2fs/ext2_extattr.c
288
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
292
error = ext2_extattr_block_check(ip, bp);
sys/fs/ext2fs/ext2_extattr.c
294
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
298
for (entry = EXT2_FIRST_ENTRY(bp); !EXT2_IS_LAST_ENTRY(entry);
sys/fs/ext2fs/ext2_extattr.c
308
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
326
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
336
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
347
(int)fs->e2fs_bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_extattr.c
348
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
353
((char *)bp->b_data +
sys/fs/ext2fs/ext2_extattr.c
361
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
368
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
382
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
396
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
401
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
411
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
421
fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extattr.c
427
header = EXT2_HDR(bp);
sys/fs/ext2fs/ext2_extattr.c
430
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
434
error = ext2_extattr_block_check(ip, bp);
sys/fs/ext2fs/ext2_extattr.c
436
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
440
for (entry = EXT2_FIRST_ENTRY(bp); !EXT2_IS_LAST_ENTRY(entry);
sys/fs/ext2fs/ext2_extattr.c
450
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
460
error = uiomove(bp->b_data +
sys/fs/ext2fs/ext2_extattr.c
464
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
469
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
541
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
552
(int)fs->e2fs_bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_extattr.c
553
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
558
((char *)bp->b_data +
sys/fs/ext2fs/ext2_extattr.c
566
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
573
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
586
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
594
return (bwrite(bp));
sys/fs/ext2fs/ext2_extattr.c
608
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
618
return (bwrite(bp));
sys/fs/ext2fs/ext2_extattr.c
622
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
673
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
683
fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extattr.c
689
header = EXT2_HDR(bp);
sys/fs/ext2fs/ext2_extattr.c
692
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
696
error = ext2_extattr_block_check(ip, bp);
sys/fs/ext2fs/ext2_extattr.c
698
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
703
error = ext2_extattr_block_clone(ip, &bp);
sys/fs/ext2fs/ext2_extattr.c
705
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
711
entry = EXT2_FIRST_ENTRY(bp);
sys/fs/ext2fs/ext2_extattr.c
719
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
730
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
735
for (entry = EXT2_FIRST_ENTRY(bp); !EXT2_IS_LAST_ENTRY(entry);
sys/fs/ext2fs/ext2_extattr.c
745
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
751
ext2_extattr_delete_entry(bp->b_data,
sys/fs/ext2fs/ext2_extattr.c
752
EXT2_FIRST_ENTRY(bp), entry,
sys/fs/ext2fs/ext2_extattr.c
753
bp->b_data + bp->b_bufsize);
sys/fs/ext2fs/ext2_extattr.c
755
return (bwrite(bp));
sys/fs/ext2fs/ext2_extattr.c
759
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
906
struct buf *bp;
sys/fs/ext2fs/ext2_extattr.c
918
(int)fs->e2fs_bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_extattr.c
919
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
924
((char *)bp->b_data +
sys/fs/ext2fs/ext2_extattr.c
932
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
939
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
954
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
971
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
983
brelse(bp);
sys/fs/ext2fs/ext2_extattr.c
995
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
1018
(int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extents.c
1023
neh = (struct ext4_extent_header *)bp->b_data;
sys/fs/ext2fs/ext2_extents.c
1044
ext2_extent_blk_csum_set(ip, bp->b_data);
sys/fs/ext2fs/ext2_extents.c
1045
bwrite(bp);
sys/fs/ext2fs/ext2_extents.c
1046
bp = NULL;
sys/fs/ext2fs/ext2_extents.c
1061
if (bp)
sys/fs/ext2fs/ext2_extents.c
1062
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
108
fsbtodb(fs, blk), (int)fs->e2fs_bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_extents.c
1084
struct buf *bp;
sys/fs/ext2fs/ext2_extents.c
109
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
1095
bp = getblk(ip->i_devvp, fsbtodb(fs, newblk), fs->e2fs_bsize, 0, 0, 0);
sys/fs/ext2fs/ext2_extents.c
1096
if (!bp) {
sys/fs/ext2fs/ext2_extents.c
1102
memmove(bp->b_data, curpath->ep_header, sizeof(ip->i_data));
sys/fs/ext2fs/ext2_extents.c
1105
neh = ext4_ext_block_header(bp->b_data);
sys/fs/ext2fs/ext2_extents.c
1113
ext2_extent_blk_csum_set(ip, bp->b_data);
sys/fs/ext2fs/ext2_extents.c
1114
error = bwrite(bp);
sys/fs/ext2fs/ext2_extents.c
1120
bp = NULL;
sys/fs/ext2fs/ext2_extents.c
1133
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
114
(struct ext4_extent_header *)bp->b_data, depth);
sys/fs/ext2fs/ext2_extents.c
116
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
1395
struct buf *bp = NULL;
sys/fs/ext2fs/ext2_extents.c
1481
fs->e2fs_bsize, cred, &bp);
sys/fs/ext2fs/ext2_extents.c
1483
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
1485
*bpp = bp;
sys/fs/ext2fs/ext2_extents.c
1640
struct buf *bp;
sys/fs/ext2fs/ext2_extents.c
1645
fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extents.c
1650
eh = ext4_ext_block_header(bp->b_data);
sys/fs/ext2fs/ext2_extents.c
1661
return (bp);
sys/fs/ext2fs/ext2_extents.c
1664
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
1689
struct buf *bp;
sys/fs/ext2fs/ext2_extents.c
1736
bp = ext4_read_extent_tree_block(ip,
sys/fs/ext2fs/ext2_extents.c
1739
if (!bp) {
sys/fs/ext2fs/ext2_extents.c
1744
ext4_ext_fill_path_bdata(&path[i+1], bp,
sys/fs/ext2fs/ext2_extents.c
1746
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
545
struct buf *bp, uint64_t blk)
sys/fs/ext2fs/ext2_extents.c
551
path->ep_data = malloc(bp->b_bufsize, M_EXT2EXTENTS, M_WAITOK);
sys/fs/ext2fs/ext2_extents.c
552
memcpy(path->ep_data, bp->b_data, bp->b_bufsize);
sys/fs/ext2fs/ext2_extents.c
559
ext4_ext_fill_path_buf(struct ext4_extent_path *path, struct buf *bp)
sys/fs/ext2fs/ext2_extents.c
565
memcpy(bp->b_data, path->ep_data, bp->b_bufsize);
sys/fs/ext2fs/ext2_extents.c
601
struct buf *bp;
sys/fs/ext2fs/ext2_extents.c
638
ip->i_e2fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_extents.c
648
brelse(bp);
sys/fs/ext2fs/ext2_extents.c
652
ext4_ext_fill_path_bdata(&path[ppos], bp, blk);
sys/fs/ext2fs/ext2_extents.c
653
bqrelse(bp);
sys/fs/ext2fs/ext2_extents.c
813
struct buf *bp;
sys/fs/ext2fs/ext2_extents.c
824
bp = getblk(ip->i_devvp, fsbtodb(fs, blk),
sys/fs/ext2fs/ext2_extents.c
826
if (!bp)
sys/fs/ext2fs/ext2_extents.c
828
ext4_ext_fill_path_buf(path, bp);
sys/fs/ext2fs/ext2_extents.c
829
ext2_extent_blk_csum_set(ip, bp->b_data);
sys/fs/ext2fs/ext2_extents.c
830
error = bwrite(bp);
sys/fs/ext2fs/ext2_extents.c
87
struct buf *bp;
sys/fs/ext2fs/ext2_extents.c
924
struct buf *bp;
sys/fs/ext2fs/ext2_extents.c
936
bp = NULL;
sys/fs/ext2fs/ext2_extents.c
963
bp = getblk(ip->i_devvp, fsbtodb(fs, newblk), fs->e2fs_bsize, 0, 0, 0);
sys/fs/ext2fs/ext2_extents.c
964
if (!bp) {
sys/fs/ext2fs/ext2_extents.c
969
neh = ext4_ext_block_header(bp->b_data);
sys/fs/ext2fs/ext2_extents.c
997
ext2_extent_blk_csum_set(ip, bp->b_data);
sys/fs/ext2fs/ext2_extents.c
998
bwrite(bp);
sys/fs/ext2fs/ext2_extents.c
999
bp = NULL;
sys/fs/ext2fs/ext2_htree.c
117
struct buf *bp;
sys/fs/ext2fs/ext2_htree.c
143
ip->i_e2fs->e2fs_bsize, NULL, &bp) != 0)
sys/fs/ext2fs/ext2_htree.c
147
level->h_bp = bp;
sys/fs/ext2fs/ext2_htree.c
149
((struct ext2fs_htree_node *)bp->b_data)->h_entries;
sys/fs/ext2fs/ext2_htree.c
209
struct buf *bp = info->h_levels[i].h_bp;
sys/fs/ext2fs/ext2_htree.c
211
if (bp != NULL)
sys/fs/ext2fs/ext2_htree.c
212
brelse(bp);
sys/fs/ext2fs/ext2_htree.c
263
struct buf *bp = NULL;
sys/fs/ext2fs/ext2_htree.c
279
if (ext2_blkatoff(vp, 0, NULL, &bp) != 0)
sys/fs/ext2fs/ext2_htree.c
283
info->h_levels[0].h_bp = bp;
sys/fs/ext2fs/ext2_htree.c
284
rootp = (struct ext2fs_htree_root *)bp->b_data;
sys/fs/ext2fs/ext2_htree.c
327
level_info->h_bp = bp;
sys/fs/ext2fs/ext2_htree.c
335
NULL, &bp) != 0)
sys/fs/ext2fs/ext2_htree.c
337
entp = ((struct ext2fs_htree_node *)bp->b_data)->h_entries;
sys/fs/ext2fs/ext2_htree.c
339
info->h_levels[info->h_levels_num - 1].h_bp = bp;
sys/fs/ext2fs/ext2_htree.c
360
struct buf *bp;
sys/fs/ext2fs/ext2_htree.c
382
if (ext2_blkatoff(vp, blk * bsize, NULL, &bp) != 0) {
sys/fs/ext2fs/ext2_htree.c
397
if (ext2_search_dirblock(ip, bp->b_data, &found,
sys/fs/ext2fs/ext2_htree.c
400
brelse(bp);
sys/fs/ext2fs/ext2_htree.c
406
*bpp = bp;
sys/fs/ext2fs/ext2_htree.c
411
brelse(bp);
sys/fs/ext2fs/ext2_htree.c
454
struct buf *bp = info->h_levels[i].h_bp;
sys/fs/ext2fs/ext2_htree.c
455
ext2_dx_csum_set(ip, (struct ext2fs_direct_2 *)bp->b_data);
sys/fs/ext2fs/ext2_htree.c
456
error = bwrite(bp);
sys/fs/ext2fs/ext2_htree.c
669
struct buf *bp = NULL;
sys/fs/ext2fs/ext2_htree.c
691
if ((error = ext2_blkatoff(vp, 0, NULL, &bp)) != 0)
sys/fs/ext2fs/ext2_htree.c
694
root = (struct ext2fs_htree_root *)bp->b_data;
sys/fs/ext2fs/ext2_htree.c
736
ext2_dx_csum_set(dp, (struct ext2fs_direct_2 *)bp->b_data);
sys/fs/ext2fs/ext2_htree.c
738
bdwrite(bp);
sys/fs/ext2fs/ext2_htree.c
741
error = bwrite(bp);
sys/fs/ext2fs/ext2_htree.c
765
if (bp != NULL)
sys/fs/ext2fs/ext2_htree.c
766
brelse(bp);
sys/fs/ext2fs/ext2_htree.c
782
struct buf *bp = NULL;
sys/fs/ext2fs/ext2_htree.c
913
error = ext2_blkatoff(dvp, blknum * blksize, NULL, &bp);
sys/fs/ext2fs/ext2_htree.c
920
ext2_htree_split_dirblock(ip, (char *)bp->b_data, newdirblock, blksize,
sys/fs/ext2fs/ext2_htree.c
936
ext2_dirent_csum_set(ip, (struct ext2fs_direct_2 *)bp->b_data);
sys/fs/ext2fs/ext2_htree.c
937
error = bwrite(bp);
sys/fs/ext2fs/ext2_htree.c
951
if (bp != NULL && !write_bp)
sys/fs/ext2fs/ext2_htree.c
952
brelse(bp);
sys/fs/ext2fs/ext2_inode.c
101
bdwrite(bp);
sys/fs/ext2fs/ext2_inode.c
123
struct buf *bp;
sys/fs/ext2fs/ext2_inode.c
152
bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, 0, 0);
sys/fs/ext2fs/ext2_inode.c
153
if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0) {
sys/fs/ext2fs/ext2_inode.c
154
bp->b_iocmd = BIO_READ;
sys/fs/ext2fs/ext2_inode.c
155
if (bp->b_bcount > bp->b_bufsize)
sys/fs/ext2fs/ext2_inode.c
157
bp->b_blkno = dbn;
sys/fs/ext2fs/ext2_inode.c
158
vfs_busy_pages(bp, 0);
sys/fs/ext2fs/ext2_inode.c
159
bp->b_iooffset = dbtob(bp->b_blkno);
sys/fs/ext2fs/ext2_inode.c
160
bstrategy(bp);
sys/fs/ext2fs/ext2_inode.c
161
error = bufwait(bp);
sys/fs/ext2fs/ext2_inode.c
164
brelse(bp);
sys/fs/ext2fs/ext2_inode.c
168
bap = (e2fs_daddr_t *)bp->b_data;
sys/fs/ext2fs/ext2_inode.c
174
bp->b_flags |= B_INVAL;
sys/fs/ext2fs/ext2_inode.c
176
bdwrite(bp);
sys/fs/ext2fs/ext2_inode.c
178
error = bwrite(bp);
sys/fs/ext2fs/ext2_inode.c
237
struct buf *bp;
sys/fs/ext2fs/ext2_inode.c
265
error = ext2_balloc(oip, lbn, offset + 1, cred, &bp, flags);
sys/fs/ext2fs/ext2_inode.c
271
if (bp->b_bufsize == fs->e2fs_bsize)
sys/fs/ext2fs/ext2_inode.c
272
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_inode.c
274
bwrite(bp);
sys/fs/ext2fs/ext2_inode.c
276
bdwrite(bp);
sys/fs/ext2fs/ext2_inode.c
278
bawrite(bp);
sys/fs/ext2fs/ext2_inode.c
296
error = ext2_balloc(oip, lbn, offset, cred, &bp, flags);
sys/fs/ext2fs/ext2_inode.c
301
bzero((char *)bp->b_data + offset, (u_int)(size - offset));
sys/fs/ext2fs/ext2_inode.c
302
allocbuf(bp, size);
sys/fs/ext2fs/ext2_inode.c
303
if (bp->b_bufsize == fs->e2fs_bsize)
sys/fs/ext2fs/ext2_inode.c
304
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_inode.c
306
bwrite(bp);
sys/fs/ext2fs/ext2_inode.c
308
bdwrite(bp);
sys/fs/ext2fs/ext2_inode.c
310
bawrite(bp);
sys/fs/ext2fs/ext2_inode.c
472
struct buf *bp;
sys/fs/ext2fs/ext2_inode.c
489
error = ext2_balloc(oip, lbn, offset + 1, cred, &bp, flags);
sys/fs/ext2fs/ext2_inode.c
495
if (bp->b_bufsize == fs->e2fs_bsize)
sys/fs/ext2fs/ext2_inode.c
496
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_inode.c
498
bwrite(bp);
sys/fs/ext2fs/ext2_inode.c
500
bdwrite(bp);
sys/fs/ext2fs/ext2_inode.c
502
bawrite(bp);
sys/fs/ext2fs/ext2_inode.c
518
error = ext2_balloc(oip, lbn, offset, cred, &bp, flags);
sys/fs/ext2fs/ext2_inode.c
524
bzero((char *)bp->b_data + offset, (u_int)(size - offset));
sys/fs/ext2fs/ext2_inode.c
525
allocbuf(bp, size);
sys/fs/ext2fs/ext2_inode.c
526
if (bp->b_bufsize == fs->e2fs_bsize)
sys/fs/ext2fs/ext2_inode.c
527
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_inode.c
529
bwrite(bp);
sys/fs/ext2fs/ext2_inode.c
531
bdwrite(bp);
sys/fs/ext2fs/ext2_inode.c
533
bawrite(bp);
sys/fs/ext2fs/ext2_inode.c
73
struct buf *bp;
sys/fs/ext2fs/ext2_inode.c
88
(int)fs->e2fs_bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_inode.c
89
brelse(bp);
sys/fs/ext2fs/ext2_inode.c
92
error = ext2_i2ei(ip, (struct ext2fs_dinode *)((char *)bp->b_data +
sys/fs/ext2fs/ext2_inode.c
95
brelse(bp);
sys/fs/ext2fs/ext2_inode.c
99
return (bwrite(bp));
sys/fs/ext2fs/ext2_lookup.c
1007
&bp)) != 0)
sys/fs/ext2fs/ext2_lookup.c
1051
ext2_dirent_csum_set(dp, (struct ext2fs_direct_2 *)bp->b_data);
sys/fs/ext2fs/ext2_lookup.c
1053
bdwrite(bp);
sys/fs/ext2fs/ext2_lookup.c
1056
error = bwrite(bp);
sys/fs/ext2fs/ext2_lookup.c
1079
struct buf *bp;
sys/fs/ext2fs/ext2_lookup.c
1089
&bp)) != 0)
sys/fs/ext2fs/ext2_lookup.c
1092
ext2_dirent_csum_set(dp, (struct ext2fs_direct_2 *)bp->b_data);
sys/fs/ext2fs/ext2_lookup.c
1093
error = bwrite(bp);
sys/fs/ext2fs/ext2_lookup.c
1101
(char **)&ep, &bp)) != 0)
sys/fs/ext2fs/ext2_lookup.c
1111
ext2_dirent_csum_set(dp, (struct ext2fs_direct_2 *)bp->b_data);
sys/fs/ext2fs/ext2_lookup.c
1113
bdwrite(bp);
sys/fs/ext2fs/ext2_lookup.c
1115
error = bwrite(bp);
sys/fs/ext2fs/ext2_lookup.c
1128
struct buf *bp;
sys/fs/ext2fs/ext2_lookup.c
1134
&bp)) != 0)
sys/fs/ext2fs/ext2_lookup.c
1142
ext2_dirent_csum_set(dp, (struct ext2fs_direct_2 *)bp->b_data);
sys/fs/ext2fs/ext2_lookup.c
1143
error = bwrite(bp);
sys/fs/ext2fs/ext2_lookup.c
145
struct buf *bp;
sys/fs/ext2fs/ext2_lookup.c
183
error = ext2_blkatoff(vp, uio->uio_offset, NULL, &bp);
sys/fs/ext2fs/ext2_lookup.c
186
if (bp->b_offset + bp->b_bcount > ip->i_size)
sys/fs/ext2fs/ext2_lookup.c
187
readcnt = ip->i_size - bp->b_offset;
sys/fs/ext2fs/ext2_lookup.c
189
readcnt = bp->b_bcount;
sys/fs/ext2fs/ext2_lookup.c
190
skipcnt = (size_t)(uio->uio_offset - bp->b_offset) &
sys/fs/ext2fs/ext2_lookup.c
192
offset = bp->b_offset + skipcnt;
sys/fs/ext2fs/ext2_lookup.c
193
dp = (struct ext2fs_direct_2 *)&bp->b_data[skipcnt];
sys/fs/ext2fs/ext2_lookup.c
194
edp = (struct ext2fs_direct_2 *)&bp->b_data[readcnt];
sys/fs/ext2fs/ext2_lookup.c
256
bqrelse(bp);
sys/fs/ext2fs/ext2_lookup.c
319
struct buf *bp; /* a buffer of directory entries */
sys/fs/ext2fs/ext2_lookup.c
348
bp = NULL;
sys/fs/ext2fs/ext2_lookup.c
381
&bp, &entryoffsetinblock, &i_offset, &prevoff,
sys/fs/ext2fs/ext2_lookup.c
384
ep = (struct ext2fs_direct_2 *)((char *)bp->b_data +
sys/fs/ext2fs/ext2_lookup.c
419
&bp)))
sys/fs/ext2fs/ext2_lookup.c
433
if (bp != NULL)
sys/fs/ext2fs/ext2_lookup.c
434
brelse(bp);
sys/fs/ext2fs/ext2_lookup.c
435
error = ext2_blkatoff(vdp, (off_t)i_offset, NULL, &bp);
sys/fs/ext2fs/ext2_lookup.c
445
error = ext2_search_dirblock(dp, bp->b_data, &entry_found,
sys/fs/ext2fs/ext2_lookup.c
450
brelse(bp);
sys/fs/ext2fs/ext2_lookup.c
454
ep = (struct ext2fs_direct_2 *)((char *)bp->b_data +
sys/fs/ext2fs/ext2_lookup.c
472
if (bp != NULL)
sys/fs/ext2fs/ext2_lookup.c
473
brelse(bp);
sys/fs/ext2fs/ext2_lookup.c
539
brelse(bp);
sys/fs/ext2fs/ext2_lookup.c
542
brelse(bp);
sys/fs/ext2fs/ext2_lookup.c
978
struct buf *bp;
sys/fs/ext2fs/ext2_subr.c
68
struct buf *bp;
sys/fs/ext2fs/ext2_subr.c
77
if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_subr.c
78
brelse(bp);
sys/fs/ext2fs/ext2_subr.c
81
error = ext2_dir_blk_csum_verify(ip, bp);
sys/fs/ext2fs/ext2_subr.c
83
brelse(bp);
sys/fs/ext2fs/ext2_subr.c
87
*res = (char *)bp->b_data + blkoff(fs, offset);
sys/fs/ext2fs/ext2_subr.c
89
*bpp = bp;
sys/fs/ext2fs/ext2_vfsops.c
1199
struct buf *bp;
sys/fs/ext2fs/ext2_vfsops.c
1239
(int)fs->e2fs_bsize, NOCRED, &bp)) != 0) {
sys/fs/ext2fs/ext2_vfsops.c
1246
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
1252
error = ext2_ei2i((struct ext2fs_dinode *)((char *)bp->b_data +
sys/fs/ext2fs/ext2_vfsops.c
1255
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
1279
bqrelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
1360
struct buf *bp;
sys/fs/ext2fs/ext2_vfsops.c
1377
error = bread(mp->um_devvp, SBLOCK, SBLOCKBLKSIZE, NOCRED, &bp);
sys/fs/ext2fs/ext2_vfsops.c
1381
memcpy((char *)bp->b_data + SBLOCKOFFSET, (caddr_t)es,
sys/fs/ext2fs/ext2_vfsops.c
1384
error = bwrite(bp);
sys/fs/ext2fs/ext2_vfsops.c
1386
bawrite(bp);
sys/fs/ext2fs/ext2_vfsops.c
1399
struct buf *bp;
sys/fs/ext2fs/ext2_vfsops.c
1410
bp = getblk(mp->um_devvp, fsbtodb(fs,
sys/fs/ext2fs/ext2_vfsops.c
1414
memcpy(bp->b_data, &fs->e2fs_gd[
sys/fs/ext2fs/ext2_vfsops.c
1420
memcpy(bp->b_data + j * E2FS_REV0_GD_SIZE,
sys/fs/ext2fs/ext2_vfsops.c
1424
error = bwrite(bp);
sys/fs/ext2fs/ext2_vfsops.c
1426
bawrite(bp);
sys/fs/ext2fs/ext2_vfsops.c
459
struct buf *bp;
sys/fs/ext2fs/ext2_vfsops.c
653
fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_vfsops.c
666
bp->b_data, fs->e2fs_bsize);
sys/fs/ext2fs/ext2_vfsops.c
671
bp->b_data + j * E2FS_REV0_GD_SIZE,
sys/fs/ext2fs/ext2_vfsops.c
674
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
675
bp = NULL;
sys/fs/ext2fs/ext2_vfsops.c
738
struct buf *bp;
sys/fs/ext2fs/ext2_vfsops.c
760
if ((error = bread(devvp, SBLOCK, SBLOCKBLKSIZE, NOCRED, &bp)) != 0)
sys/fs/ext2fs/ext2_vfsops.c
762
es = (struct ext2fs *)((char *)bp->b_data + SBLOCKOFFSET);
sys/fs/ext2fs/ext2_vfsops.c
764
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
768
bcopy(bp->b_data, fs->e2fs, sizeof(struct ext2fs));
sys/fs/ext2fs/ext2_vfsops.c
771
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
775
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
807
(int)fs->e2fs_bsize, NOCRED, &bp);
sys/fs/ext2fs/ext2_vfsops.c
814
error = ext2_ei2i((struct ext2fs_dinode *)((char *)bp->b_data +
sys/fs/ext2fs/ext2_vfsops.c
817
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
835
struct buf *bp;
sys/fs/ext2fs/ext2_vfsops.c
849
bp = NULL;
sys/fs/ext2fs/ext2_vfsops.c
880
if ((error = bread(devvp, SBLOCK, SBLOCKBLKSIZE, NOCRED, &bp)) != 0)
sys/fs/ext2fs/ext2_vfsops.c
882
es = (struct ext2fs *)((char *)bp->b_data + SBLOCKOFFSET);
sys/fs/ext2fs/ext2_vfsops.c
939
brelse(bp);
sys/fs/ext2fs/ext2_vfsops.c
940
bp = NULL;
sys/fs/ext2fs/ext2_vfsops.c
984
if (bp)
sys/fs/ext2fs/ext2_vfsops.c
985
brelse(bp);
sys/fs/ext2fs/ext2_vnops.c
1568
struct buf *bp = ap->a_bp;
sys/fs/ext2fs/ext2_vnops.c
1576
if (bp->b_blkno == bp->b_lblkno) {
sys/fs/ext2fs/ext2_vnops.c
1578
error = ext4_bmapext(vp, bp->b_lblkno, &blkno, NULL, NULL);
sys/fs/ext2fs/ext2_vnops.c
1580
error = ext2_bmaparray(vp, bp->b_lblkno, &blkno, NULL, NULL);
sys/fs/ext2fs/ext2_vnops.c
1582
bp->b_blkno = blkno;
sys/fs/ext2fs/ext2_vnops.c
1584
bp->b_error = error;
sys/fs/ext2fs/ext2_vnops.c
1585
bp->b_ioflags |= BIO_ERROR;
sys/fs/ext2fs/ext2_vnops.c
1586
bufdone(bp);
sys/fs/ext2fs/ext2_vnops.c
1589
if ((long)bp->b_blkno == -1)
sys/fs/ext2fs/ext2_vnops.c
1590
vfs_bio_clrbuf(bp);
sys/fs/ext2fs/ext2_vnops.c
1592
if ((long)bp->b_blkno == -1) {
sys/fs/ext2fs/ext2_vnops.c
1593
bufdone(bp);
sys/fs/ext2fs/ext2_vnops.c
1596
bp->b_iooffset = dbtob(bp->b_blkno);
sys/fs/ext2fs/ext2_vnops.c
1598
BO_STRATEGY(bo, bp);
sys/fs/ext2fs/ext2_vnops.c
2031
struct buf *bp;
sys/fs/ext2fs/ext2_vnops.c
2066
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
sys/fs/ext2fs/ext2_vnops.c
2081
error = bread(vp, lbn, size, NOCRED, &bp);
sys/fs/ext2fs/ext2_vnops.c
2085
0, &bp);
sys/fs/ext2fs/ext2_vnops.c
2090
size, &nextlbn, &nextsize, 1, NOCRED, &bp);
sys/fs/ext2fs/ext2_vnops.c
2092
error = bread(vp, lbn, size, NOCRED, &bp);
sys/fs/ext2fs/ext2_vnops.c
2094
brelse(bp);
sys/fs/ext2fs/ext2_vnops.c
2095
bp = NULL;
sys/fs/ext2fs/ext2_vnops.c
2106
size -= bp->b_resid;
sys/fs/ext2fs/ext2_vnops.c
2112
error = uiomove((char *)bp->b_data + blkoffset,
sys/fs/ext2fs/ext2_vnops.c
2116
vfs_bio_brelse(bp, ioflag);
sys/fs/ext2fs/ext2_vnops.c
2125
if (bp != NULL)
sys/fs/ext2fs/ext2_vnops.c
2126
vfs_bio_brelse(bp, ioflag);
sys/fs/ext2fs/ext2_vnops.c
2171
struct buf *bp;
sys/fs/ext2fs/ext2_vnops.c
2248
ap->a_cred, &bp, flags);
sys/fs/ext2fs/ext2_vnops.c
2253
bp->b_flags |= B_NOCACHE;
sys/fs/ext2fs/ext2_vnops.c
2256
size = blksize(fs, ip, lbn) - bp->b_resid;
sys/fs/ext2fs/ext2_vnops.c
2261
uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
sys/fs/ext2fs/ext2_vnops.c
2279
if (error != 0 && (bp->b_flags & B_CACHE) == 0 &&
sys/fs/ext2fs/ext2_vnops.c
2281
vfs_bio_clrbuf(bp);
sys/fs/ext2fs/ext2_vnops.c
2283
vfs_bio_set_flags(bp, ioflag);
sys/fs/ext2fs/ext2_vnops.c
2293
(void)bwrite(bp);
sys/fs/ext2fs/ext2_vnops.c
2297
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_vnops.c
2298
bawrite(bp);
sys/fs/ext2fs/ext2_vnops.c
2301
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_vnops.c
2302
cluster_write(vp, &ip->i_clusterw, bp,
sys/fs/ext2fs/ext2_vnops.c
2305
bawrite(bp);
sys/fs/ext2fs/ext2_vnops.c
2308
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_vnops.c
2309
bawrite(bp);
sys/fs/ext2fs/ext2_vnops.c
2311
bp->b_flags |= B_CLUSTEROK;
sys/fs/ext2fs/ext2_vnops.c
2312
bdwrite(bp);
sys/fs/fuse/fuse_io.c
129
struct buf *bp;
sys/fs/fuse/fuse_io.c
150
for (err = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
sys/fs/fuse/fuse_io.c
175
err = bread(vp, lbn, bcount, NOCRED, &bp);
sys/fs/fuse/fuse_io.c
182
totread, seqcount, 0, &bp);
sys/fs/fuse/fuse_io.c
186
NOCRED, &bp);
sys/fs/fuse/fuse_io.c
189
err = bread(vp, lbn, bcount, NOCRED, &bp);
sys/fs/fuse/fuse_io.c
193
brelse(bp);
sys/fs/fuse/fuse_io.c
194
bp = NULL;
sys/fs/fuse/fuse_io.c
207
if (on < bcount - bp->b_resid)
sys/fs/fuse/fuse_io.c
208
n = MIN((unsigned)(bcount - bp->b_resid - on),
sys/fs/fuse/fuse_io.c
211
SDT_PROBE2(fusefs, , io, read_bio_backend_feed, n, bp);
sys/fs/fuse/fuse_io.c
212
err = uiomove(bp->b_data + on, n, uio);
sys/fs/fuse/fuse_io.c
214
vfs_bio_brelse(bp, ioflag);
sys/fs/fuse/fuse_io.c
216
uio->uio_resid, n, bp);
sys/fs/fuse/fuse_io.c
217
if (bp->b_resid > 0) {
sys/fs/fuse/fuse_io.c
480
struct buf *bp;
sys/fs/fuse/fuse_io.c
544
bp = getblk(vp, lbn, on, PCATCH, 0, 0);
sys/fs/fuse/fuse_io.c
545
if (bp != NULL) {
sys/fs/fuse/fuse_io.c
546
uint32_t save = bp->b_flags & B_CACHE;
sys/fs/fuse/fuse_io.c
547
allocbuf(bp, bcount);
sys/fs/fuse/fuse_io.c
548
bp->b_flags |= save;
sys/fs/fuse/fuse_io.c
551
bp = getblk(vp, lbn, bcount, PCATCH, 0, 0);
sys/fs/fuse/fuse_io.c
553
if (!bp) {
sys/fs/fuse/fuse_io.c
568
brelse(bp);
sys/fs/fuse/fuse_io.c
595
bp->b_flags |= B_CACHE;
sys/fs/fuse/fuse_io.c
596
bp->b_flags &= ~B_INVAL;
sys/fs/fuse/fuse_io.c
597
bp->b_ioflags &= ~BIO_ERROR;
sys/fs/fuse/fuse_io.c
599
if ((bp->b_flags & B_CACHE) == 0) {
sys/fs/fuse/fuse_io.c
600
bp->b_iocmd = BIO_READ;
sys/fs/fuse/fuse_io.c
601
vfs_busy_pages(bp, 0);
sys/fs/fuse/fuse_io.c
602
fuse_io_strategy(vp, bp);
sys/fs/fuse/fuse_io.c
603
if ((err = bp->b_error)) {
sys/fs/fuse/fuse_io.c
604
brelse(bp);
sys/fs/fuse/fuse_io.c
607
if (bp->b_resid > 0) {
sys/fs/fuse/fuse_io.c
614
brelse(bp);
sys/fs/fuse/fuse_io.c
623
if (bp->b_wcred == NOCRED)
sys/fs/fuse/fuse_io.c
624
bp->b_wcred = crhold(cred);
sys/fs/fuse/fuse_io.c
634
if (bp->b_dirtyend > bcount) {
sys/fs/fuse/fuse_io.c
636
(long)bp->b_blkno * biosize,
sys/fs/fuse/fuse_io.c
637
bp->b_dirtyend - bcount);
sys/fs/fuse/fuse_io.c
638
bp->b_dirtyend = bcount;
sys/fs/fuse/fuse_io.c
640
if (bp->b_dirtyoff >= bp->b_dirtyend)
sys/fs/fuse/fuse_io.c
641
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/fs/fuse/fuse_io.c
660
if (bp->b_dirtyend > 0 &&
sys/fs/fuse/fuse_io.c
661
(on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) {
sys/fs/fuse/fuse_io.c
668
SDT_PROBE2(fusefs, , io, write_biobackend_issue, 0, bp);
sys/fs/fuse/fuse_io.c
669
bwrite(bp);
sys/fs/fuse/fuse_io.c
670
if (bp->b_error == EINTR) {
sys/fs/fuse/fuse_io.c
676
err = uiomove((char *)bp->b_data + on, n, uio);
sys/fs/fuse/fuse_io.c
679
bp->b_ioflags |= BIO_ERROR;
sys/fs/fuse/fuse_io.c
680
bp->b_error = err;
sys/fs/fuse/fuse_io.c
681
brelse(bp);
sys/fs/fuse/fuse_io.c
690
if (bp->b_dirtyend > 0) {
sys/fs/fuse/fuse_io.c
691
bp->b_dirtyoff = MIN(on, bp->b_dirtyoff);
sys/fs/fuse/fuse_io.c
692
bp->b_dirtyend = MAX((on + n), bp->b_dirtyend);
sys/fs/fuse/fuse_io.c
694
bp->b_dirtyoff = on;
sys/fs/fuse/fuse_io.c
695
bp->b_dirtyend = on + n;
sys/fs/fuse/fuse_io.c
697
vfs_bio_set_valid(bp, on, n);
sys/fs/fuse/fuse_io.c
700
vfs_bio_set_flags(bp, ioflag);
sys/fs/fuse/fuse_io.c
702
bp->b_flags |= B_FUSEFS_WRITE_CACHE;
sys/fs/fuse/fuse_io.c
704
SDT_PROBE2(fusefs, , io, write_biobackend_issue, 2, bp);
sys/fs/fuse/fuse_io.c
706
bp->b_flags &= ~B_FUSEFS_WRITE_CACHE;
sys/fs/fuse/fuse_io.c
707
err = bwrite(bp);
sys/fs/fuse/fuse_io.c
711
bp->b_flags |= B_CLUSTEROK;
sys/fs/fuse/fuse_io.c
712
SDT_PROBE2(fusefs, , io, write_biobackend_issue, 3, bp);
sys/fs/fuse/fuse_io.c
713
bawrite(bp);
sys/fs/fuse/fuse_io.c
716
bp->b_flags |= B_CLUSTEROK;
sys/fs/fuse/fuse_io.c
718
4, bp);
sys/fs/fuse/fuse_io.c
719
cluster_write(vp, &fvdat->clusterw, bp,
sys/fs/fuse/fuse_io.c
723
5, bp);
sys/fs/fuse/fuse_io.c
724
bawrite(bp);
sys/fs/fuse/fuse_io.c
727
bp->b_flags |= B_CLUSTEROK;
sys/fs/fuse/fuse_io.c
728
SDT_PROBE2(fusefs, , io, write_biobackend_issue, 6, bp);
sys/fs/fuse/fuse_io.c
729
bawrite(bp);
sys/fs/fuse/fuse_io.c
731
bp->b_flags &= ~B_CLUSTEROK;
sys/fs/fuse/fuse_io.c
732
SDT_PROBE2(fusefs, , io, write_biobackend_issue, 7, bp);
sys/fs/fuse/fuse_io.c
733
bdwrite(bp);
sys/fs/fuse/fuse_io.c
744
fuse_io_strategy(struct vnode *vp, struct buf *bp)
sys/fs/fuse/fuse_io.c
761
MPASS(bp->b_iocmd == BIO_READ || bp->b_iocmd == BIO_WRITE);
sys/fs/fuse/fuse_io.c
763
fflag = bp->b_iocmd == BIO_READ ? FREAD : FWRITE;
sys/fs/fuse/fuse_io.c
764
cred = bp->b_iocmd == BIO_READ ? bp->b_rcred : bp->b_wcred;
sys/fs/fuse/fuse_io.c
766
if (bp->b_iocmd == BIO_READ && error == EBADF) {
sys/fs/fuse/fuse_io.c
775
bp->b_ioflags |= BIO_ERROR;
sys/fs/fuse/fuse_io.c
776
bp->b_error = error;
sys/fs/fuse/fuse_io.c
777
bufdone(bp);
sys/fs/fuse/fuse_io.c
792
bp->b_flags &= ~B_INVAL;
sys/fs/fuse/fuse_io.c
793
bp->b_ioflags &= ~BIO_ERROR;
sys/fs/fuse/fuse_io.c
795
KASSERT(!(bp->b_flags & B_DONE),
sys/fs/fuse/fuse_io.c
796
("fuse_io_strategy: bp %p already marked done", bp));
sys/fs/fuse/fuse_io.c
797
if (bp->b_iocmd == BIO_READ) {
sys/fs/fuse/fuse_io.c
800
io.iov_len = uiop->uio_resid = bp->b_bcount;
sys/fs/fuse/fuse_io.c
801
io.iov_base = bp->b_data;
sys/fs/fuse/fuse_io.c
804
uiop->uio_offset = ((off_t)bp->b_lblkno) * biosize;
sys/fs/fuse/fuse_io.c
812
int nread = bp->b_bcount - uiop->uio_resid;
sys/fs/fuse/fuse_io.c
814
bzero((char *)bp->b_data + nread, left);
sys/fs/fuse/fuse_io.c
852
bp->b_ioflags |= BIO_ERROR;
sys/fs/fuse/fuse_io.c
853
bp->b_error = error;
sys/fs/fuse/fuse_io.c
880
if ((off_t)bp->b_lblkno * biosize + bp->b_dirtyend > filesize)
sys/fs/fuse/fuse_io.c
881
bp->b_dirtyend = filesize -
sys/fs/fuse/fuse_io.c
882
(off_t)bp->b_lblkno * biosize;
sys/fs/fuse/fuse_io.c
884
if (bp->b_dirtyend > bp->b_dirtyoff) {
sys/fs/fuse/fuse_io.c
885
io.iov_len = uiop->uio_resid = bp->b_dirtyend
sys/fs/fuse/fuse_io.c
886
- bp->b_dirtyoff;
sys/fs/fuse/fuse_io.c
887
uiop->uio_offset = (off_t)bp->b_lblkno * biosize
sys/fs/fuse/fuse_io.c
888
+ bp->b_dirtyoff;
sys/fs/fuse/fuse_io.c
889
io.iov_base = (char *)bp->b_data + bp->b_dirtyoff;
sys/fs/fuse/fuse_io.c
892
bool pages = bp->b_flags & B_FUSEFS_WRITE_CACHE;
sys/fs/fuse/fuse_io.c
897
bp->b_flags &= ~(B_INVAL | B_NOCACHE);
sys/fs/fuse/fuse_io.c
898
if ((bp->b_flags & B_PAGING) == 0) {
sys/fs/fuse/fuse_io.c
899
bdirty(bp);
sys/fs/fuse/fuse_io.c
900
bp->b_flags &= ~B_DONE;
sys/fs/fuse/fuse_io.c
903
(bp->b_flags & B_ASYNC) == 0)
sys/fs/fuse/fuse_io.c
904
bp->b_flags |= B_EINTR;
sys/fs/fuse/fuse_io.c
907
bp->b_ioflags |= BIO_ERROR;
sys/fs/fuse/fuse_io.c
908
bp->b_flags |= B_INVAL;
sys/fs/fuse/fuse_io.c
909
bp->b_error = error;
sys/fs/fuse/fuse_io.c
911
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/fs/fuse/fuse_io.c
914
bp->b_resid = 0;
sys/fs/fuse/fuse_io.c
915
bufdone(bp);
sys/fs/fuse/fuse_io.c
919
bp->b_resid = uiop->uio_resid;
sys/fs/fuse/fuse_io.c
920
bufdone(bp);
sys/fs/fuse/fuse_io.h
66
int fuse_io_strategy(struct vnode *vp, struct buf *bp);
sys/fs/fuse/fuse_node.c
484
struct buf *bp = NULL;
sys/fs/fuse/fuse_node.c
509
bp = getblk(vp, lbn, iosize, PCATCH, 0, 0);
sys/fs/fuse/fuse_node.c
510
if (!bp) {
sys/fs/fuse/fuse_node.c
514
if (!(bp->b_flags & B_CACHE))
sys/fs/fuse/fuse_node.c
516
MPASS(bp->b_flags & B_VMIO);
sys/fs/fuse/fuse_node.c
517
vfs_bio_clrbuf(bp);
sys/fs/fuse/fuse_node.c
518
bp->b_dirtyend = MIN(bp->b_dirtyend, newsize - lbn * iosize);
sys/fs/fuse/fuse_node.c
521
if (bp)
sys/fs/fuse/fuse_node.c
522
brelse(bp);
sys/fs/fuse/fuse_vnops.c
2534
struct buf *bp = ap->a_bp;
sys/fs/fuse/fuse_vnops.c
2537
bp->b_ioflags |= BIO_ERROR;
sys/fs/fuse/fuse_vnops.c
2538
bp->b_error = ENXIO;
sys/fs/fuse/fuse_vnops.c
2539
bufdone(bp);
sys/fs/fuse/fuse_vnops.c
2547
(void)fuse_io_strategy(vp, bp);
sys/fs/fuse/fuse_vnops.c
332
struct buf *bp;
sys/fs/fuse/fuse_vnops.c
342
bp = getblk(vp, left_lbn, iosize, PCATCH, 0, 0);
sys/fs/fuse/fuse_vnops.c
343
if ((bp->b_flags & B_CACHE) != 0 && bp->b_dirtyend >= left_on) {
sys/fs/fuse/fuse_vnops.c
349
bwrite(bp);
sys/fs/fuse/fuse_vnops.c
350
if (bp->b_error)
sys/fs/fuse/fuse_vnops.c
351
return (bp->b_error);
sys/fs/fuse/fuse_vnops.c
353
brelse(bp);
sys/fs/fuse/fuse_vnops.c
361
bp = getblk(vp, right_lbn, right_blksize, PCATCH, 0, 0);
sys/fs/fuse/fuse_vnops.c
362
if ((bp->b_flags & B_CACHE) != 0 && bp->b_dirtyoff < right_on) {
sys/fs/fuse/fuse_vnops.c
368
bwrite(bp);
sys/fs/fuse/fuse_vnops.c
369
if (bp->b_error)
sys/fs/fuse/fuse_vnops.c
370
return (bp->b_error);
sys/fs/fuse/fuse_vnops.c
372
brelse(bp);
sys/fs/msdosfs/msdosfs_denode.c
107
struct buf *bp;
sys/fs/msdosfs/msdosfs_denode.c
250
error = readep(pmp, dirclust, diroffset, &bp, &direntptr);
sys/fs/msdosfs/msdosfs_denode.c
264
brelse(bp);
sys/fs/msdosfs/msdosfs_denode.c
318
struct buf *bp;
sys/fs/msdosfs/msdosfs_denode.c
336
error = readde(dep, &bp, &dirp);
sys/fs/msdosfs/msdosfs_denode.c
341
if (waitfor == 0 || (bp->b_flags & B_DELWRI) == 0) {
sys/fs/msdosfs/msdosfs_denode.c
342
brelse(bp);
sys/fs/msdosfs/msdosfs_denode.c
348
bp->b_flags |= B_CLUSTEROK;
sys/fs/msdosfs/msdosfs_denode.c
350
error = bwrite(bp);
sys/fs/msdosfs/msdosfs_denode.c
352
bawrite(bp);
sys/fs/msdosfs/msdosfs_denode.c
354
bdwrite(bp);
sys/fs/msdosfs/msdosfs_denode.c
371
struct buf *bp;
sys/fs/msdosfs/msdosfs_denode.c
432
NOCRED, &bp);
sys/fs/msdosfs/msdosfs_denode.c
435
pmp->pm_bpcluster, cred, &bp);
sys/fs/msdosfs/msdosfs_denode.c
443
memset(bp->b_data + boff, 0, pmp->pm_bpcluster - boff);
sys/fs/msdosfs/msdosfs_denode.c
445
bwrite(bp);
sys/fs/msdosfs/msdosfs_denode.c
447
bdwrite(bp);
sys/fs/msdosfs/msdosfs_denode.c
505
struct buf *bp;
sys/fs/msdosfs/msdosfs_denode.c
551
NOCRED, &bp);
sys/fs/msdosfs/msdosfs_denode.c
554
vfs_bio_clrbuf(bp);
sys/fs/msdosfs/msdosfs_denode.c
556
vfs_bio_bzero_buf(bp, dep->de_FileSize - eof_clusteroff,
sys/fs/msdosfs/msdosfs_denode.c
559
(void)bwrite(bp);
sys/fs/msdosfs/msdosfs_denode.c
561
bawrite(bp);
sys/fs/msdosfs/msdosfs_denode.c
563
bdwrite(bp);
sys/fs/msdosfs/msdosfs_fat.c
1080
bp = getblk(pmp->pm_devvp,
sys/fs/msdosfs/msdosfs_fat.c
1084
bp = getblk(DETOV(dep),
sys/fs/msdosfs/msdosfs_fat.c
1091
bp->b_lblkno,
sys/fs/msdosfs/msdosfs_fat.c
1093
bp->b_blkno = -1;
sys/fs/msdosfs/msdosfs_fat.c
1094
if (bp->b_blkno == -1)
sys/fs/msdosfs/msdosfs_fat.c
1097
bp->b_blkno = blkno;
sys/fs/msdosfs/msdosfs_fat.c
1099
clrbuf(bp);
sys/fs/msdosfs/msdosfs_fat.c
1101
*bpp = bp;
sys/fs/msdosfs/msdosfs_fat.c
1104
bdwrite(bp);
sys/fs/msdosfs/msdosfs_fat.c
1139
struct buf *bp;
sys/fs/msdosfs/msdosfs_fat.c
1163
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_fat.c
1174
fatval = getulong(&bp->b_data[bo]);
sys/fs/msdosfs/msdosfs_fat.c
1179
putulong(&bp->b_data[bo], fatval);
sys/fs/msdosfs/msdosfs_fat.c
1182
fatval = getushort(&bp->b_data[bo]);
sys/fs/msdosfs/msdosfs_fat.c
1187
putushort(&bp->b_data[bo], fatval);
sys/fs/msdosfs/msdosfs_fat.c
1211
bp->b_flags |= B_INVALONERR;
sys/fs/msdosfs/msdosfs_fat.c
1214
return (bwrite(bp));
sys/fs/msdosfs/msdosfs_fat.c
141
struct buf *bp = NULL;
sys/fs/msdosfs/msdosfs_fat.c
205
if (bp)
sys/fs/msdosfs/msdosfs_fat.c
206
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
207
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_fat.c
215
if (bp)
sys/fs/msdosfs/msdosfs_fat.c
216
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
220
cn = getulong(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
222
cn = getushort(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
238
if (bp)
sys/fs/msdosfs/msdosfs_fat.c
239
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
251
if (bp)
sys/fs/msdosfs/msdosfs_fat.c
252
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
313
updatefats(struct msdosfsmount *pmp, struct buf *bp, u_long fatbn)
sys/fs/msdosfs/msdosfs_fat.c
319
printf("updatefats(pmp %p, bp %p, fatbn %lu)\n", pmp, bp, fatbn);
sys/fs/msdosfs/msdosfs_fat.c
342
bpn = getblk(pmp->pm_devvp, fatbn, bp->b_bcount,
sys/fs/msdosfs/msdosfs_fat.c
344
memcpy(bpn->b_data, bp->b_data, bp->b_bcount);
sys/fs/msdosfs/msdosfs_fat.c
361
bwrite(bp);
sys/fs/msdosfs/msdosfs_fat.c
363
bdwrite(bp);
sys/fs/msdosfs/msdosfs_fat.c
474
struct buf *bp;
sys/fs/msdosfs/msdosfs_fat.c
512
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_fat.c
519
readcn = getulong(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
521
readcn = getushort(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
533
readcn = getushort(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
541
putushort(bp->b_data + bo, readcn);
sys/fs/msdosfs/msdosfs_fat.c
544
putushort(bp->b_data + bo, newcontents);
sys/fs/msdosfs/msdosfs_fat.c
551
readcn = getulong(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
554
putulong(bp->b_data + bo, readcn);
sys/fs/msdosfs/msdosfs_fat.c
557
updatefats(pmp, bp, bn);
sys/fs/msdosfs/msdosfs_fat.c
558
bp = NULL;
sys/fs/msdosfs/msdosfs_fat.c
561
if (bp)
sys/fs/msdosfs/msdosfs_fat.c
562
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
579
struct buf *bp;
sys/fs/msdosfs/msdosfs_fat.c
594
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_fat.c
603
readcn = getushort(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
611
putushort(bp->b_data + bo, readcn);
sys/fs/msdosfs/msdosfs_fat.c
617
putushort(bp->b_data + bo, newc);
sys/fs/msdosfs/msdosfs_fat.c
621
readcn = getulong(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
624
putulong(bp->b_data + bo, readcn);
sys/fs/msdosfs/msdosfs_fat.c
631
updatefats(pmp, bp, bn);
sys/fs/msdosfs/msdosfs_fat.c
78
static void updatefats(struct msdosfsmount *pmp, struct buf *bp,
sys/fs/msdosfs/msdosfs_fat.c
837
struct buf *bp = NULL;
sys/fs/msdosfs/msdosfs_fat.c
846
if (bp)
sys/fs/msdosfs/msdosfs_fat.c
847
updatefats(pmp, bp, lbn);
sys/fs/msdosfs/msdosfs_fat.c
848
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_fat.c
857
updatefats(pmp, bp, lbn);
sys/fs/msdosfs/msdosfs_fat.c
863
readcn = getushort(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
873
putushort(bp->b_data + bo, readcn);
sys/fs/msdosfs/msdosfs_fat.c
876
cluster = getushort(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
877
putushort(bp->b_data + bo, MSDOSFSFREE);
sys/fs/msdosfs/msdosfs_fat.c
880
cluster = getulong(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
881
putulong(bp->b_data + bo,
sys/fs/msdosfs/msdosfs_fat.c
889
if (bp)
sys/fs/msdosfs/msdosfs_fat.c
890
updatefats(pmp, bp, bn);
sys/fs/msdosfs/msdosfs_fat.c
902
struct buf *bp;
sys/fs/msdosfs/msdosfs_fat.c
907
bp = NULL;
sys/fs/msdosfs/msdosfs_fat.c
927
if (bp != NULL)
sys/fs/msdosfs/msdosfs_fat.c
928
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
930
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_fat.c
935
readcn = getulong(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
937
readcn = getushort(bp->b_data + bo);
sys/fs/msdosfs/msdosfs_fat.c
952
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
957
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
962
if (bp != NULL)
sys/fs/msdosfs/msdosfs_fat.c
963
brelse(bp);
sys/fs/msdosfs/msdosfs_fat.c
995
struct buf *bp;
sys/fs/msdosfs/msdosfs_lookup.c
1007
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
1027
bdwrite(bp);
sys/fs/msdosfs/msdosfs_lookup.c
1028
else if ((error = bwrite(bp)) != 0)
sys/fs/msdosfs/msdosfs_lookup.c
1048
struct buf *bp;
sys/fs/msdosfs/msdosfs_lookup.c
1072
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_lookup.c
1076
for (dentp = (struct direntry *)bp->b_data;
sys/fs/msdosfs/msdosfs_lookup.c
1077
(char *)dentp < bp->b_data + blsize;
sys/fs/msdosfs/msdosfs_lookup.c
1083
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
1096
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
154
struct buf *bp = NULL;
sys/fs/msdosfs/msdosfs_lookup.c
258
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_lookup.c
265
dep = (struct direntry *)(bp->b_data + blkoff);
sys/fs/msdosfs/msdosfs_lookup.c
288
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
371
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
477
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
478
bp = NULL;
sys/fs/msdosfs/msdosfs_lookup.c
638
struct buf *bp;
sys/fs/msdosfs/msdosfs_lookup.c
683
if ((error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp)) != 0) {
sys/fs/msdosfs/msdosfs_lookup.c
684
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
687
ndep = bptoep(pmp, bp, ddep->de_fndoffset);
sys/fs/msdosfs/msdosfs_lookup.c
704
bdwrite(bp);
sys/fs/msdosfs/msdosfs_lookup.c
705
else if ((error = bwrite(bp)) != 0)
sys/fs/msdosfs/msdosfs_lookup.c
717
NOCRED, &bp);
sys/fs/msdosfs/msdosfs_lookup.c
721
ndep = bptoep(pmp, bp, ddep->de_fndoffset);
sys/fs/msdosfs/msdosfs_lookup.c
734
bdwrite(bp);
sys/fs/msdosfs/msdosfs_lookup.c
735
else if ((error = bwrite(bp)) != 0)
sys/fs/msdosfs/msdosfs_lookup.c
768
struct buf *bp;
sys/fs/msdosfs/msdosfs_lookup.c
783
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_lookup.c
787
for (dentp = (struct direntry *)bp->b_data;
sys/fs/msdosfs/msdosfs_lookup.c
788
(char *)dentp < bp->b_data + blsize;
sys/fs/msdosfs/msdosfs_lookup.c
800
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
809
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
818
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
842
struct buf *bp = NULL;
sys/fs/msdosfs/msdosfs_lookup.c
871
pmp->pm_bpcluster, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_lookup.c
875
ep = (struct direntry *)bp->b_data + 1;
sys/fs/msdosfs/msdosfs_lookup.c
879
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
886
brelse(bp);
sys/fs/msdosfs/msdosfs_lookup.c
977
struct buf *bp;
sys/fs/msdosfs/msdosfs_lookup.c
995
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_lookup.c
999
ep = bptoep(pmp, bp, offset);
sys/fs/msdosfs/msdosfs_vfsops.c
1074
struct buf *bp;
sys/fs/msdosfs/msdosfs_vfsops.c
1083
NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vfsops.c
1087
fp = (struct fsinfo *)bp->b_data;
sys/fs/msdosfs/msdosfs_vfsops.c
1092
error = bwrite(bp);
sys/fs/msdosfs/msdosfs_vfsops.c
1094
bawrite(bp);
sys/fs/msdosfs/msdosfs_vfsops.c
423
struct buf *bp;
sys/fs/msdosfs/msdosfs_vfsops.c
460
if (bread(pmp->pm_devvp, dirclu, readsize, NOCRED, &bp) != 0) {
sys/fs/msdosfs/msdosfs_vfsops.c
462
if (bp != NULL)
sys/fs/msdosfs/msdosfs_vfsops.c
463
brelse(bp);
sys/fs/msdosfs/msdosfs_vfsops.c
469
dep = (struct direntry*)bp->b_data + diridx;
sys/fs/msdosfs/msdosfs_vfsops.c
495
brelse(bp);
sys/fs/msdosfs/msdosfs_vfsops.c
496
bp = NULL;
sys/fs/msdosfs/msdosfs_vfsops.c
506
struct buf *bp;
sys/fs/msdosfs/msdosfs_vfsops.c
519
bp = NULL; /* This and pmp both used in error_exit. */
sys/fs/msdosfs/msdosfs_vfsops.c
555
error = bread(devvp, 0, 8192, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vfsops.c
558
bp->b_flags |= B_AGE;
sys/fs/msdosfs/msdosfs_vfsops.c
559
bsp = (union bootsector *)bp->b_data;
sys/fs/msdosfs/msdosfs_vfsops.c
764
brelse(bp);
sys/fs/msdosfs/msdosfs_vfsops.c
765
bp = NULL;
sys/fs/msdosfs/msdosfs_vfsops.c
777
NOCRED, &bp)) != 0)
sys/fs/msdosfs/msdosfs_vfsops.c
779
fp = (struct fsinfo *)bp->b_data;
sys/fs/msdosfs/msdosfs_vfsops.c
788
brelse(bp);
sys/fs/msdosfs/msdosfs_vfsops.c
789
bp = NULL;
sys/fs/msdosfs/msdosfs_vfsops.c
864
if (bp != NULL)
sys/fs/msdosfs/msdosfs_vfsops.c
865
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1247
NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
1255
dotdotp = (struct direntry *)bp->b_data + 1;
sys/fs/msdosfs/msdosfs_vnops.c
1263
bdwrite(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1264
else if ((error = bwrite(bp)) != 0) {
sys/fs/msdosfs/msdosfs_vnops.c
1346
struct buf *bp;
sys/fs/msdosfs/msdosfs_vnops.c
1384
bp = getblk(pmp->pm_devvp, bn, pmp->pm_bpcluster, 0, 0, 0);
sys/fs/msdosfs/msdosfs_vnops.c
1385
memset(bp->b_data, 0, pmp->pm_bpcluster);
sys/fs/msdosfs/msdosfs_vnops.c
1386
memcpy(bp->b_data, &dosdirtemplate, sizeof dosdirtemplate);
sys/fs/msdosfs/msdosfs_vnops.c
1387
denp = (struct direntry *)bp->b_data;
sys/fs/msdosfs/msdosfs_vnops.c
1416
bdwrite(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1417
else if ((error = bwrite(bp)) != 0)
sys/fs/msdosfs/msdosfs_vnops.c
1518
struct buf *bp;
sys/fs/msdosfs/msdosfs_vnops.c
1639
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
1643
n = min(n, blsize - bp->b_resid);
sys/fs/msdosfs/msdosfs_vnops.c
1645
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1653
for (dentp = (struct direntry *)(bp->b_data + on);
sys/fs/msdosfs/msdosfs_vnops.c
1654
(char *)dentp < bp->b_data + on + n;
sys/fs/msdosfs/msdosfs_vnops.c
1664
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1738
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1743
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1749
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1755
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1884
struct buf *bp = ap->a_bp;
sys/fs/msdosfs/msdosfs_vnops.c
1896
if (bp->b_blkno == bp->b_lblkno) {
sys/fs/msdosfs/msdosfs_vnops.c
1897
error = pcbmap(dep, bp->b_lblkno, &blkno, 0, 0);
sys/fs/msdosfs/msdosfs_vnops.c
1898
bp->b_blkno = blkno;
sys/fs/msdosfs/msdosfs_vnops.c
1900
bp->b_error = error;
sys/fs/msdosfs/msdosfs_vnops.c
1901
bp->b_ioflags |= BIO_ERROR;
sys/fs/msdosfs/msdosfs_vnops.c
1902
bufdone(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1905
if ((long)bp->b_blkno == -1)
sys/fs/msdosfs/msdosfs_vnops.c
1906
vfs_bio_clrbuf(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1908
if (bp->b_blkno == -1) {
sys/fs/msdosfs/msdosfs_vnops.c
1909
bufdone(bp);
sys/fs/msdosfs/msdosfs_vnops.c
1916
bp->b_iooffset = dbtob(bp->b_blkno);
sys/fs/msdosfs/msdosfs_vnops.c
1918
BO_STRATEGY(bo, bp);
sys/fs/msdosfs/msdosfs_vnops.c
532
struct buf *bp;
sys/fs/msdosfs/msdosfs_vnops.c
576
error = bread(pmp->pm_devvp, lbn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
578
error = bread(vp, lbn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
581
NOCRED, on + uio->uio_resid, seqcount, 0, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
585
blsize, &rablock, &rasize, 1, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
587
error = bread(vp, lbn, blsize, NOCRED, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
590
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
598
diff = blsize - bp->b_resid;
sys/fs/msdosfs/msdosfs_vnops.c
601
error = vn_io_fault_uiomove(bp->b_data + on, (int) n, uio);
sys/fs/msdosfs/msdosfs_vnops.c
602
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
624
struct buf *bp;
sys/fs/msdosfs/msdosfs_vnops.c
732
bp = getblk(thisvp, bn, pmp->pm_bpcluster, 0, 0, 0);
sys/fs/msdosfs/msdosfs_vnops.c
739
vfs_bio_clrbuf(bp);
sys/fs/msdosfs/msdosfs_vnops.c
744
if (bp->b_blkno == bp->b_lblkno) {
sys/fs/msdosfs/msdosfs_vnops.c
745
error = pcbmap(dep, bp->b_lblkno, &bn, 0, 0);
sys/fs/msdosfs/msdosfs_vnops.c
747
bp->b_blkno = -1;
sys/fs/msdosfs/msdosfs_vnops.c
749
bp->b_blkno = bn;
sys/fs/msdosfs/msdosfs_vnops.c
751
if (bp->b_blkno == -1) {
sys/fs/msdosfs/msdosfs_vnops.c
752
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
761
error = bread(thisvp, bn, pmp->pm_bpcluster, cred, &bp);
sys/fs/msdosfs/msdosfs_vnops.c
775
error = vn_io_fault_uiomove(bp->b_data + croffset, n, uio);
sys/fs/msdosfs/msdosfs_vnops.c
777
brelse(bp);
sys/fs/msdosfs/msdosfs_vnops.c
783
bp->b_flags |= B_CLUSTEROK;
sys/fs/msdosfs/msdosfs_vnops.c
796
(void)bwrite(bp);
sys/fs/msdosfs/msdosfs_vnops.c
798
bawrite(bp);
sys/fs/msdosfs/msdosfs_vnops.c
801
cluster_write(vp, &dep->de_clusterw, bp,
sys/fs/msdosfs/msdosfs_vnops.c
804
bawrite(bp);
sys/fs/msdosfs/msdosfs_vnops.c
806
bdwrite(bp);
sys/fs/msdosfs/msdosfs_vnops.c
954
struct buf *bp;
sys/fs/msdosfs/msdosfsmount.h
159
#define bptoep(pmp, bp, dirofs) \
sys/fs/msdosfs/msdosfsmount.h
160
((struct direntry *)(((bp)->b_data) \
sys/fs/nfsclient/nfs_clbio.c
1036
bp = nfs_getcacheblk(vp, lbn, obcount, td);
sys/fs/nfsclient/nfs_clbio.c
1038
if (bp != NULL) {
sys/fs/nfsclient/nfs_clbio.c
1048
save = bp->b_flags & B_CACHE;
sys/fs/nfsclient/nfs_clbio.c
1050
allocbuf(bp, bcount);
sys/fs/nfsclient/nfs_clbio.c
1051
bp->b_flags |= save;
sys/fs/nfsclient/nfs_clbio.c
1053
vfs_bio_bzero_buf(bp, obcount, on -
sys/fs/nfsclient/nfs_clbio.c
1069
bp = nfs_getcacheblk(vp, lbn, bcount, td);
sys/fs/nfsclient/nfs_clbio.c
1080
if (!bp) {
sys/fs/nfsclient/nfs_clbio.c
1108
if ((bp->b_flags & B_CACHE) == 0)
sys/fs/nfsclient/nfs_clbio.c
1110
bp->b_flags |= B_CACHE;
sys/fs/nfsclient/nfs_clbio.c
1111
bp->b_flags &= ~B_INVAL;
sys/fs/nfsclient/nfs_clbio.c
1112
bp->b_ioflags &= ~BIO_ERROR;
sys/fs/nfsclient/nfs_clbio.c
1115
if ((bp->b_flags & B_CACHE) == 0) {
sys/fs/nfsclient/nfs_clbio.c
1116
bp->b_iocmd = BIO_READ;
sys/fs/nfsclient/nfs_clbio.c
1117
vfs_busy_pages(bp, 0);
sys/fs/nfsclient/nfs_clbio.c
1118
error = ncl_doio(vp, bp, cred, td, 0);
sys/fs/nfsclient/nfs_clbio.c
1120
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
1124
if (bp->b_wcred == NOCRED)
sys/fs/nfsclient/nfs_clbio.c
1125
bp->b_wcred = crhold(cred);
sys/fs/nfsclient/nfs_clbio.c
1139
if (bp->b_dirtyend > bcount) {
sys/fs/nfsclient/nfs_clbio.c
1141
(long)bp->b_blkno * DEV_BSIZE,
sys/fs/nfsclient/nfs_clbio.c
1142
bp->b_dirtyend - bcount);
sys/fs/nfsclient/nfs_clbio.c
1143
bp->b_dirtyend = bcount;
sys/fs/nfsclient/nfs_clbio.c
1146
if (bp->b_dirtyoff >= bp->b_dirtyend)
sys/fs/nfsclient/nfs_clbio.c
1147
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/fs/nfsclient/nfs_clbio.c
1170
if (noncontig_write == 0 && bp->b_dirtyend > 0 &&
sys/fs/nfsclient/nfs_clbio.c
1171
(on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) {
sys/fs/nfsclient/nfs_clbio.c
1172
if (bwrite(bp) == EINTR) {
sys/fs/nfsclient/nfs_clbio.c
1180
error = vn_io_fault_uiomove((char *)bp->b_data + on, n, uio);
sys/fs/nfsclient/nfs_clbio.c
1190
bp->b_ioflags |= BIO_ERROR;
sys/fs/nfsclient/nfs_clbio.c
1191
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
120
struct buf *bp;
sys/fs/nfsclient/nfs_clbio.c
1203
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
sys/fs/nfsclient/nfs_clbio.c
1217
if (bp->b_dirtyend > 0) {
sys/fs/nfsclient/nfs_clbio.c
1218
bp->b_dirtyoff = min(on, bp->b_dirtyoff);
sys/fs/nfsclient/nfs_clbio.c
1219
bp->b_dirtyend = max((on + n), bp->b_dirtyend);
sys/fs/nfsclient/nfs_clbio.c
1221
bp->b_dirtyoff = on;
sys/fs/nfsclient/nfs_clbio.c
1222
bp->b_dirtyend = on + n;
sys/fs/nfsclient/nfs_clbio.c
1224
vfs_bio_set_valid(bp, on, n);
sys/fs/nfsclient/nfs_clbio.c
1235
bp->b_flags |= B_NOCACHE;
sys/fs/nfsclient/nfs_clbio.c
1236
error1 = bwrite(bp);
sys/fs/nfsclient/nfs_clbio.c
1243
bp->b_flags |= B_ASYNC;
sys/fs/nfsclient/nfs_clbio.c
1244
(void) bwrite(bp);
sys/fs/nfsclient/nfs_clbio.c
1246
bdwrite(bp);
sys/fs/nfsclient/nfs_clbio.c
1292
struct buf *bp;
sys/fs/nfsclient/nfs_clbio.c
1303
bp = getblk(vp, bn, size, PCATCH, 0, 0);
sys/fs/nfsclient/nfs_clbio.c
1305
while (bp == NULL) {
sys/fs/nfsclient/nfs_clbio.c
1308
bp = getblk(vp, bn, size, 0, 2 * hz, 0);
sys/fs/nfsclient/nfs_clbio.c
1311
bp = getblk(vp, bn, size, 0, 0, 0);
sys/fs/nfsclient/nfs_clbio.c
1315
bp->b_blkno = bn * (vp->v_bufobj.bo_bsize / DEV_BSIZE);
sys/fs/nfsclient/nfs_clbio.c
1316
return (bp);
sys/fs/nfsclient/nfs_clbio.c
1403
ncl_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thread *td)
sys/fs/nfsclient/nfs_clbio.c
1424
if ((bp->b_iocmd == BIO_WRITE && (bp->b_flags & B_NEEDCOMMIT) &&
sys/fs/nfsclient/nfs_clbio.c
1426
(bp->b_vp->v_type == VDIR && (nmp->nm_flag & NFSMNT_RDIRPLUS))) {
sys/fs/nfsclient/nfs_clbio.c
1516
if (bp->b_iocmd == BIO_READ) {
sys/fs/nfsclient/nfs_clbio.c
1517
if (bp->b_rcred == NOCRED && cred != NOCRED)
sys/fs/nfsclient/nfs_clbio.c
1518
bp->b_rcred = crhold(cred);
sys/fs/nfsclient/nfs_clbio.c
1520
if (bp->b_wcred == NOCRED && cred != NOCRED)
sys/fs/nfsclient/nfs_clbio.c
1521
bp->b_wcred = crhold(cred);
sys/fs/nfsclient/nfs_clbio.c
1524
if (bp->b_flags & B_REMFREE)
sys/fs/nfsclient/nfs_clbio.c
1525
bremfreef(bp);
sys/fs/nfsclient/nfs_clbio.c
1526
BUF_KERNPROC(bp);
sys/fs/nfsclient/nfs_clbio.c
1527
TAILQ_INSERT_TAIL(&nmp->nm_bufq, bp, b_freelist);
sys/fs/nfsclient/nfs_clbio.c
1529
KASSERT((bp->b_flags & B_DIRECT) == 0,
sys/fs/nfsclient/nfs_clbio.c
1550
ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td,
sys/fs/nfsclient/nfs_clbio.c
1575
bp->b_flags &= ~B_INVAL;
sys/fs/nfsclient/nfs_clbio.c
1576
bp->b_ioflags &= ~BIO_ERROR;
sys/fs/nfsclient/nfs_clbio.c
1578
KASSERT(!(bp->b_flags & B_DONE), ("ncl_doio: bp %p already marked done", bp));
sys/fs/nfsclient/nfs_clbio.c
1579
iocmd = bp->b_iocmd;
sys/fs/nfsclient/nfs_clbio.c
1581
io.iov_len = uiop->uio_resid = bp->b_bcount;
sys/fs/nfsclient/nfs_clbio.c
1582
io.iov_base = bp->b_data;
sys/fs/nfsclient/nfs_clbio.c
1587
uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE;
sys/fs/nfsclient/nfs_clbio.c
1601
int nread = bp->b_bcount - uiop->uio_resid;
sys/fs/nfsclient/nfs_clbio.c
1605
bzero((char *)bp->b_data + nread, left);
sys/fs/nfsclient/nfs_clbio.c
1628
uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ;
sys/fs/nfsclient/nfs_clbio.c
1640
if (error == 0 && uiop->uio_resid == bp->b_bcount)
sys/fs/nfsclient/nfs_clbio.c
1641
bp->b_flags |= B_INVAL;
sys/fs/nfsclient/nfs_clbio.c
1648
bp->b_ioflags |= BIO_ERROR;
sys/fs/nfsclient/nfs_clbio.c
1649
bp->b_error = error;
sys/fs/nfsclient/nfs_clbio.c
1655
if (bp->b_flags & B_NEEDCOMMIT) {
sys/fs/nfsclient/nfs_clbio.c
1659
off = ((u_quad_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff;
sys/fs/nfsclient/nfs_clbio.c
1660
retv = ncl_commit(vp, off, bp->b_dirtyend-bp->b_dirtyoff,
sys/fs/nfsclient/nfs_clbio.c
1661
bp->b_wcred, td);
sys/fs/nfsclient/nfs_clbio.c
1663
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/fs/nfsclient/nfs_clbio.c
1664
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
sys/fs/nfsclient/nfs_clbio.c
1665
bp->b_resid = 0;
sys/fs/nfsclient/nfs_clbio.c
1666
bufdone(bp);
sys/fs/nfsclient/nfs_clbio.c
1678
if ((off_t)bp->b_blkno * DEV_BSIZE + bp->b_dirtyend > np->n_size)
sys/fs/nfsclient/nfs_clbio.c
1679
bp->b_dirtyend = np->n_size - (off_t)bp->b_blkno * DEV_BSIZE;
sys/fs/nfsclient/nfs_clbio.c
1682
if (bp->b_dirtyend > bp->b_dirtyoff) {
sys/fs/nfsclient/nfs_clbio.c
1683
io.iov_len = uiop->uio_resid = bp->b_dirtyend
sys/fs/nfsclient/nfs_clbio.c
1684
- bp->b_dirtyoff;
sys/fs/nfsclient/nfs_clbio.c
1685
uiop->uio_offset = (off_t)bp->b_blkno * DEV_BSIZE
sys/fs/nfsclient/nfs_clbio.c
1686
+ bp->b_dirtyoff;
sys/fs/nfsclient/nfs_clbio.c
1687
io.iov_base = (char *)bp->b_data + bp->b_dirtyoff;
sys/fs/nfsclient/nfs_clbio.c
1691
if ((bp->b_flags & (B_ASYNC | B_NEEDCOMMIT | B_NOCACHE | B_CLUSTER)) == B_ASYNC)
sys/fs/nfsclient/nfs_clbio.c
1713
bp->b_flags |= B_NEEDCOMMIT;
sys/fs/nfsclient/nfs_clbio.c
1714
if (bp->b_dirtyoff == 0
sys/fs/nfsclient/nfs_clbio.c
1715
&& bp->b_dirtyend == bp->b_bcount)
sys/fs/nfsclient/nfs_clbio.c
1716
bp->b_flags |= B_CLUSTEROK;
sys/fs/nfsclient/nfs_clbio.c
1718
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
sys/fs/nfsclient/nfs_clbio.c
1759
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
sys/fs/nfsclient/nfs_clbio.c
1760
bp->b_flags &= ~(B_INVAL|B_NOCACHE);
sys/fs/nfsclient/nfs_clbio.c
1761
if ((bp->b_flags & B_PAGING) == 0) {
sys/fs/nfsclient/nfs_clbio.c
1762
bdirty(bp);
sys/fs/nfsclient/nfs_clbio.c
1763
bp->b_flags &= ~B_DONE;
sys/fs/nfsclient/nfs_clbio.c
1766
(bp->b_flags & B_ASYNC) == 0)
sys/fs/nfsclient/nfs_clbio.c
1767
bp->b_flags |= B_EINTR;
sys/fs/nfsclient/nfs_clbio.c
1770
bp->b_ioflags |= BIO_ERROR;
sys/fs/nfsclient/nfs_clbio.c
1771
bp->b_flags |= B_INVAL;
sys/fs/nfsclient/nfs_clbio.c
1772
bp->b_error = np->n_error = error;
sys/fs/nfsclient/nfs_clbio.c
1779
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/fs/nfsclient/nfs_clbio.c
1782
bp->b_resid = 0;
sys/fs/nfsclient/nfs_clbio.c
1783
bufdone(bp);
sys/fs/nfsclient/nfs_clbio.c
1787
bp->b_resid = uiop->uio_resid;
sys/fs/nfsclient/nfs_clbio.c
1790
bufdone(bp);
sys/fs/nfsclient/nfs_clbio.c
181
bp = uma_zalloc(ncl_pbuf_zone, M_WAITOK);
sys/fs/nfsclient/nfs_clbio.c
1816
struct buf *bp;
sys/fs/nfsclient/nfs_clbio.c
1828
bp = nfs_getcacheblk(vp, lbn, bufsize, td);
sys/fs/nfsclient/nfs_clbio.c
1829
if (!bp)
sys/fs/nfsclient/nfs_clbio.c
183
kva = (vm_offset_t) bp->b_data;
sys/fs/nfsclient/nfs_clbio.c
1831
if (bp->b_dirtyoff > bp->b_bcount)
sys/fs/nfsclient/nfs_clbio.c
1832
bp->b_dirtyoff = bp->b_bcount;
sys/fs/nfsclient/nfs_clbio.c
1833
if (bp->b_dirtyend > bp->b_bcount)
sys/fs/nfsclient/nfs_clbio.c
1834
bp->b_dirtyend = bp->b_bcount;
sys/fs/nfsclient/nfs_clbio.c
1835
bp->b_flags |= B_RELBUF; /* don't leave garbage around */
sys/fs/nfsclient/nfs_clbio.c
1836
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
202
uma_zfree(ncl_pbuf_zone, bp);
sys/fs/nfsclient/nfs_clbio.c
436
struct buf *bp, *rabp;
sys/fs/nfsclient/nfs_clbio.c
538
bp = nfs_getcacheblk(vp, lbn, bcount, td);
sys/fs/nfsclient/nfs_clbio.c
540
if (!bp) {
sys/fs/nfsclient/nfs_clbio.c
552
if ((bp->b_flags & B_CACHE) == 0) {
sys/fs/nfsclient/nfs_clbio.c
553
bp->b_iocmd = BIO_READ;
sys/fs/nfsclient/nfs_clbio.c
554
vfs_busy_pages(bp, 0);
sys/fs/nfsclient/nfs_clbio.c
555
error = ncl_doio(vp, bp, cred, td, 0);
sys/fs/nfsclient/nfs_clbio.c
557
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
576
bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, td);
sys/fs/nfsclient/nfs_clbio.c
577
if (!bp) {
sys/fs/nfsclient/nfs_clbio.c
583
if ((bp->b_flags & B_CACHE) == 0) {
sys/fs/nfsclient/nfs_clbio.c
584
bp->b_iocmd = BIO_READ;
sys/fs/nfsclient/nfs_clbio.c
585
vfs_busy_pages(bp, 0);
sys/fs/nfsclient/nfs_clbio.c
586
error = ncl_doio(vp, bp, cred, td, 0);
sys/fs/nfsclient/nfs_clbio.c
588
bp->b_ioflags |= BIO_ERROR;
sys/fs/nfsclient/nfs_clbio.c
589
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
593
n = MIN(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid);
sys/fs/nfsclient/nfs_clbio.c
608
bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSIZ, td);
sys/fs/nfsclient/nfs_clbio.c
609
if (!bp) {
sys/fs/nfsclient/nfs_clbio.c
615
if ((bp->b_flags & B_CACHE) == 0) {
sys/fs/nfsclient/nfs_clbio.c
616
bp->b_iocmd = BIO_READ;
sys/fs/nfsclient/nfs_clbio.c
617
vfs_busy_pages(bp, 0);
sys/fs/nfsclient/nfs_clbio.c
618
error = ncl_doio(vp, bp, cred, td, 0);
sys/fs/nfsclient/nfs_clbio.c
620
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
645
bp = nfs_getcacheblk(vp, i, NFS_DIRBLKSIZ, td);
sys/fs/nfsclient/nfs_clbio.c
646
if (!bp) {
sys/fs/nfsclient/nfs_clbio.c
652
if ((bp->b_flags & B_CACHE) == 0) {
sys/fs/nfsclient/nfs_clbio.c
653
bp->b_iocmd = BIO_READ;
sys/fs/nfsclient/nfs_clbio.c
654
vfs_busy_pages(bp, 0);
sys/fs/nfsclient/nfs_clbio.c
655
error = ncl_doio(vp, bp, cred, td, 0);
sys/fs/nfsclient/nfs_clbio.c
660
if (error == 0 && (bp->b_flags & B_INVAL))
sys/fs/nfsclient/nfs_clbio.c
670
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
689
(bp->b_flags & B_INVAL) == 0 &&
sys/fs/nfsclient/nfs_clbio.c
724
n = lmin(uio->uio_resid, NFS_DIRBLKSIZ - bp->b_resid - on);
sys/fs/nfsclient/nfs_clbio.c
731
bp = NULL;
sys/fs/nfsclient/nfs_clbio.c
736
error = vn_io_fault_uiomove(bp->b_data + on, (int)n, uio);
sys/fs/nfsclient/nfs_clbio.c
740
if (bp != NULL)
sys/fs/nfsclient/nfs_clbio.c
741
brelse(bp);
sys/fs/nfsclient/nfs_clbio.c
837
struct buf *bp;
sys/fs/nfsclient/nfs_clbio.c
985
TAILQ_FOREACH(bp, &vp->v_bufobj.bo_dirty.bv_hd,
sys/fs/nfsclient/nfs_clbio.c
987
if (bp->b_flags & B_NEEDCOMMIT)
sys/fs/nfsclient/nfs_clbio.c
988
wouldcommit += bp->b_bcount;
sys/fs/nfsclient/nfs_clnfsiod.c
245
struct buf *bp;
sys/fs/nfsclient/nfs_clnfsiod.c
285
while ((bp = TAILQ_FIRST(&nmp->nm_bufq)) != NULL) {
sys/fs/nfsclient/nfs_clnfsiod.c
287
TAILQ_REMOVE(&nmp->nm_bufq, bp, b_freelist);
sys/fs/nfsclient/nfs_clnfsiod.c
294
KASSERT((bp->b_flags & B_DIRECT) == 0,
sys/fs/nfsclient/nfs_clnfsiod.c
296
if (bp->b_iocmd == BIO_READ)
sys/fs/nfsclient/nfs_clnfsiod.c
297
(void) ncl_doio(bp->b_vp, bp, bp->b_rcred,
sys/fs/nfsclient/nfs_clnfsiod.c
300
(void) ncl_doio(bp->b_vp, bp, bp->b_wcred,
sys/fs/nfsclient/nfs_clsubs.c
347
struct buf *bp, *nbp;
sys/fs/nfsclient/nfs_clsubs.c
355
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/fs/nfsclient/nfs_clsubs.c
356
if (!BUF_ISLOCKED(bp) &&
sys/fs/nfsclient/nfs_clsubs.c
357
(bp->b_flags & (B_DELWRI | B_NEEDCOMMIT))
sys/fs/nfsclient/nfs_clsubs.c
359
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
sys/fs/nfsclient/nfs_clvnops.c
3034
struct buf *bp;
sys/fs/nfsclient/nfs_clvnops.c
3038
bp = ap->a_bp;
sys/fs/nfsclient/nfs_clvnops.c
3040
KASSERT(bp->b_vp == vp, ("missing b_getvp"));
sys/fs/nfsclient/nfs_clvnops.c
3041
KASSERT(!(bp->b_flags & B_DONE),
sys/fs/nfsclient/nfs_clvnops.c
3042
("nfs_strategy: buffer %p unexpectedly marked B_DONE", bp));
sys/fs/nfsclient/nfs_clvnops.c
3044
if (vp->v_type == VREG && bp->b_blkno == bp->b_lblkno)
sys/fs/nfsclient/nfs_clvnops.c
3045
bp->b_blkno = bp->b_lblkno * (vp->v_bufobj.bo_bsize /
sys/fs/nfsclient/nfs_clvnops.c
3047
if (bp->b_iocmd == BIO_READ)
sys/fs/nfsclient/nfs_clvnops.c
3048
cr = bp->b_rcred;
sys/fs/nfsclient/nfs_clvnops.c
3050
cr = bp->b_wcred;
sys/fs/nfsclient/nfs_clvnops.c
3057
if ((bp->b_flags & B_ASYNC) == 0 ||
sys/fs/nfsclient/nfs_clvnops.c
3058
ncl_asyncio(VFSTONFS(vp->v_mount), bp, NOCRED, curthread))
sys/fs/nfsclient/nfs_clvnops.c
3059
(void) ncl_doio(vp, bp, cr, curthread, 1);
sys/fs/nfsclient/nfs_clvnops.c
3096
struct buf *bp;
sys/fs/nfsclient/nfs_clvnops.c
3139
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/fs/nfsclient/nfs_clvnops.c
3140
if (!BUF_ISLOCKED(bp) &&
sys/fs/nfsclient/nfs_clvnops.c
3141
(bp->b_flags & (B_DELWRI | B_NEEDCOMMIT))
sys/fs/nfsclient/nfs_clvnops.c
3170
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/fs/nfsclient/nfs_clvnops.c
3173
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL)) {
sys/fs/nfsclient/nfs_clvnops.c
3174
nbp = TAILQ_NEXT(bp, b_bobufs);
sys/fs/nfsclient/nfs_clvnops.c
3177
if ((bp->b_flags & (B_DELWRI | B_NEEDCOMMIT)) !=
sys/fs/nfsclient/nfs_clvnops.c
3179
BUF_UNLOCK(bp);
sys/fs/nfsclient/nfs_clvnops.c
3180
nbp = TAILQ_NEXT(bp, b_bobufs);
sys/fs/nfsclient/nfs_clvnops.c
3184
bremfree(bp);
sys/fs/nfsclient/nfs_clvnops.c
3197
wcred = bp->b_wcred;
sys/fs/nfsclient/nfs_clvnops.c
3198
else if (wcred != bp->b_wcred)
sys/fs/nfsclient/nfs_clvnops.c
3200
vfs_busy_pages(bp, 0);
sys/fs/nfsclient/nfs_clvnops.c
3208
nbp = TAILQ_NEXT(bp, b_bobufs);
sys/fs/nfsclient/nfs_clvnops.c
3217
bvec[bvecpos++] = bp;
sys/fs/nfsclient/nfs_clvnops.c
3218
toff = ((u_quad_t)bp->b_blkno) * DEV_BSIZE +
sys/fs/nfsclient/nfs_clvnops.c
3219
bp->b_dirtyoff;
sys/fs/nfsclient/nfs_clvnops.c
3222
toff += (u_quad_t)(bp->b_dirtyend - bp->b_dirtyoff);
sys/fs/nfsclient/nfs_clvnops.c
3242
bp = bvec[i];
sys/fs/nfsclient/nfs_clvnops.c
3243
off = ((u_quad_t)bp->b_blkno) * DEV_BSIZE +
sys/fs/nfsclient/nfs_clvnops.c
3244
bp->b_dirtyoff;
sys/fs/nfsclient/nfs_clvnops.c
3245
size = (u_quad_t)(bp->b_dirtyend
sys/fs/nfsclient/nfs_clvnops.c
3246
- bp->b_dirtyoff);
sys/fs/nfsclient/nfs_clvnops.c
3248
bp->b_wcred, td);
sys/fs/nfsclient/nfs_clvnops.c
3262
bp = bvec[i];
sys/fs/nfsclient/nfs_clvnops.c
3263
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
sys/fs/nfsclient/nfs_clvnops.c
3268
vfs_unbusy_pages(bp);
sys/fs/nfsclient/nfs_clvnops.c
3269
brelse(bp);
sys/fs/nfsclient/nfs_clvnops.c
3279
bp->b_flags |= B_ASYNC;
sys/fs/nfsclient/nfs_clvnops.c
3280
bundirty(bp);
sys/fs/nfsclient/nfs_clvnops.c
3281
bp->b_flags &= ~B_DONE;
sys/fs/nfsclient/nfs_clvnops.c
3282
bp->b_ioflags &= ~BIO_ERROR;
sys/fs/nfsclient/nfs_clvnops.c
3283
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/fs/nfsclient/nfs_clvnops.c
3284
bufdone(bp);
sys/fs/nfsclient/nfs_clvnops.c
3294
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/fs/nfsclient/nfs_clvnops.c
3295
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL)) {
sys/fs/nfsclient/nfs_clvnops.c
3299
error = BUF_TIMELOCK(bp,
sys/fs/nfsclient/nfs_clvnops.c
3303
BUF_UNLOCK(bp);
sys/fs/nfsclient/nfs_clvnops.c
3328
if ((bp->b_flags & B_DELWRI) == 0)
sys/fs/nfsclient/nfs_clvnops.c
3330
if ((passone || !commit) && (bp->b_flags & B_NEEDCOMMIT)) {
sys/fs/nfsclient/nfs_clvnops.c
3331
BUF_UNLOCK(bp);
sys/fs/nfsclient/nfs_clvnops.c
3335
bremfree(bp);
sys/fs/nfsclient/nfs_clvnops.c
3336
bp->b_flags |= B_ASYNC;
sys/fs/nfsclient/nfs_clvnops.c
3337
bwrite(bp);
sys/fs/nfsclient/nfs_clvnops.c
554
char* bp;
sys/fs/nfsclient/nfs_clvnops.c
555
bp = malloc(NFS_DIRBLKSIZ, M_TEMP, M_WAITOK);
sys/fs/nfsclient/nfs_clvnops.c
556
aiov.iov_base = bp;
sys/fs/nfsclient/nfs_clvnops.c
560
free(bp, M_TEMP);
sys/fs/nfsserver/nfs_nfsdport.c
1880
struct buf *bp;
sys/fs/nfsserver/nfs_nfsdport.c
1892
if ((bp = gbincore(&vp->v_bufobj, lblkno)) != NULL) {
sys/fs/nfsserver/nfs_nfsdport.c
1893
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL |
sys/fs/nfsserver/nfs_nfsdport.c
1898
if ((bp->b_flags & (B_DELWRI|B_INVAL)) ==
sys/fs/nfsserver/nfs_nfsdport.c
1900
bremfree(bp);
sys/fs/nfsserver/nfs_nfsdport.c
1901
bp->b_flags &= ~B_ASYNC;
sys/fs/nfsserver/nfs_nfsdport.c
1902
bwrite(bp);
sys/fs/nfsserver/nfs_nfsdport.c
1905
BUF_UNLOCK(bp);
sys/fs/p9fs/p9fs_vnops.c
1890
p9fs_doio(struct vnode *vp, struct buf *bp, struct p9_fid *vofid, struct ucred *cr)
sys/fs/p9fs/p9fs_vnops.c
1913
if (bp->b_iocmd == BIO_READ) {
sys/fs/p9fs/p9fs_vnops.c
1914
io.iov_len = uiov->uio_resid = bp->b_bcount;
sys/fs/p9fs/p9fs_vnops.c
1915
io.iov_base = bp->b_data;
sys/fs/p9fs/p9fs_vnops.c
1922
uiov->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE;
sys/fs/p9fs/p9fs_vnops.c
1926
int nread = bp->b_bcount - left;
sys/fs/p9fs/p9fs_vnops.c
1929
bzero((char *)bp->b_data + nread, left);
sys/fs/p9fs/p9fs_vnops.c
1961
if (bp->b_dirtyend > bp->b_dirtyoff) {
sys/fs/p9fs/p9fs_vnops.c
1962
io.iov_len = uiov->uio_resid = bp->b_dirtyend - bp->b_dirtyoff;
sys/fs/p9fs/p9fs_vnops.c
1963
uiov->uio_offset = ((off_t)bp->b_blkno) * PAGE_SIZE + bp->b_dirtyoff;
sys/fs/p9fs/p9fs_vnops.c
1964
io.iov_base = (char *)bp->b_data + bp->b_dirtyoff;
sys/fs/p9fs/p9fs_vnops.c
2010
bp->b_resid = 0;
sys/fs/p9fs/p9fs_vnops.c
2017
bp->b_error = error;
sys/fs/p9fs/p9fs_vnops.c
2018
bp->b_ioflags |= BIO_ERROR;
sys/fs/p9fs/p9fs_vnops.c
2020
bp->b_resid = uiov->uio_resid;
sys/fs/p9fs/p9fs_vnops.c
2022
bufdone(bp);
sys/fs/p9fs/p9fs_vnops.c
2035
struct buf *bp;
sys/fs/p9fs/p9fs_vnops.c
2041
bp = ap->a_bp;
sys/fs/p9fs/p9fs_vnops.c
2044
P9_DEBUG(VOPS, "%s: vp %p, iocmd %d\n ", __func__, vp, bp->b_iocmd);
sys/fs/p9fs/p9fs_vnops.c
2046
if (bp->b_iocmd == BIO_READ)
sys/fs/p9fs/p9fs_vnops.c
2047
cr = bp->b_rcred;
sys/fs/p9fs/p9fs_vnops.c
2049
cr = bp->b_wcred;
sys/fs/p9fs/p9fs_vnops.c
2051
error = p9fs_get_open_fid(vp, bp->b_iocmd == BIO_READ ? FREAD : FWRITE, cr, &ostate);
sys/fs/p9fs/p9fs_vnops.c
2054
bp->b_error = error;
sys/fs/p9fs/p9fs_vnops.c
2055
bp->b_ioflags |= BIO_ERROR;
sys/fs/p9fs/p9fs_vnops.c
2056
bufdone(bp);
sys/fs/p9fs/p9fs_vnops.c
2060
p9fs_doio(vp, bp, ostate.vofid, cr);
sys/fs/p9fs/p9fs_vnops.c
2183
struct buf *bp;
sys/fs/p9fs/p9fs_vnops.c
2207
bp = uma_zalloc(p9fs_pbuf_zone, M_WAITOK);
sys/fs/p9fs/p9fs_vnops.c
2208
kva = (vm_offset_t) bp->b_data;
sys/fs/p9fs/p9fs_vnops.c
2230
uma_zfree(p9fs_pbuf_zone, bp);
sys/fs/smbfs/smbfs.h
93
int smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td);
sys/fs/smbfs/smbfs_io.c
315
smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td)
sys/fs/smbfs/smbfs_io.c
333
if (bp->b_iocmd == BIO_READ) {
sys/fs/smbfs/smbfs_io.c
334
io.iov_len = uiop->uio_resid = bp->b_bcount;
sys/fs/smbfs/smbfs_io.c
335
io.iov_base = bp->b_data;
sys/fs/smbfs/smbfs_io.c
339
uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE;
sys/fs/smbfs/smbfs_io.c
345
int nread = bp->b_bcount - left;
sys/fs/smbfs/smbfs_io.c
347
bzero((char *)bp->b_data + nread, left);
sys/fs/smbfs/smbfs_io.c
355
bp->b_error = error;
sys/fs/smbfs/smbfs_io.c
356
bp->b_ioflags |= BIO_ERROR;
sys/fs/smbfs/smbfs_io.c
359
if (((bp->b_blkno * DEV_BSIZE) + bp->b_dirtyend) > np->n_size)
sys/fs/smbfs/smbfs_io.c
360
bp->b_dirtyend = np->n_size - (bp->b_blkno * DEV_BSIZE);
sys/fs/smbfs/smbfs_io.c
362
if (bp->b_dirtyend > bp->b_dirtyoff) {
sys/fs/smbfs/smbfs_io.c
363
io.iov_len = uiop->uio_resid = bp->b_dirtyend - bp->b_dirtyoff;
sys/fs/smbfs/smbfs_io.c
364
uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff;
sys/fs/smbfs/smbfs_io.c
365
io.iov_base = (char *)bp->b_data + bp->b_dirtyoff;
sys/fs/smbfs/smbfs_io.c
383
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
sys/fs/smbfs/smbfs_io.c
384
bp->b_flags &= ~(B_INVAL|B_NOCACHE);
sys/fs/smbfs/smbfs_io.c
385
if ((bp->b_flags & B_ASYNC) == 0)
sys/fs/smbfs/smbfs_io.c
386
bp->b_flags |= B_EINTR;
sys/fs/smbfs/smbfs_io.c
387
if ((bp->b_flags & B_PAGING) == 0) {
sys/fs/smbfs/smbfs_io.c
388
bdirty(bp);
sys/fs/smbfs/smbfs_io.c
389
bp->b_flags &= ~B_DONE;
sys/fs/smbfs/smbfs_io.c
391
if ((bp->b_flags & B_ASYNC) == 0)
sys/fs/smbfs/smbfs_io.c
392
bp->b_flags |= B_EINTR;
sys/fs/smbfs/smbfs_io.c
395
bp->b_ioflags |= BIO_ERROR;
sys/fs/smbfs/smbfs_io.c
396
bp->b_error = error;
sys/fs/smbfs/smbfs_io.c
398
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/fs/smbfs/smbfs_io.c
401
bp->b_resid = 0;
sys/fs/smbfs/smbfs_io.c
402
bufdone(bp);
sys/fs/smbfs/smbfs_io.c
408
bp->b_resid = uiop->uio_resid;
sys/fs/smbfs/smbfs_io.c
409
bufdone(bp);
sys/fs/smbfs/smbfs_io.c
429
struct buf *bp;
sys/fs/smbfs/smbfs_io.c
467
bp = uma_zalloc(smbfs_pbuf_zone, M_WAITOK);
sys/fs/smbfs/smbfs_io.c
469
kva = (vm_offset_t) bp->b_data;
sys/fs/smbfs/smbfs_io.c
489
uma_zfree(smbfs_pbuf_zone, bp);
sys/fs/smbfs/smbfs_io.c
563
struct buf *bp;
sys/fs/smbfs/smbfs_io.c
585
bp = uma_zalloc(smbfs_pbuf_zone, M_WAITOK);
sys/fs/smbfs/smbfs_io.c
587
kva = (vm_offset_t) bp->b_data;
sys/fs/smbfs/smbfs_io.c
613
uma_zfree(smbfs_pbuf_zone, bp);
sys/fs/smbfs/smbfs_vnops.c
828
struct buf *bp=ap->a_bp;
sys/fs/smbfs/smbfs_vnops.c
833
if (bp->b_flags & B_ASYNC)
sys/fs/smbfs/smbfs_vnops.c
837
if (bp->b_iocmd == BIO_READ)
sys/fs/smbfs/smbfs_vnops.c
838
cr = bp->b_rcred;
sys/fs/smbfs/smbfs_vnops.c
840
cr = bp->b_wcred;
sys/fs/smbfs/smbfs_vnops.c
842
if ((bp->b_flags & B_ASYNC) == 0 )
sys/fs/smbfs/smbfs_vnops.c
843
(void)smbfs_doio(ap->a_vp, bp, cr, td);
sys/fs/tarfs/tarfs_io.c
572
struct buf *bp = ap->a_bp;
sys/fs/tarfs/tarfs_io.c
577
iov.iov_base = bp->b_data;
sys/fs/tarfs/tarfs_io.c
578
iov.iov_len = bp->b_bcount;
sys/fs/tarfs/tarfs_io.c
579
off = bp->b_iooffset;
sys/fs/tarfs/tarfs_io.c
580
len = bp->b_bcount;
sys/fs/tarfs/tarfs_io.c
581
bp->b_resid = len;
sys/fs/tarfs/tarfs_io.c
589
error = VOP_READ(vp, &auio, IO_DIRECT | IO_NODELOCKED, bp->b_rcred);
sys/fs/tarfs/tarfs_io.c
590
bp->b_flags |= B_DONE;
sys/fs/tarfs/tarfs_io.c
592
bp->b_ioflags |= BIO_ERROR;
sys/fs/tarfs/tarfs_io.c
593
bp->b_error = error;
sys/fs/tarfs/tarfs_vnops.c
624
struct buf *bp;
sys/fs/tarfs/tarfs_vnops.c
630
bp = ap->a_bp;
sys/fs/tarfs/tarfs_vnops.c
631
MPASS(bp->b_iocmd == BIO_READ);
sys/fs/tarfs/tarfs_vnops.c
632
MPASS(bp->b_iooffset >= 0);
sys/fs/tarfs/tarfs_vnops.c
633
MPASS(bp->b_bcount > 0);
sys/fs/tarfs/tarfs_vnops.c
634
MPASS(bp->b_bufsize >= bp->b_bcount);
sys/fs/tarfs/tarfs_vnops.c
636
tnp->name, (size_t)bp->b_iooffset, bp->b_bcount, bp->b_bufsize);
sys/fs/tarfs/tarfs_vnops.c
637
iov.iov_base = bp->b_data;
sys/fs/tarfs/tarfs_vnops.c
638
iov.iov_len = bp->b_bcount;
sys/fs/tarfs/tarfs_vnops.c
639
off = bp->b_iooffset;
sys/fs/tarfs/tarfs_vnops.c
640
len = bp->b_bcount;
sys/fs/tarfs/tarfs_vnops.c
641
bp->b_resid = len;
sys/fs/tarfs/tarfs_vnops.c
659
bp->b_resid -= len - auio.uio_resid;
sys/fs/tarfs/tarfs_vnops.c
662
bp->b_ioflags |= BIO_ERROR;
sys/fs/tarfs/tarfs_vnops.c
663
bp->b_error = error;
sys/fs/tarfs/tarfs_vnops.c
665
bp->b_flags |= B_DONE;
sys/fs/udf/udf.h
103
(size + udfmp->bmask) & ~udfmp->bmask, bp));
sys/fs/udf/udf.h
65
struct buf *bp;
sys/fs/udf/udf.h
92
#define RDSECTOR(devvp, sector, size, bp) \
sys/fs/udf/udf.h
93
bread(devvp, sector << (udfmp->bshift - DEV_BSHIFT), size, NOCRED, bp)
sys/fs/udf/udf.h
98
udf_readdevblks(struct udf_mnt *udfmp, daddr_t sector, int size, struct buf **bp)
sys/fs/udf/udf_vfsops.c
298
struct buf *bp = NULL;
sys/fs/udf/udf_vfsops.c
378
NOCRED, &bp)) != 0)
sys/fs/udf/udf_vfsops.c
380
if ((error = udf_checktag((struct desc_tag *)bp->b_data, TAGID_ANCHOR)))
sys/fs/udf/udf_vfsops.c
383
bcopy(bp->b_data, &avdp, sizeof(struct anchor_vdp));
sys/fs/udf/udf_vfsops.c
384
brelse(bp);
sys/fs/udf/udf_vfsops.c
385
bp = NULL;
sys/fs/udf/udf_vfsops.c
397
bsize, NOCRED, &bp)) != 0) {
sys/fs/udf/udf_vfsops.c
401
lvd = (struct logvol_desc *)bp->b_data;
sys/fs/udf/udf_vfsops.c
417
pd = (struct part_desc *)bp->b_data;
sys/fs/udf/udf_vfsops.c
425
brelse(bp);
sys/fs/udf/udf_vfsops.c
426
bp = NULL;
sys/fs/udf/udf_vfsops.c
448
if ((error = RDSECTOR(devvp, sector, udfmp->bsize, &bp)) != 0) {
sys/fs/udf/udf_vfsops.c
452
fsd = (struct fileset_desc *)bp->b_data;
sys/fs/udf/udf_vfsops.c
459
brelse(bp);
sys/fs/udf/udf_vfsops.c
460
bp = NULL;
sys/fs/udf/udf_vfsops.c
478
if ((error = udf_readdevblks(udfmp, sector, size, &bp)) != 0) {
sys/fs/udf/udf_vfsops.c
483
root_fentry = (struct file_entry *)bp->b_data;
sys/fs/udf/udf_vfsops.c
489
brelse(bp);
sys/fs/udf/udf_vfsops.c
490
bp = NULL;
sys/fs/udf/udf_vfsops.c
497
if (bp != NULL)
sys/fs/udf/udf_vfsops.c
498
brelse(bp);
sys/fs/udf/udf_vfsops.c
579
struct buf *bp;
sys/fs/udf/udf_vfsops.c
640
if ((error = RDSECTOR(devvp, sector, udfmp->bsize, &bp)) != 0) {
sys/fs/udf/udf_vfsops.c
648
fe = (struct file_entry *)bp->b_data;
sys/fs/udf/udf_vfsops.c
675
bcopy(bp->b_data, unode->fentry, size);
sys/fs/udf/udf_vfsops.c
677
brelse(bp);
sys/fs/udf/udf_vfsops.c
678
bp = NULL;
sys/fs/udf/udf_vfsops.c
722
brelse(bp);
sys/fs/udf/udf_vfsops.c
760
struct buf *bp;
sys/fs/udf/udf_vfsops.c
808
le32toh(pms->st_size), &bp)) != 0) {
sys/fs/udf/udf_vfsops.c
809
if (bp != NULL)
sys/fs/udf/udf_vfsops.c
810
brelse(bp);
sys/fs/udf/udf_vfsops.c
816
bcopy(bp->b_data, udfmp->s_table, le32toh(pms->st_size));
sys/fs/udf/udf_vfsops.c
817
brelse(bp);
sys/fs/udf/udf_vnops.c
1036
struct buf *bp;
sys/fs/udf/udf_vnops.c
1045
bp = a->a_bp;
sys/fs/udf/udf_vnops.c
1049
if (bp->b_blkno == bp->b_lblkno) {
sys/fs/udf/udf_vnops.c
1050
offset = lblktosize(node->udfmp, bp->b_lblkno);
sys/fs/udf/udf_vnops.c
1053
clrbuf(bp);
sys/fs/udf/udf_vnops.c
1054
bp->b_blkno = -1;
sys/fs/udf/udf_vnops.c
1055
bufdone(bp);
sys/fs/udf/udf_vnops.c
1059
bp->b_blkno = sector << (node->udfmp->bshift - DEV_BSHIFT);
sys/fs/udf/udf_vnops.c
1062
bp->b_iooffset = dbtob(bp->b_blkno);
sys/fs/udf/udf_vnops.c
1063
BO_STRATEGY(bo, bp);
sys/fs/udf/udf_vnops.c
1323
struct buf **bp, uint8_t **data)
sys/fs/udf/udf_vnops.c
1372
*bp = NULL;
sys/fs/udf/udf_vnops.c
1373
if ((error = bread(vp, lblkno(udfmp, offset), adj_size, NOCRED, bp))) {
sys/fs/udf/udf_vnops.c
1379
bp1 = *bp;
sys/fs/udf/udf_vnops.c
451
struct buf *bp;
sys/fs/udf/udf_vnops.c
503
(ap->a_ioflag >> 16), 0, &bp);
sys/fs/udf/udf_vnops.c
505
error = bread(vp, lbn, size, NOCRED, &bp);
sys/fs/udf/udf_vnops.c
508
error = bread(vp, lbn, size, NOCRED, &bp);
sys/fs/udf/udf_vnops.c
511
brelse(bp);
sys/fs/udf/udf_vnops.c
514
n = min(n, size - bp->b_resid);
sys/fs/udf/udf_vnops.c
516
error = uiomove(bp->b_data + on, (int)n, uio);
sys/fs/udf/udf_vnops.c
517
brelse(bp);
sys/fs/udf/udf_vnops.c
672
&ds->bp, &ds->data);
sys/fs/udf/udf_vnops.c
675
if (ds->bp != NULL)
sys/fs/udf/udf_vnops.c
676
brelse(ds->bp);
sys/fs/udf/udf_vnops.c
718
if (ds->bp != NULL)
sys/fs/udf/udf_vnops.c
719
brelse(ds->bp);
sys/fs/udf/udf_vnops.c
725
&ds->bp, &ds->data);
sys/fs/udf/udf_vnops.c
75
struct buf **bp, uint8_t **data);
sys/fs/udf/udf_vnops.c
776
if (ds->bp != NULL)
sys/fs/udf/udf_vnops.c
777
brelse(ds->bp);
sys/geom/cache/g_cache.c
173
g_cache_deliver(struct g_cache_softc *sc, struct bio *bp,
sys/geom/cache/g_cache.c
179
KASSERT(OFF2BNO(bp->bio_offset, sc) <= dp->d_bno, ("wrong entry"));
sys/geom/cache/g_cache.c
180
KASSERT(OFF2BNO(bp->bio_offset + bp->bio_length - 1, sc) >=
sys/geom/cache/g_cache.c
184
off = MAX(bp->bio_offset, off1);
sys/geom/cache/g_cache.c
185
len = MIN(bp->bio_offset + bp->bio_length, off1 + sc->sc_bsize) - off;
sys/geom/cache/g_cache.c
187
if (bp->bio_error == 0)
sys/geom/cache/g_cache.c
188
bp->bio_error = error;
sys/geom/cache/g_cache.c
189
if (bp->bio_error == 0) {
sys/geom/cache/g_cache.c
191
bp->bio_data + (off - bp->bio_offset), len);
sys/geom/cache/g_cache.c
193
bp->bio_completed += len;
sys/geom/cache/g_cache.c
194
KASSERT(bp->bio_completed <= bp->bio_length, ("extra data"));
sys/geom/cache/g_cache.c
195
if (bp->bio_completed == bp->bio_length) {
sys/geom/cache/g_cache.c
196
if (bp->bio_error != 0)
sys/geom/cache/g_cache.c
197
bp->bio_completed = 0;
sys/geom/cache/g_cache.c
198
g_io_deliver(bp, bp->bio_error);
sys/geom/cache/g_cache.c
213
g_cache_done(struct bio *bp)
sys/geom/cache/g_cache.c
219
sc = bp->bio_from->geom->softc;
sys/geom/cache/g_cache.c
220
KASSERT(G_CACHE_DESC1(bp) == sc, ("corrupt bio_caller in g_cache_done()"));
sys/geom/cache/g_cache.c
221
dp = G_CACHE_DESC2(bp);
sys/geom/cache/g_cache.c
227
g_cache_deliver(sc, bp2, dp, bp->bio_error);
sys/geom/cache/g_cache.c
234
} else if (bp->bio_error) {
sys/geom/cache/g_cache.c
243
g_destroy_bio(bp);
sys/geom/cache/g_cache.c
260
g_cache_read(struct g_cache_softc *sc, struct bio *bp)
sys/geom/cache/g_cache.c
267
OFF2BNO(bp->bio_offset + bp->bio_completed, sc));
sys/geom/cache/g_cache.c
272
G_CACHE_NEXT_BIO1(bp) = sc;
sys/geom/cache/g_cache.c
273
G_CACHE_NEXT_BIO2(bp) = dp->d_biolist;
sys/geom/cache/g_cache.c
274
dp->d_biolist = bp;
sys/geom/cache/g_cache.c
276
g_cache_deliver(sc, bp, dp, 0);
sys/geom/cache/g_cache.c
288
cbp = g_clone_bio(bp);
sys/geom/cache/g_cache.c
295
dp->d_bno = OFF2BNO(bp->bio_offset + bp->bio_completed, sc);
sys/geom/cache/g_cache.c
296
G_CACHE_NEXT_BIO1(bp) = sc;
sys/geom/cache/g_cache.c
297
G_CACHE_NEXT_BIO2(bp) = NULL;
sys/geom/cache/g_cache.c
298
dp->d_biolist = bp;
sys/geom/cache/g_cache.c
309
g_io_request(cbp, LIST_FIRST(&bp->bio_to->geom->consumer));
sys/geom/cache/g_cache.c
314
g_cache_invalidate(struct g_cache_softc *sc, struct bio *bp)
sys/geom/cache/g_cache.c
320
bno = OFF2BNO(bp->bio_offset, sc);
sys/geom/cache/g_cache.c
321
lim = OFF2BNO(bp->bio_offset + bp->bio_length - 1, sc);
sys/geom/cache/g_cache.c
342
g_cache_start(struct bio *bp)
sys/geom/cache/g_cache.c
349
gp = bp->bio_to->geom;
sys/geom/cache/g_cache.c
351
G_CACHE_LOGREQ(bp, "Request received.");
sys/geom/cache/g_cache.c
352
switch (bp->bio_cmd) {
sys/geom/cache/g_cache.c
355
sc->sc_readbytes += bp->bio_length;
sys/geom/cache/g_cache.c
358
if (bp->bio_offset + bp->bio_length > sc->sc_tail)
sys/geom/cache/g_cache.c
360
if (OFF2BNO(bp->bio_offset, sc) ==
sys/geom/cache/g_cache.c
361
OFF2BNO(bp->bio_offset + bp->bio_length - 1, sc)) {
sys/geom/cache/g_cache.c
363
sc->sc_cachereadbytes += bp->bio_length;
sys/geom/cache/g_cache.c
364
if (g_cache_read(sc, bp) == 0)
sys/geom/cache/g_cache.c
367
sc->sc_cachereadbytes -= bp->bio_length;
sys/geom/cache/g_cache.c
369
} else if (OFF2BNO(bp->bio_offset, sc) + 1 ==
sys/geom/cache/g_cache.c
370
OFF2BNO(bp->bio_offset + bp->bio_length - 1, sc)) {
sys/geom/cache/g_cache.c
372
dp = g_cache_lookup(sc, OFF2BNO(bp->bio_offset, sc));
sys/geom/cache/g_cache.c
378
sc->sc_cachereadbytes += bp->bio_length;
sys/geom/cache/g_cache.c
379
g_cache_deliver(sc, bp, dp, 0);
sys/geom/cache/g_cache.c
381
if (g_cache_read(sc, bp) == 0)
sys/geom/cache/g_cache.c
384
sc->sc_cachereadbytes -= bp->bio_length;
sys/geom/cache/g_cache.c
390
sc->sc_wrotebytes += bp->bio_length;
sys/geom/cache/g_cache.c
391
g_cache_invalidate(sc, bp);
sys/geom/cache/g_cache.c
394
cbp = g_clone_bio(bp);
sys/geom/cache/g_cache.c
396
g_io_deliver(bp, ENOMEM);
sys/geom/cache/g_cache.h
44
#define G_CACHE_LOGREQ(bp, ...) \
sys/geom/cache/g_cache.h
45
_GEOM_DEBUG("GEOM_CACHE", g_cache_debug, 2, (bp), __VA_ARGS__)
sys/geom/cache/g_cache.h
91
#define G_CACHE_NEXT_BIO1(bp) (bp)->bio_driver1
sys/geom/cache/g_cache.h
92
#define G_CACHE_NEXT_BIO2(bp) (bp)->bio_driver2
sys/geom/cache/g_cache.h
93
#define G_CACHE_DESC1(bp) (bp)->bio_caller1
sys/geom/cache/g_cache.h
94
#define G_CACHE_DESC2(bp) (bp)->bio_caller2
sys/geom/concat/g_concat.c
215
g_concat_candelete(struct bio *bp)
sys/geom/concat/g_concat.c
221
sc = bp->bio_to->geom->softc;
sys/geom/concat/g_concat.c
228
g_handleattr(bp, "GEOM::candelete", &val, sizeof(val));
sys/geom/concat/g_concat.c
232
g_concat_kernel_dump(struct bio *bp)
sys/geom/concat/g_concat.c
239
sc = bp->bio_to->geom->softc;
sys/geom/concat/g_concat.c
240
gkd = (struct g_kerneldump *)bp->bio_data;
sys/geom/concat/g_concat.c
247
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/concat/g_concat.c
254
cbp = g_clone_bio(bp);
sys/geom/concat/g_concat.c
256
g_io_deliver(bp, ENOMEM);
sys/geom/concat/g_concat.c
266
g_concat_done(struct bio *bp)
sys/geom/concat/g_concat.c
271
pbp = bp->bio_parent;
sys/geom/concat/g_concat.c
275
pbp->bio_error = bp->bio_error;
sys/geom/concat/g_concat.c
276
pbp->bio_completed += bp->bio_completed;
sys/geom/concat/g_concat.c
283
g_destroy_bio(bp);
sys/geom/concat/g_concat.c
290
g_concat_passdown(struct g_concat_softc *sc, struct bio *bp)
sys/geom/concat/g_concat.c
301
cbp = g_clone_bio(bp);
sys/geom/concat/g_concat.c
305
if (bp->bio_error == 0)
sys/geom/concat/g_concat.c
306
bp->bio_error = ENOMEM;
sys/geom/concat/g_concat.c
307
g_io_deliver(bp, bp->bio_error);
sys/geom/concat/g_concat.c
324
g_concat_start(struct bio *bp)
sys/geom/concat/g_concat.c
334
pp = bp->bio_to;
sys/geom/concat/g_concat.c
342
bp->bio_to->error, bp->bio_to->name));
sys/geom/concat/g_concat.c
344
G_CONCAT_LOGREQ(bp, "Request received.");
sys/geom/concat/g_concat.c
347
switch (bp->bio_cmd) {
sys/geom/concat/g_concat.c
354
g_concat_passdown(sc, bp);
sys/geom/concat/g_concat.c
357
if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) {
sys/geom/concat/g_concat.c
358
g_concat_kernel_dump(bp);
sys/geom/concat/g_concat.c
360
} else if (strcmp("GEOM::candelete", bp->bio_attribute) == 0) {
sys/geom/concat/g_concat.c
361
g_concat_candelete(bp);
sys/geom/concat/g_concat.c
367
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/concat/g_concat.c
371
offset = bp->bio_offset;
sys/geom/concat/g_concat.c
372
length = bp->bio_length;
sys/geom/concat/g_concat.c
373
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/concat/g_concat.c
376
addr = bp->bio_data;
sys/geom/concat/g_concat.c
391
cbp = g_clone_bio(bp);
sys/geom/concat/g_concat.c
395
if (bp->bio_error == 0)
sys/geom/concat/g_concat.c
396
bp->bio_error = ENOMEM;
sys/geom/concat/g_concat.c
397
g_io_deliver(bp, bp->bio_error);
sys/geom/concat/g_concat.c
404
if (len == bp->bio_length)
sys/geom/concat/g_concat.c
410
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/geom/concat/g_concat.c
427
bp->bio_to->geom->class->name, bp->bio_to->geom->name));
sys/geom/concat/g_concat.h
52
#define G_CONCAT_LOGREQ(bp, ...) \
sys/geom/concat/g_concat.h
53
_GEOM_DEBUG("GEOM_CONCAT", g_concat_debug, 2, (bp), __VA_ARGS__)
sys/geom/eli/g_eli.c
1000
bp->bio_driver2 = NULL;
sys/geom/eli/g_eli.c
245
struct bio *bp;
sys/geom/eli/g_eli.c
248
bp = (struct bio *)crp->crp_opaque;
sys/geom/eli/g_eli.c
249
sc = bp->bio_to->geom->softc;
sys/geom/eli/g_eli.c
251
if (wr->w_number == G_ELI_WORKER(bp->bio_pflags))
sys/geom/eli/g_eli.c
255
G_ELI_WORKER(bp->bio_pflags)));
sys/geom/eli/g_eli.c
257
bp->bio_cmd == BIO_READ ? "READ" : "WRITE", wr->w_sid,
sys/geom/eli/g_eli.c
270
g_eli_getattr_done(struct bio *bp)
sys/geom/eli/g_eli.c
272
if (bp->bio_error == 0 &&
sys/geom/eli/g_eli.c
273
!strcmp(bp->bio_attribute, "GEOM::physpath")) {
sys/geom/eli/g_eli.c
274
strlcat(bp->bio_data, "/eli", bp->bio_length);
sys/geom/eli/g_eli.c
276
g_std_done(bp);
sys/geom/eli/g_eli.c
285
g_eli_read_done(struct bio *bp)
sys/geom/eli/g_eli.c
290
G_ELI_LOGREQ(2, bp, "Request done.");
sys/geom/eli/g_eli.c
291
pbp = bp->bio_parent;
sys/geom/eli/g_eli.c
292
if (pbp->bio_error == 0 && bp->bio_error != 0)
sys/geom/eli/g_eli.c
293
pbp->bio_error = bp->bio_error;
sys/geom/eli/g_eli.c
294
g_destroy_bio(bp);
sys/geom/eli/g_eli.c
324
g_eli_write_done(struct bio *bp)
sys/geom/eli/g_eli.c
329
G_ELI_LOGREQ(2, bp, "Request done.");
sys/geom/eli/g_eli.c
330
pbp = bp->bio_parent;
sys/geom/eli/g_eli.c
331
if (pbp->bio_error == 0 && bp->bio_error != 0)
sys/geom/eli/g_eli.c
332
pbp->bio_error = bp->bio_error;
sys/geom/eli/g_eli.c
333
g_destroy_bio(bp);
sys/geom/eli/g_eli.c
457
g_eli_start(struct bio *bp)
sys/geom/eli/g_eli.c
463
sc = bp->bio_to->geom->softc;
sys/geom/eli/g_eli.c
466
bp->bio_to->error, bp->bio_to->name));
sys/geom/eli/g_eli.c
467
G_ELI_LOGREQ(2, bp, "Request received.");
sys/geom/eli/g_eli.c
469
switch (bp->bio_cmd) {
sys/geom/eli/g_eli.c
489
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/eli/g_eli.c
492
cbp = g_clone_bio(bp);
sys/geom/eli/g_eli.c
494
g_io_deliver(bp, ENOMEM);
sys/geom/eli/g_eli.c
497
bp->bio_driver1 = cbp;
sys/geom/eli/g_eli.c
498
bp->bio_pflags = 0;
sys/geom/eli/g_eli.c
499
G_ELI_SET_NEW_BIO(bp->bio_pflags);
sys/geom/eli/g_eli.c
500
switch (bp->bio_cmd) {
sys/geom/eli/g_eli.c
503
g_eli_crypto_read(sc, bp, 0);
sys/geom/eli/g_eli.c
509
bioq_insert_tail(&sc->sc_queue, bp);
sys/geom/eli/g_eli.c
518
if (bp->bio_cmd == BIO_GETATTR)
sys/geom/eli/g_eli.c
619
struct bio *bp;
sys/geom/eli/g_eli.c
623
while ((bp = bioq_takefirst(&sc->sc_queue)) != NULL) {
sys/geom/eli/g_eli.c
624
KASSERT(G_ELI_IS_NEW_BIO(bp->bio_pflags),
sys/geom/eli/g_eli.c
625
("Not new bio when canceling (bp=%p).", bp));
sys/geom/eli/g_eli.c
626
g_io_deliver(bp, ENXIO);
sys/geom/eli/g_eli.c
633
struct bio *bp;
sys/geom/eli/g_eli.c
642
TAILQ_FOREACH(bp, &sc->sc_queue.queue, bio_queue) {
sys/geom/eli/g_eli.c
643
if (!G_ELI_IS_NEW_BIO(bp->bio_pflags))
sys/geom/eli/g_eli.c
646
if (bp != NULL)
sys/geom/eli/g_eli.c
647
bioq_remove(&sc->sc_queue, bp);
sys/geom/eli/g_eli.c
648
return (bp);
sys/geom/eli/g_eli.c
662
struct bio *bp;
sys/geom/eli/g_eli.c
687
bp = g_eli_takefirst(sc);
sys/geom/eli/g_eli.c
688
if (bp == NULL) {
sys/geom/eli/g_eli.c
736
if (G_ELI_IS_NEW_BIO(bp->bio_pflags))
sys/geom/eli/g_eli.c
739
if (G_ELI_IS_NEW_BIO(bp->bio_pflags)) {
sys/geom/eli/g_eli.c
740
G_ELI_SETWORKER(bp->bio_pflags, 0);
sys/geom/eli/g_eli.c
742
if (bp->bio_cmd == BIO_READ)
sys/geom/eli/g_eli.c
743
g_eli_auth_read(sc, bp);
sys/geom/eli/g_eli.c
745
g_eli_auth_run(wr, bp);
sys/geom/eli/g_eli.c
747
if (bp->bio_cmd == BIO_READ)
sys/geom/eli/g_eli.c
748
g_eli_crypto_read(sc, bp, 1);
sys/geom/eli/g_eli.c
750
g_eli_crypto_run(wr, bp);
sys/geom/eli/g_eli.c
754
g_eli_auth_run(wr, bp);
sys/geom/eli/g_eli.c
756
g_eli_crypto_run(wr, bp);
sys/geom/eli/g_eli.c
952
g_eli_alloc_data(struct bio *bp, int sz)
sys/geom/eli/g_eli.c
955
KASSERT(sz <= g_eli_alloc_sz || (bp->bio_flags & BIO_SWAP) == 0,
sys/geom/eli/g_eli.c
959
bp->bio_driver2 = uma_zalloc(g_eli_uma, M_NOWAIT |
sys/geom/eli/g_eli.c
960
((bp->bio_flags & BIO_SWAP) != 0 ? M_USE_RESERVE : 0));
sys/geom/eli/g_eli.c
961
if (bp->bio_driver2 != NULL) {
sys/geom/eli/g_eli.c
962
bp->bio_pflags |= G_ELI_UMA_ALLOC;
sys/geom/eli/g_eli.c
965
if (bp->bio_driver2 != NULL || (bp->bio_flags & BIO_SWAP) != 0)
sys/geom/eli/g_eli.c
966
return (bp->bio_driver2 != NULL);
sys/geom/eli/g_eli.c
968
bp->bio_pflags &= ~(G_ELI_UMA_ALLOC);
sys/geom/eli/g_eli.c
969
bp->bio_driver2 = malloc(sz, M_ELI, g_eli_blocking_malloc ? M_WAITOK :
sys/geom/eli/g_eli.c
971
return (bp->bio_driver2 != NULL);
sys/geom/eli/g_eli.c
983
g_eli_free_data(struct bio *bp)
sys/geom/eli/g_eli.c
990
if (bp->bio_driver2 == NULL)
sys/geom/eli/g_eli.c
993
if ((bp->bio_pflags & G_ELI_UMA_ALLOC) != 0) {
sys/geom/eli/g_eli.c
994
uma_zfree(g_eli_uma, bp->bio_driver2);
sys/geom/eli/g_eli.c
999
free(bp->bio_driver2, M_ELI);
sys/geom/eli/g_eli.h
167
#define G_ELI_LOGREQ(lvl, bp, ...) \
sys/geom/eli/g_eli.h
168
_GEOM_DEBUG("GEOM_ELI", g_eli_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/eli/g_eli.h
697
void g_eli_read_done(struct bio *bp);
sys/geom/eli/g_eli.h
698
void g_eli_write_done(struct bio *bp);
sys/geom/eli/g_eli.h
701
bool g_eli_alloc_data(struct bio *bp, int sz);
sys/geom/eli/g_eli.h
702
void g_eli_free_data(struct bio *bp);
sys/geom/eli/g_eli.h
704
void g_eli_crypto_read(struct g_eli_softc *sc, struct bio *bp, boolean_t fromworker);
sys/geom/eli/g_eli.h
705
void g_eli_crypto_run(struct g_eli_worker *wr, struct bio *bp);
sys/geom/eli/g_eli.h
707
void g_eli_auth_read(struct g_eli_softc *sc, struct bio *bp);
sys/geom/eli/g_eli.h
708
void g_eli_auth_run(struct g_eli_worker *wr, struct bio *bp);
sys/geom/eli/g_eli_integrity.c
129
struct bio *bp;
sys/geom/eli/g_eli_integrity.c
135
bp = (struct bio *)crp->crp_opaque;
sys/geom/eli/g_eli_integrity.c
136
bp->bio_inbed++;
sys/geom/eli/g_eli_integrity.c
137
sc = bp->bio_to->geom->softc;
sys/geom/eli/g_eli_integrity.c
139
bp->bio_completed += crp->crp_payload_length;
sys/geom/eli/g_eli_integrity.c
141
bp->bio_inbed, bp->bio_children, crp->crp_payload_length, (intmax_t)bp->bio_completed);
sys/geom/eli/g_eli_integrity.c
147
decr_secsize = bp->bio_to->sectorsize;
sys/geom/eli/g_eli_integrity.c
152
nsec = bp->bio_length / decr_secsize;
sys/geom/eli/g_eli_integrity.c
157
(char *)bp->bio_driver2) / encr_secsize;
sys/geom/eli/g_eli_integrity.c
159
errorp = (int *)((char *)bp->bio_driver2 + encr_secsize * nsec +
sys/geom/eli/g_eli_integrity.c
164
bp->bio_inbed, bp->bio_children, crp->crp_etype);
sys/geom/eli/g_eli_integrity.c
165
if (bp->bio_error == 0 || bp->bio_error == EINTEGRITY)
sys/geom/eli/g_eli_integrity.c
166
bp->bio_error = crp->crp_etype == EBADMSG ?
sys/geom/eli/g_eli_integrity.c
175
if (bp->bio_inbed < bp->bio_children)
sys/geom/eli/g_eli_integrity.c
178
if (bp->bio_error == 0) {
sys/geom/eli/g_eli_integrity.c
183
decr_secsize = bp->bio_to->sectorsize;
sys/geom/eli/g_eli_integrity.c
189
nsec = bp->bio_length / decr_secsize;
sys/geom/eli/g_eli_integrity.c
195
srcdata = bp->bio_driver2;
sys/geom/eli/g_eli_integrity.c
196
dstdata = bp->bio_data;
sys/geom/eli/g_eli_integrity.c
206
} else if (bp->bio_error == EINTEGRITY) {
sys/geom/eli/g_eli_integrity.c
212
decr_secsize = bp->bio_to->sectorsize;
sys/geom/eli/g_eli_integrity.c
218
nsec = bp->bio_length / decr_secsize;
sys/geom/eli/g_eli_integrity.c
224
errorp = (int *)((char *)bp->bio_driver2 + encr_secsize * nsec);
sys/geom/eli/g_eli_integrity.c
227
dstoff = bp->bio_offset;
sys/geom/eli/g_eli_integrity.c
265
g_eli_free_data(bp);
sys/geom/eli/g_eli_integrity.c
266
if (bp->bio_error != 0) {
sys/geom/eli/g_eli_integrity.c
267
if (bp->bio_error != EINTEGRITY) {
sys/geom/eli/g_eli_integrity.c
268
G_ELI_LOGREQ(0, bp,
sys/geom/eli/g_eli_integrity.c
270
bp->bio_error);
sys/geom/eli/g_eli_integrity.c
272
bp->bio_completed = 0;
sys/geom/eli/g_eli_integrity.c
277
g_io_deliver(bp, bp->bio_error);
sys/geom/eli/g_eli_integrity.c
292
struct bio *bp, *cbp, *cbp2;
sys/geom/eli/g_eli_integrity.c
299
bp = (struct bio *)crp->crp_opaque;
sys/geom/eli/g_eli_integrity.c
300
bp->bio_inbed++;
sys/geom/eli/g_eli_integrity.c
303
bp->bio_inbed, bp->bio_children);
sys/geom/eli/g_eli_integrity.c
306
bp->bio_inbed, bp->bio_children, crp->crp_etype);
sys/geom/eli/g_eli_integrity.c
307
if (bp->bio_error == 0)
sys/geom/eli/g_eli_integrity.c
308
bp->bio_error = crp->crp_etype;
sys/geom/eli/g_eli_integrity.c
310
sc = bp->bio_to->geom->softc;
sys/geom/eli/g_eli_integrity.c
317
if (bp->bio_inbed < bp->bio_children)
sys/geom/eli/g_eli_integrity.c
319
if (bp->bio_error != 0) {
sys/geom/eli/g_eli_integrity.c
320
G_ELI_LOGREQ(0, bp, "Crypto WRITE request failed (error=%d).",
sys/geom/eli/g_eli_integrity.c
321
bp->bio_error);
sys/geom/eli/g_eli_integrity.c
322
g_eli_free_data(bp);
sys/geom/eli/g_eli_integrity.c
323
cbp = bp->bio_driver1;
sys/geom/eli/g_eli_integrity.c
324
bp->bio_driver1 = NULL;
sys/geom/eli/g_eli_integrity.c
326
g_io_deliver(bp, bp->bio_error);
sys/geom/eli/g_eli_integrity.c
331
cbp = bp->bio_driver1;
sys/geom/eli/g_eli_integrity.c
332
bp->bio_driver1 = NULL;
sys/geom/eli/g_eli_integrity.c
337
nsec = bp->bio_length / bp->bio_to->sectorsize;
sys/geom/eli/g_eli_integrity.c
342
cbp->bio_offset = (bp->bio_offset / bp->bio_to->sectorsize) * sc->sc_bytes_per_sector;
sys/geom/eli/g_eli_integrity.c
343
cbp->bio_data = bp->bio_driver2;
sys/geom/eli/g_eli_integrity.c
351
cbp2 = g_duplicate_bio(bp);
sys/geom/eli/g_eli_integrity.c
363
bp->bio_inbed = 0;
sys/geom/eli/g_eli_integrity.c
364
bp->bio_children = (cbp2 != NULL ? 2 : 1);
sys/geom/eli/g_eli_integrity.c
374
g_eli_auth_read(struct g_eli_softc *sc, struct bio *bp)
sys/geom/eli/g_eli_integrity.c
381
G_ELI_SETWORKER(bp->bio_pflags, 0);
sys/geom/eli/g_eli_integrity.c
384
cbp = bp->bio_driver1;
sys/geom/eli/g_eli_integrity.c
385
bp->bio_driver1 = NULL;
sys/geom/eli/g_eli_integrity.c
390
nsec = bp->bio_length / bp->bio_to->sectorsize;
sys/geom/eli/g_eli_integrity.c
398
cbp->bio_offset = (bp->bio_offset / bp->bio_to->sectorsize) * sc->sc_bytes_per_sector;
sys/geom/eli/g_eli_integrity.c
399
if (!g_eli_alloc_data(bp, size)) {
sys/geom/eli/g_eli_integrity.c
400
G_ELI_LOGREQ(0, bp, "Crypto auth read request failed (ENOMEM)");
sys/geom/eli/g_eli_integrity.c
402
bp->bio_error = ENOMEM;
sys/geom/eli/g_eli_integrity.c
403
g_io_deliver(bp, bp->bio_error);
sys/geom/eli/g_eli_integrity.c
407
cbp->bio_data = bp->bio_driver2;
sys/geom/eli/g_eli_integrity.c
410
memset((char *)bp->bio_driver2 + cbp->bio_length, 0,
sys/geom/eli/g_eli_integrity.c
419
cbp2 = g_duplicate_bio(bp);
sys/geom/eli/g_eli_integrity.c
448
g_eli_auth_run(struct g_eli_worker *wr, struct bio *bp)
sys/geom/eli/g_eli_integrity.c
459
G_ELI_LOGREQ(3, bp, "%s", __func__);
sys/geom/eli/g_eli_integrity.c
461
G_ELI_SETWORKER(bp->bio_pflags, wr->w_number);
sys/geom/eli/g_eli_integrity.c
464
decr_secsize = bp->bio_to->sectorsize;
sys/geom/eli/g_eli_integrity.c
470
nsec = bp->bio_length / decr_secsize;
sys/geom/eli/g_eli_integrity.c
476
dstoff = (bp->bio_offset / bp->bio_to->sectorsize) * sc->sc_bytes_per_sector;
sys/geom/eli/g_eli_integrity.c
478
plaindata = bp->bio_data;
sys/geom/eli/g_eli_integrity.c
479
if (bp->bio_cmd == BIO_READ) {
sys/geom/eli/g_eli_integrity.c
480
data = bp->bio_driver2;
sys/geom/eli/g_eli_integrity.c
489
if (!g_eli_alloc_data(bp, size)) {
sys/geom/eli/g_eli_integrity.c
490
G_ELI_LOGREQ(0, bp, "Crypto request failed (ENOMEM)");
sys/geom/eli/g_eli_integrity.c
491
if (bp->bio_driver1 != NULL) {
sys/geom/eli/g_eli_integrity.c
492
g_destroy_bio(bp->bio_driver1);
sys/geom/eli/g_eli_integrity.c
493
bp->bio_driver1 = NULL;
sys/geom/eli/g_eli_integrity.c
495
bp->bio_error = ENOMEM;
sys/geom/eli/g_eli_integrity.c
496
g_io_deliver(bp, bp->bio_error);
sys/geom/eli/g_eli_integrity.c
501
data = bp->bio_driver2;
sys/geom/eli/g_eli_integrity.c
504
bp->bio_inbed = 0;
sys/geom/eli/g_eli_integrity.c
505
bp->bio_children = nsec;
sys/geom/eli/g_eli_integrity.c
525
if (bp->bio_cmd == BIO_WRITE)
sys/geom/eli/g_eli_integrity.c
536
if (bp->bio_cmd == BIO_WRITE)
sys/geom/eli/g_eli_integrity.c
541
if (bp->bio_cmd == BIO_WRITE) {
sys/geom/eli/g_eli_integrity.c
547
crp->crp_opaque = (void *)bp;
sys/geom/eli/g_eli_integrity.c
550
if (bp->bio_cmd == BIO_WRITE) {
sys/geom/eli/g_eli_privacy.c
100
bp->bio_inbed, bp->bio_children);
sys/geom/eli/g_eli_privacy.c
101
bp->bio_completed += crp->crp_payload_length;
sys/geom/eli/g_eli_privacy.c
104
bp->bio_inbed, bp->bio_children, crp->crp_etype);
sys/geom/eli/g_eli_privacy.c
105
if (bp->bio_error == 0)
sys/geom/eli/g_eli_privacy.c
106
bp->bio_error = crp->crp_etype;
sys/geom/eli/g_eli_privacy.c
108
sc = bp->bio_to->geom->softc;
sys/geom/eli/g_eli_privacy.c
115
if (bp->bio_inbed < bp->bio_children)
sys/geom/eli/g_eli_privacy.c
118
if (bp->bio_error != 0) {
sys/geom/eli/g_eli_privacy.c
119
G_ELI_LOGREQ(0, bp, "Crypto READ request failed (error=%d).",
sys/geom/eli/g_eli_privacy.c
120
bp->bio_error);
sys/geom/eli/g_eli_privacy.c
121
bp->bio_completed = 0;
sys/geom/eli/g_eli_privacy.c
126
g_io_deliver(bp, bp->bio_error);
sys/geom/eli/g_eli_privacy.c
143
struct bio *bp, *cbp;
sys/geom/eli/g_eli_privacy.c
149
bp = (struct bio *)crp->crp_opaque;
sys/geom/eli/g_eli_privacy.c
150
bp->bio_inbed++;
sys/geom/eli/g_eli_privacy.c
153
bp->bio_inbed, bp->bio_children);
sys/geom/eli/g_eli_privacy.c
156
bp->bio_inbed, bp->bio_children, crp->crp_etype);
sys/geom/eli/g_eli_privacy.c
157
if (bp->bio_error == 0)
sys/geom/eli/g_eli_privacy.c
158
bp->bio_error = crp->crp_etype;
sys/geom/eli/g_eli_privacy.c
160
gp = bp->bio_to->geom;
sys/geom/eli/g_eli_privacy.c
168
if (bp->bio_inbed < bp->bio_children)
sys/geom/eli/g_eli_privacy.c
170
bp->bio_inbed = 0;
sys/geom/eli/g_eli_privacy.c
171
bp->bio_children = 1;
sys/geom/eli/g_eli_privacy.c
172
cbp = bp->bio_driver1;
sys/geom/eli/g_eli_privacy.c
173
bp->bio_driver1 = NULL;
sys/geom/eli/g_eli_privacy.c
174
if (bp->bio_error != 0) {
sys/geom/eli/g_eli_privacy.c
175
G_ELI_LOGREQ(0, bp, "Crypto WRITE request failed (error=%d).",
sys/geom/eli/g_eli_privacy.c
176
bp->bio_error);
sys/geom/eli/g_eli_privacy.c
177
g_eli_free_data(bp);
sys/geom/eli/g_eli_privacy.c
179
g_io_deliver(bp, bp->bio_error);
sys/geom/eli/g_eli_privacy.c
183
cbp->bio_data = bp->bio_driver2;
sys/geom/eli/g_eli_privacy.c
206
g_eli_crypto_read(struct g_eli_softc *sc, struct bio *bp, boolean_t fromworker)
sys/geom/eli/g_eli_privacy.c
223
bioq_insert_tail(&sc->sc_queue, bp);
sys/geom/eli/g_eli_privacy.c
231
G_ELI_SETWORKER(bp->bio_pflags, 0);
sys/geom/eli/g_eli_privacy.c
232
bp->bio_driver2 = NULL;
sys/geom/eli/g_eli_privacy.c
233
cbp = bp->bio_driver1;
sys/geom/eli/g_eli_privacy.c
254
g_eli_crypto_run(struct g_eli_worker *wr, struct bio *bp)
sys/geom/eli/g_eli_privacy.c
266
G_ELI_LOGREQ(3, bp, "%s", __func__);
sys/geom/eli/g_eli_privacy.c
268
G_ELI_SETWORKER(bp->bio_pflags, wr->w_number);
sys/geom/eli/g_eli_privacy.c
271
nsec = bp->bio_length / secsize;
sys/geom/eli/g_eli_privacy.c
273
bp->bio_inbed = 0;
sys/geom/eli/g_eli_privacy.c
274
bp->bio_children = nsec;
sys/geom/eli/g_eli_privacy.c
280
if (bp->bio_cmd == BIO_WRITE) {
sys/geom/eli/g_eli_privacy.c
281
if (!g_eli_alloc_data(bp, bp->bio_length)) {
sys/geom/eli/g_eli_privacy.c
282
G_ELI_LOGREQ(0, bp, "Crypto request failed (ENOMEM).");
sys/geom/eli/g_eli_privacy.c
283
if (bp->bio_driver1 != NULL) {
sys/geom/eli/g_eli_privacy.c
284
g_destroy_bio(bp->bio_driver1);
sys/geom/eli/g_eli_privacy.c
285
bp->bio_driver1 = NULL;
sys/geom/eli/g_eli_privacy.c
287
bp->bio_error = ENOMEM;
sys/geom/eli/g_eli_privacy.c
288
g_io_deliver(bp, bp->bio_error);
sys/geom/eli/g_eli_privacy.c
293
data = bp->bio_driver2;
sys/geom/eli/g_eli_privacy.c
298
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/eli/g_eli_privacy.c
299
g_eli_bio_copyin(bp, data);
sys/geom/eli/g_eli_privacy.c
301
bcopy(bp->bio_data, data, bp->bio_length);
sys/geom/eli/g_eli_privacy.c
303
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/geom/eli/g_eli_privacy.c
304
pages = bp->bio_ma;
sys/geom/eli/g_eli_privacy.c
305
pages_offset = bp->bio_ma_offset;
sys/geom/eli/g_eli_privacy.c
307
data = bp->bio_data;
sys/geom/eli/g_eli_privacy.c
314
for (i = 0, dstoff = bp->bio_offset; i < nsec; i++, dstoff += secsize) {
sys/geom/eli/g_eli_privacy.c
327
crp->crp_opaque = (void *)bp;
sys/geom/eli/g_eli_privacy.c
328
if (bp->bio_cmd == BIO_WRITE) {
sys/geom/eli/g_eli_privacy.c
65
g_eli_bio_copyin(struct bio *bp, void *kaddr)
sys/geom/eli/g_eli_privacy.c
71
iov[0].iov_len = bp->bio_length;
sys/geom/eli/g_eli_privacy.c
75
uio.uio_resid = bp->bio_length;
sys/geom/eli/g_eli_privacy.c
78
uiomove_fromphys(bp->bio_ma, bp->bio_ma_offset, bp->bio_length, &uio);
sys/geom/eli/g_eli_privacy.c
90
struct bio *bp;
sys/geom/eli/g_eli_privacy.c
96
bp = (struct bio *)crp->crp_opaque;
sys/geom/eli/g_eli_privacy.c
97
bp->bio_inbed++;
sys/geom/gate/g_gate.c
108
struct bio *bp;
sys/geom/gate/g_gate.c
128
while ((bp = bioq_takefirst(&sc->sc_inqueue)) != NULL) {
sys/geom/gate/g_gate.c
130
bioq_insert_tail(&queue, bp);
sys/geom/gate/g_gate.c
132
while ((bp = bioq_takefirst(&sc->sc_outqueue)) != NULL) {
sys/geom/gate/g_gate.c
134
bioq_insert_tail(&queue, bp);
sys/geom/gate/g_gate.c
138
while ((bp = bioq_takefirst(&queue)) != NULL) {
sys/geom/gate/g_gate.c
139
G_GATE_LOGREQ(1, bp, "Request canceled.");
sys/geom/gate/g_gate.c
140
g_io_deliver(bp, ENXIO);
sys/geom/gate/g_gate.c
189
g_gate_queue_io(struct bio *bp)
sys/geom/gate/g_gate.c
193
sc = bp->bio_to->geom->softc;
sys/geom/gate/g_gate.c
195
g_io_deliver(bp, ENXIO);
sys/geom/gate/g_gate.c
203
G_GATE_LOGREQ(1, bp, "Queue full, request canceled.");
sys/geom/gate/g_gate.c
204
g_io_deliver(bp, ENOMEM);
sys/geom/gate/g_gate.c
208
bp->bio_driver1 = (void *)sc->sc_seq;
sys/geom/gate/g_gate.c
212
bioq_insert_tail(&sc->sc_inqueue, bp);
sys/geom/gate/g_gate.c
368
struct bio *bp, *bp2;
sys/geom/gate/g_gate.c
375
TAILQ_FOREACH_SAFE(bp, &sc->sc_inqueue.queue, bio_queue, bp2) {
sys/geom/gate/g_gate.c
376
if (curtime.sec - bp->bio_t0.sec < 5)
sys/geom/gate/g_gate.c
378
bioq_remove(&sc->sc_inqueue, bp);
sys/geom/gate/g_gate.c
380
bioq_insert_tail(&queue, bp);
sys/geom/gate/g_gate.c
382
TAILQ_FOREACH_SAFE(bp, &sc->sc_outqueue.queue, bio_queue, bp2) {
sys/geom/gate/g_gate.c
383
if (curtime.sec - bp->bio_t0.sec < 5)
sys/geom/gate/g_gate.c
385
bioq_remove(&sc->sc_outqueue, bp);
sys/geom/gate/g_gate.c
387
bioq_insert_tail(&queue, bp);
sys/geom/gate/g_gate.c
390
while ((bp = bioq_takefirst(&queue)) != NULL) {
sys/geom/gate/g_gate.c
391
G_GATE_LOGREQ(1, bp, "Request timeout.");
sys/geom/gate/g_gate.c
392
g_io_deliver(bp, EIO);
sys/geom/gate/g_gate.c
749
struct bio *bp;
sys/geom/gate/g_gate.c
810
TAILQ_FOREACH_SAFE(bp, &sc->sc_outqueue.queue, bio_queue, tbp) {
sys/geom/gate/g_gate.c
812
ggio->gctl_seq == (uintptr_t)bp->bio_driver1) {
sys/geom/gate/g_gate.c
813
G_GATE_LOGREQ(1, bp, "Request canceled.");
sys/geom/gate/g_gate.c
814
bioq_remove(&sc->sc_outqueue, bp);
sys/geom/gate/g_gate.c
820
bioq_insert_head(&sc->sc_inqueue, bp);
sys/geom/gate/g_gate.c
823
lbp, bp, bio_queue);
sys/geom/gate/g_gate.c
825
lbp = bp;
sys/geom/gate/g_gate.c
850
bp = bioq_first(&sc->sc_inqueue);
sys/geom/gate/g_gate.c
851
if (bp != NULL)
sys/geom/gate/g_gate.c
863
ggio->gctl_cmd = bp->bio_cmd;
sys/geom/gate/g_gate.c
864
if (bp->bio_cmd == BIO_WRITE &&
sys/geom/gate/g_gate.c
865
bp->bio_length > ggio->gctl_length) {
sys/geom/gate/g_gate.c
867
ggio->gctl_length = bp->bio_length;
sys/geom/gate/g_gate.c
871
bioq_remove(&sc->sc_inqueue, bp);
sys/geom/gate/g_gate.c
872
bioq_insert_tail(&sc->sc_outqueue, bp);
sys/geom/gate/g_gate.c
875
ggio->gctl_seq = (uintptr_t)bp->bio_driver1;
sys/geom/gate/g_gate.c
876
ggio->gctl_offset = bp->bio_offset;
sys/geom/gate/g_gate.c
877
ggio->gctl_length = bp->bio_length;
sys/geom/gate/g_gate.c
879
switch (bp->bio_cmd) {
sys/geom/gate/g_gate.c
886
error = copyout(bp->bio_data, ggio->gctl_data,
sys/geom/gate/g_gate.c
887
bp->bio_length);
sys/geom/gate/g_gate.c
890
bioq_remove(&sc->sc_outqueue, bp);
sys/geom/gate/g_gate.c
891
bioq_insert_head(&sc->sc_inqueue, bp);
sys/geom/gate/g_gate.c
911
TAILQ_FOREACH(bp, &sc->sc_outqueue.queue, bio_queue) {
sys/geom/gate/g_gate.c
912
if (ggio->gctl_seq == (uintptr_t)bp->bio_driver1)
sys/geom/gate/g_gate.c
915
if (bp != NULL) {
sys/geom/gate/g_gate.c
916
bioq_remove(&sc->sc_outqueue, bp);
sys/geom/gate/g_gate.c
920
if (bp == NULL) {
sys/geom/gate/g_gate.c
927
bp->bio_error = 0;
sys/geom/gate/g_gate.c
928
G_GATE_LOGREQ(1, bp, "Request desisted.");
sys/geom/gate/g_gate.c
931
bioq_insert_head(&sc->sc_inqueue, bp);
sys/geom/gate/g_gate.c
935
bp->bio_error = ggio->gctl_error;
sys/geom/gate/g_gate.c
936
if (bp->bio_error == 0) {
sys/geom/gate/g_gate.c
937
bp->bio_completed = bp->bio_length;
sys/geom/gate/g_gate.c
938
switch (bp->bio_cmd) {
sys/geom/gate/g_gate.c
941
bp->bio_data, bp->bio_length);
sys/geom/gate/g_gate.c
943
bp->bio_error = error;
sys/geom/gate/g_gate.c
952
G_GATE_LOGREQ(2, bp, "Request done.");
sys/geom/gate/g_gate.c
953
g_io_deliver(bp, bp->bio_error);
sys/geom/gate/g_gate.h
105
#define G_GATE_LOGREQ(lvl, bp, ...) \
sys/geom/gate/g_gate.h
106
_GEOM_DEBUG("GEOM_GATE", g_gate_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/geom.h
286
int g_handleattr(struct bio *bp, const char *attribute, const void *val,
sys/geom/geom.h
288
int g_handleattr_int(struct bio *bp, const char *attribute, int val);
sys/geom/geom.h
289
int g_handleattr_off_t(struct bio *bp, const char *attribute, off_t val);
sys/geom/geom.h
290
int g_handleattr_uint16_t(struct bio *bp, const char *attribute, uint16_t val);
sys/geom/geom.h
291
int g_handleattr_str(struct bio *bp, const char *attribute, const char *str);
sys/geom/geom.h
304
void g_std_done(struct bio *bp);
sys/geom/geom.h
335
void g_io_deliver(struct bio *bp, int error);
sys/geom/geom.h
341
void g_io_request(struct bio *bp, struct g_consumer *cp);
sys/geom/geom.h
348
void g_format_bio(struct sbuf *, const struct bio *bp);
sys/geom/geom.h
349
void g_print_bio(const char *prefix, const struct bio *bp, const char *fmtsuffix, ...) __printflike(3, 4);
sys/geom/geom_ccd.c
171
static void ccdiodone(struct bio *bp);
sys/geom/geom_ccd.c
455
g_ccd_start(struct bio *bp)
sys/geom/geom_ccd.c
464
cs = bp->bio_to->geom->softc;
sys/geom/geom_ccd.c
471
if(bp->bio_cmd == BIO_GETATTR) {
sys/geom/geom_ccd.c
472
g_io_deliver(bp, EINVAL);
sys/geom/geom_ccd.c
479
bn = bp->bio_offset / cs->sc_secsize;
sys/geom/geom_ccd.c
484
addr = bp->bio_data;
sys/geom/geom_ccd.c
485
for (bcount = bp->bio_length; bcount > 0; bcount -= rcount) {
sys/geom/geom_ccd.c
486
err = ccdbuffer(cbp, cs, bp, bn, addr, bcount);
sys/geom/geom_ccd.c
488
bp->bio_completed += bcount;
sys/geom/geom_ccd.c
489
if (bp->bio_error == 0)
sys/geom/geom_ccd.c
490
bp->bio_error = err;
sys/geom/geom_ccd.c
491
if (bp->bio_completed == bp->bio_length)
sys/geom/geom_ccd.c
492
g_io_deliver(bp, bp->bio_error);
sys/geom/geom_ccd.c
537
ccdbuffer(struct bio **cb, struct ccd_s *cs, struct bio *bp, daddr_t bn, caddr_t addr, long bcount)
sys/geom/geom_ccd.c
642
cbp = g_clone_bio(bp);
sys/geom/geom_ccd.c
658
cbp = g_clone_bio(bp);
sys/geom/geom_dbg.h
44
void g_dbg_printf(const char *classname, int lvl, struct bio *bp,
sys/geom/geom_dev.c
721
struct bio *bp;
sys/geom/geom_dev.c
726
bp = bp2->bio_parent;
sys/geom/geom_dev.c
727
bp->bio_error = bp2->bio_error;
sys/geom/geom_dev.c
728
bp->bio_completed = bp2->bio_completed;
sys/geom/geom_dev.c
729
bp->bio_resid = bp->bio_length - bp2->bio_completed;
sys/geom/geom_dev.c
731
bcopy(&bp2->bio_zone, &bp->bio_zone, sizeof(bp->bio_zone));
sys/geom/geom_dev.c
736
bp->bio_flags |= BIO_ERROR;
sys/geom/geom_dev.c
738
bp->bio_flags |= BIO_EXTERR;
sys/geom/geom_dev.c
739
bp->bio_exterr = bp2->bio_exterr;
sys/geom/geom_dev.c
742
if (bp->bio_cmd == BIO_READ)
sys/geom/geom_dev.c
744
if (bp->bio_cmd == BIO_WRITE)
sys/geom/geom_dev.c
747
bp2, bp, bp2->bio_resid, (intmax_t)bp2->bio_completed);
sys/geom/geom_dev.c
757
biodone(bp);
sys/geom/geom_dev.c
761
g_dev_strategy(struct bio *bp)
sys/geom/geom_dev.c
768
KASSERT(bp->bio_cmd == BIO_READ ||
sys/geom/geom_dev.c
769
bp->bio_cmd == BIO_WRITE ||
sys/geom/geom_dev.c
770
bp->bio_cmd == BIO_DELETE ||
sys/geom/geom_dev.c
771
bp->bio_cmd == BIO_FLUSH ||
sys/geom/geom_dev.c
772
bp->bio_cmd == BIO_ZONE,
sys/geom/geom_dev.c
773
("Wrong bio_cmd bio=%p cmd=%d", bp, bp->bio_cmd));
sys/geom/geom_dev.c
774
dev = bp->bio_dev;
sys/geom/geom_dev.c
778
biotrack(bp, __func__);
sys/geom/geom_dev.c
780
if ((bp->bio_offset % cp->provider->sectorsize) != 0 ||
sys/geom/geom_dev.c
781
(bp->bio_bcount % cp->provider->sectorsize) != 0) {
sys/geom/geom_dev.c
782
bp->bio_resid = bp->bio_bcount;
sys/geom/geom_dev.c
783
biofinish(bp, NULL, EINVAL);
sys/geom/geom_dev.c
796
bp2 = g_clone_bio(bp);
sys/geom/geom_dev.c
805
bp, bp2, (intmax_t)bp->bio_offset, (intmax_t)bp2->bio_length,
sys/geom/geom_disk.c
176
g_disk_kerneldump(struct bio *bp, struct disk *dp)
sys/geom/geom_disk.c
181
gkd = (struct g_kerneldump*)bp->bio_data;
sys/geom/geom_disk.c
182
gp = bp->bio_to->geom;
sys/geom/geom_disk.c
186
g_io_deliver(bp, ENODEV);
sys/geom/geom_disk.c
197
g_io_deliver(bp, 0);
sys/geom/geom_disk.c
201
g_disk_setstate(struct bio *bp, struct g_disk_softc *sc)
sys/geom/geom_disk.c
205
memcpy(&sc->state, bp->bio_data, sizeof(sc->state));
sys/geom/geom_disk.c
223
g_io_deliver(bp, 0);
sys/geom/geom_disk.c
227
g_disk_done(struct bio *bp)
sys/geom/geom_disk.c
234
sc = bp->bio_caller1;
sys/geom/geom_disk.c
235
bp2 = bp->bio_parent;
sys/geom/geom_disk.c
239
if ((bp->bio_flags & BIO_EXTERR) != 0) {
sys/geom/geom_disk.c
241
bp2->bio_exterr = bp->bio_exterr;
sys/geom/geom_disk.c
243
bp2->bio_error = bp->bio_error;
sys/geom/geom_disk.c
246
bp2->bio_completed += bp->bio_length - bp->bio_resid;
sys/geom/geom_disk.c
248
if (bp->bio_cmd == BIO_READ)
sys/geom/geom_disk.c
251
switch (bp->bio_cmd) {
sys/geom/geom_disk.c
253
bcopy(&bp->bio_zone, &bp2->bio_zone, sizeof(bp->bio_zone));
sys/geom/geom_disk.c
259
devstat_end_transaction_bio_bt(sc->d_devstat, bp, &now);
sys/geom/geom_disk.c
271
g_destroy_bio(bp);
sys/geom/geom_disk.c
291
g_disk_maxsize(struct disk *dp, struct bio *bp)
sys/geom/geom_disk.c
293
if (bp->bio_cmd == BIO_DELETE)
sys/geom/geom_disk.c
299
g_disk_maxsegs(struct disk *dp, struct bio *bp)
sys/geom/geom_disk.c
301
return ((g_disk_maxsize(dp, bp) / PAGE_SIZE) + 1);
sys/geom/geom_disk.c
305
g_disk_advance(struct disk *dp, struct bio *bp, off_t off)
sys/geom/geom_disk.c
308
bp->bio_offset += off;
sys/geom/geom_disk.c
309
bp->bio_length -= off;
sys/geom/geom_disk.c
311
if ((bp->bio_flags & BIO_VLIST) != 0) {
sys/geom/geom_disk.c
314
seg = (bus_dma_segment_t *)bp->bio_data;
sys/geom/geom_disk.c
315
end = (bus_dma_segment_t *)bp->bio_data + bp->bio_ma_n;
sys/geom/geom_disk.c
316
off += bp->bio_ma_offset;
sys/geom/geom_disk.c
323
bp->bio_ma_offset = off;
sys/geom/geom_disk.c
324
bp->bio_ma_n = end - seg;
sys/geom/geom_disk.c
325
bp->bio_data = (void *)seg;
sys/geom/geom_disk.c
326
} else if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/geom/geom_disk.c
327
bp->bio_ma += off / PAGE_SIZE;
sys/geom/geom_disk.c
328
bp->bio_ma_offset += off;
sys/geom/geom_disk.c
329
bp->bio_ma_offset %= PAGE_SIZE;
sys/geom/geom_disk.c
330
bp->bio_ma_n -= off / PAGE_SIZE;
sys/geom/geom_disk.c
332
bp->bio_data += off;
sys/geom/geom_disk.c
368
g_disk_vlist_limit(struct disk *dp, struct bio *bp, bus_dma_segment_t **pendseg)
sys/geom/geom_disk.c
375
seg = (bus_dma_segment_t *)bp->bio_data;
sys/geom/geom_disk.c
376
end = (bus_dma_segment_t *)bp->bio_data + bp->bio_ma_n;
sys/geom/geom_disk.c
377
residual = bp->bio_length;
sys/geom/geom_disk.c
378
offset = bp->bio_ma_offset;
sys/geom/geom_disk.c
379
pages = g_disk_maxsegs(dp, bp);
sys/geom/geom_disk.c
392
g_disk_limit(struct disk *dp, struct bio *bp)
sys/geom/geom_disk.c
397
maxsz = g_disk_maxsize(dp, bp);
sys/geom/geom_disk.c
405
if (bp->bio_length > maxsz) {
sys/geom/geom_disk.c
406
bp->bio_length = maxsz;
sys/geom/geom_disk.c
410
if ((bp->bio_flags & BIO_VLIST) != 0) {
sys/geom/geom_disk.c
414
firstseg = (bus_dma_segment_t*)bp->bio_data;
sys/geom/geom_disk.c
415
residual = g_disk_vlist_limit(dp, bp, &endseg);
sys/geom/geom_disk.c
417
bp->bio_ma_n = endseg - firstseg;
sys/geom/geom_disk.c
418
bp->bio_length -= residual;
sys/geom/geom_disk.c
421
} else if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/geom/geom_disk.c
422
bp->bio_ma_n =
sys/geom/geom_disk.c
423
howmany(bp->bio_ma_offset + bp->bio_length, PAGE_SIZE);
sys/geom/geom_disk.c
430
g_disk_start(struct bio *bp)
sys/geom/geom_disk.c
438
biotrack(bp, __func__);
sys/geom/geom_disk.c
440
sc = bp->bio_to->private;
sys/geom/geom_disk.c
443
("g_disk_start(%p) on destroyed disk %s", bp, bp->bio_to->name));
sys/geom/geom_disk.c
445
switch(bp->bio_cmd) {
sys/geom/geom_disk.c
455
(bp->bio_flags & BIO_UNMAPPED) == 0,
sys/geom/geom_disk.c
458
if (bp->bio_cmd == BIO_WRITE)
sys/geom/geom_disk.c
459
kmsan_check_bio(bp, "g_disk_start");
sys/geom/geom_disk.c
463
bp2 = g_clone_bio(bp);
sys/geom/geom_disk.c
476
bp3 = g_clone_bio(bp);
sys/geom/geom_disk.c
478
bp->bio_error = ENOMEM;
sys/geom/geom_disk.c
499
if (bp->bio_disk == NULL)
sys/geom/geom_disk.c
500
bp->bio_disk = dp;
sys/geom/geom_disk.c
501
error = dp->d_getattr(bp);
sys/geom/geom_disk.c
506
if (g_handleattr_int(bp, "GEOM::candelete",
sys/geom/geom_disk.c
509
else if (g_handleattr_int(bp, "GEOM::fwsectors",
sys/geom/geom_disk.c
512
else if (g_handleattr_int(bp, "GEOM::fwheads", dp->d_fwheads))
sys/geom/geom_disk.c
514
else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident))
sys/geom/geom_disk.c
516
else if (g_handleattr_str(bp, "GEOM::descr", dp->d_descr))
sys/geom/geom_disk.c
518
else if (g_handleattr_uint16_t(bp, "GEOM::hba_vendor",
sys/geom/geom_disk.c
521
else if (g_handleattr_uint16_t(bp, "GEOM::hba_device",
sys/geom/geom_disk.c
524
else if (g_handleattr_uint16_t(bp, "GEOM::hba_subvendor",
sys/geom/geom_disk.c
527
else if (g_handleattr_uint16_t(bp, "GEOM::hba_subdevice",
sys/geom/geom_disk.c
530
else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump"))
sys/geom/geom_disk.c
531
g_disk_kerneldump(bp, dp);
sys/geom/geom_disk.c
532
else if (!strcmp(bp->bio_attribute, "GEOM::setstate"))
sys/geom/geom_disk.c
533
g_disk_setstate(bp, sc);
sys/geom/geom_disk.c
534
else if (g_handleattr_uint16_t(bp, "GEOM::rotation_rate",
sys/geom/geom_disk.c
537
else if (g_handleattr_str(bp, "GEOM::attachment",
sys/geom/geom_disk.c
545
bp->bio_to->name);
sys/geom/geom_disk.c
552
if (bp->bio_cmd == BIO_ZONE) {
sys/geom/geom_disk.c
558
bp->bio_to->name);
sys/geom/geom_disk.c
560
bp2 = g_clone_bio(bp);
sys/geom/geom_disk.c
562
g_io_deliver(bp, ENOMEM);
sys/geom/geom_disk.c
572
bp2 = g_clone_bio(bp);
sys/geom/geom_disk.c
574
g_io_deliver(bp, ENOMEM);
sys/geom/geom_disk.c
587
g_io_deliver(bp, error);
sys/geom/geom_disk.c
594
struct bio *bp;
sys/geom/geom_disk.c
632
bp = g_alloc_bio();
sys/geom/geom_disk.c
633
bp->bio_disk = dp;
sys/geom/geom_disk.c
634
bp->bio_attribute = "GEOM::ident";
sys/geom/geom_disk.c
635
bp->bio_length = DISK_IDENT_SIZE;
sys/geom/geom_disk.c
636
bp->bio_data = buf;
sys/geom/geom_disk.c
637
res = dp->d_getattr(bp);
sys/geom/geom_disk.c
641
bp->bio_attribute = "GEOM::lunid";
sys/geom/geom_disk.c
642
bp->bio_length = DISK_IDENT_SIZE;
sys/geom/geom_disk.c
643
bp->bio_data = buf;
sys/geom/geom_disk.c
644
if (dp->d_getattr(bp) == 0) {
sys/geom/geom_disk.c
649
bp->bio_attribute = "GEOM::lunname";
sys/geom/geom_disk.c
650
bp->bio_length = DISK_IDENT_SIZE;
sys/geom/geom_disk.c
651
bp->bio_data = buf;
sys/geom/geom_disk.c
652
if (dp->d_getattr(bp) == 0) {
sys/geom/geom_disk.c
657
g_destroy_bio(bp);
sys/geom/geom_disk.h
58
typedef void disk_strategy_t(struct bio *bp);
sys/geom/geom_disk.h
59
typedef int disk_getattr_t(struct bio *bp);
sys/geom/geom_io.c
1010
g_format_bio(&sb, bp);
sys/geom/geom_io.c
1023
g_format_bio(struct sbuf *sb, const struct bio *bp)
sys/geom/geom_io.c
1027
if (bp->bio_to != NULL)
sys/geom/geom_io.c
1028
pname = bp->bio_to->name;
sys/geom/geom_io.c
1029
else if (bp->bio_parent != NULL && bp->bio_parent->bio_to != NULL)
sys/geom/geom_io.c
1030
pname = bp->bio_parent->bio_to->name;
sys/geom/geom_io.c
1034
switch (bp->bio_cmd) {
sys/geom/geom_io.c
1038
bp->bio_attribute);
sys/geom/geom_io.c
1047
switch (bp->bio_zone.zone_cmd) {
sys/geom/geom_io.c
1088
(intmax_t)bp->bio_offset, (intmax_t)bp->bio_length);
sys/geom/geom_io.c
130
struct bio *bp;
sys/geom/geom_io.c
132
bp = TAILQ_FIRST(&bq->bio_queue);
sys/geom/geom_io.c
133
if (bp != NULL) {
sys/geom/geom_io.c
134
KASSERT((bp->bio_flags & BIO_ONQUEUE),
sys/geom/geom_io.c
135
("Bio not on queue bp=%p target %p", bp, bq));
sys/geom/geom_io.c
136
bp->bio_flags &= ~BIO_ONQUEUE;
sys/geom/geom_io.c
137
TAILQ_REMOVE(&bq->bio_queue, bp, bio_queue);
sys/geom/geom_io.c
140
return (bp);
sys/geom/geom_io.c
146
struct bio *bp;
sys/geom/geom_io.c
148
bp = uma_zalloc(biozone, M_NOWAIT | M_ZERO);
sys/geom/geom_io.c
153
CTR1(KTR_GEOM, "g_new_bio(): %p", bp);
sys/geom/geom_io.c
158
return (bp);
sys/geom/geom_io.c
164
struct bio *bp;
sys/geom/geom_io.c
166
bp = uma_zalloc(biozone, M_WAITOK | M_ZERO);
sys/geom/geom_io.c
171
CTR1(KTR_GEOM, "g_alloc_bio(): %p", bp);
sys/geom/geom_io.c
176
return (bp);
sys/geom/geom_io.c
180
g_destroy_bio(struct bio *bp)
sys/geom/geom_io.c
186
CTR1(KTR_GEOM, "g_destroy_bio(): %p", bp);
sys/geom/geom_io.c
191
uma_zfree(biozone, bp);
sys/geom/geom_io.c
195
g_clone_bio(struct bio *bp)
sys/geom/geom_io.c
201
bp2->bio_parent = bp;
sys/geom/geom_io.c
202
bp2->bio_cmd = bp->bio_cmd;
sys/geom/geom_io.c
210
bp2->bio_flags = bp->bio_flags &
sys/geom/geom_io.c
212
bp2->bio_length = bp->bio_length;
sys/geom/geom_io.c
213
bp2->bio_offset = bp->bio_offset;
sys/geom/geom_io.c
214
bp2->bio_data = bp->bio_data;
sys/geom/geom_io.c
215
bp2->bio_ma = bp->bio_ma;
sys/geom/geom_io.c
216
bp2->bio_ma_n = bp->bio_ma_n;
sys/geom/geom_io.c
217
bp2->bio_ma_offset = bp->bio_ma_offset;
sys/geom/geom_io.c
218
bp2->bio_attribute = bp->bio_attribute;
sys/geom/geom_io.c
219
if (bp->bio_cmd == BIO_ZONE)
sys/geom/geom_io.c
220
bcopy(&bp->bio_zone, &bp2->bio_zone,
sys/geom/geom_io.c
221
sizeof(bp->bio_zone));
sys/geom/geom_io.c
223
bp2->bio_track_bp = bp->bio_track_bp;
sys/geom/geom_io.c
225
bp->bio_children++;
sys/geom/geom_io.c
231
CTR2(KTR_GEOM, "g_clone_bio(%p): %p", bp, bp2);
sys/geom/geom_io.c
240
g_duplicate_bio(struct bio *bp)
sys/geom/geom_io.c
245
bp2->bio_flags = bp->bio_flags & (BIO_UNMAPPED | BIO_VLIST | BIO_SWAP);
sys/geom/geom_io.c
246
bp2->bio_parent = bp;
sys/geom/geom_io.c
247
bp2->bio_cmd = bp->bio_cmd;
sys/geom/geom_io.c
248
bp2->bio_length = bp->bio_length;
sys/geom/geom_io.c
249
bp2->bio_offset = bp->bio_offset;
sys/geom/geom_io.c
250
bp2->bio_data = bp->bio_data;
sys/geom/geom_io.c
251
bp2->bio_ma = bp->bio_ma;
sys/geom/geom_io.c
252
bp2->bio_ma_n = bp->bio_ma_n;
sys/geom/geom_io.c
253
bp2->bio_ma_offset = bp->bio_ma_offset;
sys/geom/geom_io.c
254
bp2->bio_attribute = bp->bio_attribute;
sys/geom/geom_io.c
255
bp->bio_children++;
sys/geom/geom_io.c
260
CTR2(KTR_GEOM, "g_duplicate_bio(%p): %p", bp, bp2);
sys/geom/geom_io.c
269
g_reset_bio(struct bio *bp)
sys/geom/geom_io.c
272
bzero(bp, sizeof(*bp));
sys/geom/geom_io.c
290
struct bio *bp;
sys/geom/geom_io.c
294
bp = g_alloc_bio();
sys/geom/geom_io.c
295
bp->bio_cmd = BIO_GETATTR;
sys/geom/geom_io.c
296
bp->bio_done = NULL;
sys/geom/geom_io.c
297
bp->bio_attribute = attr;
sys/geom/geom_io.c
298
bp->bio_length = *len;
sys/geom/geom_io.c
299
bp->bio_data = ptr;
sys/geom/geom_io.c
300
g_io_request(bp, cp);
sys/geom/geom_io.c
301
error = biowait(bp, "ggetattr");
sys/geom/geom_io.c
302
*len = bp->bio_completed;
sys/geom/geom_io.c
303
g_destroy_bio(bp);
sys/geom/geom_io.c
310
struct bio *bp;
sys/geom/geom_io.c
314
bp = g_alloc_bio();
sys/geom/geom_io.c
315
bp->bio_cmd = BIO_ZONE;
sys/geom/geom_io.c
316
bp->bio_done = NULL;
sys/geom/geom_io.c
320
bcopy(zone_args, &bp->bio_zone, sizeof(*zone_args));
sys/geom/geom_io.c
322
bp->bio_length =
sys/geom/geom_io.c
326
bp->bio_length = 0;
sys/geom/geom_io.c
328
g_io_request(bp, cp);
sys/geom/geom_io.c
329
error = biowait(bp, "gzone");
sys/geom/geom_io.c
330
bcopy(&bp->bio_zone, zone_args, sizeof(*zone_args));
sys/geom/geom_io.c
331
g_destroy_bio(bp);
sys/geom/geom_io.c
350
struct bio *bp;
sys/geom/geom_io.c
357
bp = g_new_bio();
sys/geom/geom_io.c
358
if (bp == NULL)
sys/geom/geom_io.c
360
bp->bio_cmd = BIO_SPEEDUP;
sys/geom/geom_io.c
361
bp->bio_length = shortage;
sys/geom/geom_io.c
362
bp->bio_done = NULL;
sys/geom/geom_io.c
363
bp->bio_flags |= flags;
sys/geom/geom_io.c
364
g_io_request(bp, cp);
sys/geom/geom_io.c
365
error = biowait(bp, "gflush");
sys/geom/geom_io.c
366
*resid = bp->bio_resid;
sys/geom/geom_io.c
367
g_destroy_bio(bp);
sys/geom/geom_io.c
374
struct bio *bp;
sys/geom/geom_io.c
378
bp = g_alloc_bio();
sys/geom/geom_io.c
379
bp->bio_cmd = BIO_FLUSH;
sys/geom/geom_io.c
380
bp->bio_flags |= BIO_ORDERED;
sys/geom/geom_io.c
381
bp->bio_done = NULL;
sys/geom/geom_io.c
382
bp->bio_attribute = NULL;
sys/geom/geom_io.c
383
bp->bio_offset = cp->provider->mediasize;
sys/geom/geom_io.c
384
bp->bio_length = 0;
sys/geom/geom_io.c
385
bp->bio_data = NULL;
sys/geom/geom_io.c
386
g_io_request(bp, cp);
sys/geom/geom_io.c
387
error = biowait(bp, "gflush");
sys/geom/geom_io.c
388
g_destroy_bio(bp);
sys/geom/geom_io.c
393
g_io_check(struct bio *bp)
sys/geom/geom_io.c
400
biotrack(bp, __func__);
sys/geom/geom_io.c
402
cp = bp->bio_from;
sys/geom/geom_io.c
403
pp = bp->bio_to;
sys/geom/geom_io.c
406
switch(bp->bio_cmd) {
sys/geom/geom_io.c
420
if ((bp->bio_zone.zone_cmd == DISK_ZONE_REPORT_ZONES) ||
sys/geom/geom_io.c
421
(bp->bio_zone.zone_cmd == DISK_ZONE_GET_PARAMS)) {
sys/geom/geom_io.c
436
switch(bp->bio_cmd) {
sys/geom/geom_io.c
444
if (bp->bio_offset % pp->sectorsize)
sys/geom/geom_io.c
447
if (bp->bio_length % pp->sectorsize)
sys/geom/geom_io.c
450
if (bp->bio_offset < 0)
sys/geom/geom_io.c
452
if (bp->bio_offset > pp->mediasize)
sys/geom/geom_io.c
456
excess = bp->bio_offset + bp->bio_length;
sys/geom/geom_io.c
457
if (excess > bp->bio_to->mediasize) {
sys/geom/geom_io.c
458
KASSERT((bp->bio_flags & BIO_UNMAPPED) == 0 ||
sys/geom/geom_io.c
459
round_page(bp->bio_ma_offset +
sys/geom/geom_io.c
460
bp->bio_length) / PAGE_SIZE == bp->bio_ma_n,
sys/geom/geom_io.c
461
("excess bio %p too short", bp));
sys/geom/geom_io.c
462
excess -= bp->bio_to->mediasize;
sys/geom/geom_io.c
463
bp->bio_length -= excess;
sys/geom/geom_io.c
464
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/geom/geom_io.c
465
bp->bio_ma_n = round_page(bp->bio_ma_offset +
sys/geom/geom_io.c
466
bp->bio_length) / PAGE_SIZE;
sys/geom/geom_io.c
470
"%p provider %s by %d", bp,
sys/geom/geom_io.c
471
bp->bio_to->name, excess);
sys/geom/geom_io.c
475
if (bp->bio_length == 0) {
sys/geom/geom_io.c
477
"bp %p provider %s", bp, bp->bio_to->name);
sys/geom/geom_io.c
481
if ((bp->bio_flags & BIO_UNMAPPED) != 0 &&
sys/geom/geom_io.c
482
(bp->bio_to->flags & G_PF_ACCEPT_UNMAPPED) == 0 &&
sys/geom/geom_io.c
483
(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)) {
sys/geom/geom_io.c
484
if ((error = g_io_transient_map_bio(bp)) >= 0)
sys/geom/geom_io.c
495
g_io_request(struct bio *bp, struct g_consumer *cp)
sys/geom/geom_io.c
501
biotrack(bp, __func__);
sys/geom/geom_io.c
504
KASSERT(bp != NULL, ("NULL bp in g_io_request"));
sys/geom/geom_io.c
508
KASSERT(bp->bio_driver1 == NULL,
sys/geom/geom_io.c
510
KASSERT(bp->bio_driver2 == NULL,
sys/geom/geom_io.c
512
KASSERT(bp->bio_pflags == 0,
sys/geom/geom_io.c
518
bp->_bio_caller1 = bp->bio_caller1;
sys/geom/geom_io.c
519
bp->_bio_caller2 = bp->bio_caller2;
sys/geom/geom_io.c
520
bp->_bio_cflags = bp->bio_cflags;
sys/geom/geom_io.c
523
cmd = bp->bio_cmd;
sys/geom/geom_io.c
525
KASSERT(bp->bio_data != NULL,
sys/geom/geom_io.c
526
("NULL bp->data in g_io_request(cmd=%hu)", bp->bio_cmd));
sys/geom/geom_io.c
529
KASSERT(bp->bio_data == NULL,
sys/geom/geom_io.c
531
bp->bio_cmd));
sys/geom/geom_io.c
534
KASSERT(bp->bio_offset % cp->provider->sectorsize == 0,
sys/geom/geom_io.c
536
bp->bio_offset, cp->provider->sectorsize));
sys/geom/geom_io.c
537
KASSERT(bp->bio_length % cp->provider->sectorsize == 0,
sys/geom/geom_io.c
539
bp->bio_length, cp->provider->sectorsize));
sys/geom/geom_io.c
543
bp, cp, cp->geom->name, pp, pp->name, bp->bio_cmd);
sys/geom/geom_io.c
545
bp->bio_from = cp;
sys/geom/geom_io.c
546
bp->bio_to = pp;
sys/geom/geom_io.c
547
bp->bio_error = 0;
sys/geom/geom_io.c
548
bp->bio_completed = 0;
sys/geom/geom_io.c
550
KASSERT(!(bp->bio_flags & BIO_ONQUEUE),
sys/geom/geom_io.c
551
("Bio already on queue bp=%p", bp));
sys/geom/geom_io.c
555
binuptime(&bp->bio_t0);
sys/geom/geom_io.c
557
getbinuptime(&bp->bio_t0);
sys/geom/geom_io.c
559
devstat_start_transaction_bio_t0(cp->stat, bp);
sys/geom/geom_io.c
561
devstat_start_transaction_bio_t0(pp->stat, bp);
sys/geom/geom_io.c
570
(bp->bio_flags & BIO_UNMAPPED) == 0 || THREAD_CAN_SLEEP()) &&
sys/geom/geom_io.c
581
error = g_io_check(bp);
sys/geom/geom_io.c
584
"provider %s returned %d", bp, bp->bio_to->name,
sys/geom/geom_io.c
586
g_io_deliver(bp, error);
sys/geom/geom_io.c
589
bp->bio_to->geom->start(bp);
sys/geom/geom_io.c
593
TAILQ_INSERT_TAIL(&g_bio_run_down.bio_queue, bp, bio_queue);
sys/geom/geom_io.c
594
bp->bio_flags |= BIO_ONQUEUE;
sys/geom/geom_io.c
604
g_io_deliver(struct bio *bp, int error)
sys/geom/geom_io.c
612
biotrack(bp, __func__);
sys/geom/geom_io.c
614
KASSERT(bp != NULL, ("NULL bp in g_io_deliver"));
sys/geom/geom_io.c
615
pp = bp->bio_to;
sys/geom/geom_io.c
617
cp = bp->bio_from;
sys/geom/geom_io.c
619
bp->bio_error = error;
sys/geom/geom_io.c
620
bp->bio_done(bp);
sys/geom/geom_io.c
632
KASSERT(bp->bio_caller1 == bp->_bio_caller1,
sys/geom/geom_io.c
634
KASSERT(bp->bio_caller2 == bp->_bio_caller2,
sys/geom/geom_io.c
636
KASSERT(bp->bio_cflags == bp->_bio_cflags,
sys/geom/geom_io.c
640
KASSERT(bp->bio_completed >= 0, ("bio_completed can't be less than 0"));
sys/geom/geom_io.c
641
KASSERT(bp->bio_completed <= bp->bio_length,
sys/geom/geom_io.c
646
bp, cp, cp->geom->name, pp, pp->name, bp->bio_cmd, error,
sys/geom/geom_io.c
647
(intmax_t)bp->bio_offset, (intmax_t)bp->bio_length);
sys/geom/geom_io.c
649
KASSERT(!(bp->bio_flags & BIO_ONQUEUE),
sys/geom/geom_io.c
650
("Bio already on queue bp=%p", bp));
sys/geom/geom_io.c
655
bp->bio_bcount = bp->bio_length;
sys/geom/geom_io.c
656
bp->bio_resid = bp->bio_bcount - bp->bio_completed;
sys/geom/geom_io.c
680
devstat_end_transaction_bio_bt(pp->stat, bp, &now);
sys/geom/geom_io.c
682
devstat_end_transaction_bio_bt(cp->stat, bp, &now);
sys/geom/geom_io.c
689
bp->bio_error = error;
sys/geom/geom_io.c
691
biodone(bp);
sys/geom/geom_io.c
695
TAILQ_INSERT_TAIL(&g_bio_run_up.bio_queue, bp, bio_queue);
sys/geom/geom_io.c
696
bp->bio_flags |= BIO_ONQUEUE;
sys/geom/geom_io.c
706
printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name);
sys/geom/geom_io.c
708
bp->bio_children = 0;
sys/geom/geom_io.c
709
bp->bio_inbed = 0;
sys/geom/geom_io.c
710
bp->bio_driver1 = NULL;
sys/geom/geom_io.c
711
bp->bio_driver2 = NULL;
sys/geom/geom_io.c
712
bp->bio_pflags = 0;
sys/geom/geom_io.c
713
g_io_request(bp, cp);
sys/geom/geom_io.c
73
static int g_io_transient_map_bio(struct bio *bp);
sys/geom/geom_io.c
749
g_io_transient_map_bio(struct bio *bp)
sys/geom/geom_io.c
757
size = round_page(bp->bio_ma_offset + bp->bio_length);
sys/geom/geom_io.c
758
KASSERT(size / PAGE_SIZE == bp->bio_ma_n, ("Bio too short %p", bp));
sys/geom/geom_io.c
767
bp, bp->bio_to->name);
sys/geom/geom_io.c
777
bp, bp->bio_to->name, retried);
sys/geom/geom_io.c
785
pmap_qenter((vm_offset_t)addr, bp->bio_ma, OFF_TO_IDX(size));
sys/geom/geom_io.c
786
bp->bio_data = (caddr_t)addr + bp->bio_ma_offset;
sys/geom/geom_io.c
787
bp->bio_flags |= BIO_TRANSIENT_MAPPING;
sys/geom/geom_io.c
788
bp->bio_flags &= ~BIO_UNMAPPED;
sys/geom/geom_io.c
795
struct bio *bp;
sys/geom/geom_io.c
800
bp = g_bioq_first(&g_bio_run_down);
sys/geom/geom_io.c
801
if (bp == NULL) {
sys/geom/geom_io.c
809
biotrack(bp, __func__);
sys/geom/geom_io.c
836
CTR2(KTR_GEOM, "g_down processing bp %p provider %s", bp,
sys/geom/geom_io.c
837
bp->bio_to->name);
sys/geom/geom_io.c
838
error = g_io_check(bp);
sys/geom/geom_io.c
841
"%s returned %d", bp, bp->bio_to->name, error);
sys/geom/geom_io.c
842
g_io_deliver(bp, error);
sys/geom/geom_io.c
847
"len %ld", bp, bp->bio_to->name, bp->bio_offset,
sys/geom/geom_io.c
848
bp->bio_length);
sys/geom/geom_io.c
849
bp->bio_to->geom->start(bp);
sys/geom/geom_io.c
857
struct bio *bp;
sys/geom/geom_io.c
861
bp = g_bioq_first(&g_bio_run_up);
sys/geom/geom_io.c
862
if (bp == NULL) {
sys/geom/geom_io.c
871
"%jd len %ld", bp, bp->bio_to->name,
sys/geom/geom_io.c
872
bp->bio_offset, bp->bio_length);
sys/geom/geom_io.c
873
biodone(bp);
sys/geom/geom_io.c
881
struct bio *bp;
sys/geom/geom_io.c
889
bp = g_alloc_bio();
sys/geom/geom_io.c
890
bp->bio_cmd = BIO_READ;
sys/geom/geom_io.c
891
bp->bio_done = NULL;
sys/geom/geom_io.c
892
bp->bio_offset = offset;
sys/geom/geom_io.c
893
bp->bio_length = length;
sys/geom/geom_io.c
895
bp->bio_data = ptr;
sys/geom/geom_io.c
896
g_io_request(bp, cp);
sys/geom/geom_io.c
897
errorc = biowait(bp, "gread");
sys/geom/geom_io.c
898
if (errorc == 0 && bp->bio_completed != length)
sys/geom/geom_io.c
902
g_destroy_bio(bp);
sys/geom/geom_io.c
939
struct bio *bp;
sys/geom/geom_io.c
946
bp = g_alloc_bio();
sys/geom/geom_io.c
947
bp->bio_cmd = BIO_WRITE;
sys/geom/geom_io.c
948
bp->bio_done = NULL;
sys/geom/geom_io.c
949
bp->bio_offset = offset;
sys/geom/geom_io.c
950
bp->bio_length = length;
sys/geom/geom_io.c
951
bp->bio_data = ptr;
sys/geom/geom_io.c
952
g_io_request(bp, cp);
sys/geom/geom_io.c
953
error = biowait(bp, "gwrite");
sys/geom/geom_io.c
954
if (error == 0 && bp->bio_completed != length)
sys/geom/geom_io.c
956
g_destroy_bio(bp);
sys/geom/geom_io.c
973
struct bio *bp;
sys/geom/geom_io.c
979
bp = g_alloc_bio();
sys/geom/geom_io.c
980
bp->bio_cmd = BIO_DELETE;
sys/geom/geom_io.c
981
bp->bio_done = NULL;
sys/geom/geom_io.c
982
bp->bio_offset = offset;
sys/geom/geom_io.c
983
bp->bio_length = length;
sys/geom/geom_io.c
984
bp->bio_data = NULL;
sys/geom/geom_io.c
985
g_io_request(bp, cp);
sys/geom/geom_io.c
986
error = biowait(bp, "gdelete");
sys/geom/geom_io.c
987
if (error == 0 && bp->bio_completed != length)
sys/geom/geom_io.c
989
g_destroy_bio(bp);
sys/geom/geom_io.c
994
g_print_bio(const char *prefix, const struct bio *bp, const char *fmtsuffix,
sys/geom/geom_slice.c
154
g_slice_finish_hot(struct bio *bp)
sys/geom/geom_slice.c
163
KASSERT(bp->bio_to != NULL,
sys/geom/geom_slice.c
164
("NULL bio_to in g_slice_finish_hot(%p)", bp));
sys/geom/geom_slice.c
165
KASSERT(bp->bio_from != NULL,
sys/geom/geom_slice.c
166
("NULL bio_from in g_slice_finish_hot(%p)", bp));
sys/geom/geom_slice.c
167
gp = bp->bio_to->geom;
sys/geom/geom_slice.c
170
KASSERT(cp != NULL, ("NULL consumer in g_slice_finish_hot(%p)", bp));
sys/geom/geom_slice.c
171
idx = bp->bio_to->index;
sys/geom/geom_slice.c
174
bp2 = g_clone_bio(bp);
sys/geom/geom_slice.c
176
g_io_deliver(bp, ENOMEM);
sys/geom/geom_slice.c
188
g_slice_done(struct bio *bp)
sys/geom/geom_slice.c
191
KASSERT(bp->bio_cmd == BIO_GETATTR &&
sys/geom/geom_slice.c
192
strcmp(bp->bio_attribute, "GEOM::ident") == 0,
sys/geom/geom_slice.c
193
("bio_cmd=0x%x bio_attribute=%s", bp->bio_cmd, bp->bio_attribute));
sys/geom/geom_slice.c
195
if (bp->bio_error == 0 && bp->bio_data[0] != '\0') {
sys/geom/geom_slice.c
200
bp->bio_parent->bio_to->index);
sys/geom/geom_slice.c
201
if (strlcat(bp->bio_data, idx, bp->bio_length) >=
sys/geom/geom_slice.c
202
bp->bio_length) {
sys/geom/geom_slice.c
203
bp->bio_error = EFAULT;
sys/geom/geom_slice.c
206
g_std_done(bp);
sys/geom/geom_slice.c
210
g_slice_start(struct bio *bp)
sys/geom/geom_slice.c
223
pp = bp->bio_to;
sys/geom/geom_slice.c
229
switch(bp->bio_cmd) {
sys/geom/geom_slice.c
233
if (bp->bio_offset > gsl->length) {
sys/geom/geom_slice.c
234
g_io_deliver(bp, EINVAL); /* XXX: EWHAT ? */
sys/geom/geom_slice.c
241
t = bp->bio_offset + gsl->offset;
sys/geom/geom_slice.c
246
if (t + bp->bio_length <= ghp->offset)
sys/geom/geom_slice.c
248
switch(bp->bio_cmd) {
sys/geom/geom_slice.c
258
g_io_deliver(bp, EROFS);
sys/geom/geom_slice.c
261
error = gsp->start(bp);
sys/geom/geom_slice.c
263
g_io_deliver(bp, error);
sys/geom/geom_slice.c
266
error = g_post_event(gsp->hot, bp, M_NOWAIT,
sys/geom/geom_slice.c
269
g_io_deliver(bp, error);
sys/geom/geom_slice.c
274
bp2 = g_clone_bio(bp);
sys/geom/geom_slice.c
276
g_io_deliver(bp, ENOMEM);
sys/geom/geom_slice.c
287
if (gsp->start != NULL && gsp->start(bp))
sys/geom/geom_slice.c
289
if (!strcmp("GEOM::ident", bp->bio_attribute)) {
sys/geom/geom_slice.c
290
bp2 = g_clone_bio(bp);
sys/geom/geom_slice.c
292
g_io_deliver(bp, ENOMEM);
sys/geom/geom_slice.c
299
if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) {
sys/geom/geom_slice.c
302
gkd = (struct g_kerneldump *)bp->bio_data;
sys/geom/geom_slice.c
311
bp2 = g_clone_bio(bp);
sys/geom/geom_slice.c
313
g_io_deliver(bp, ENOMEM);
sys/geom/geom_slice.c
320
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/geom_slice.h
56
typedef int g_slice_start_t (struct bio *bp);
sys/geom/geom_slice.h
88
void g_slice_finish_hot(struct bio *bp);
sys/geom/geom_subr.c
108
if (bp != NULL) {
sys/geom/geom_subr.c
1095
g_handleattr_int(struct bio *bp, const char *attribute, int val)
sys/geom/geom_subr.c
1098
return (g_handleattr(bp, attribute, &val, sizeof(val)));
sys/geom/geom_subr.c
110
g_format_bio(&sb, bp);
sys/geom/geom_subr.c
1102
g_handleattr_uint16_t(struct bio *bp, const char *attribute, uint16_t val)
sys/geom/geom_subr.c
1105
return (g_handleattr(bp, attribute, &val, sizeof(val)));
sys/geom/geom_subr.c
1109
g_handleattr_off_t(struct bio *bp, const char *attribute, off_t val)
sys/geom/geom_subr.c
1112
return (g_handleattr(bp, attribute, &val, sizeof(val)));
sys/geom/geom_subr.c
1116
g_handleattr_str(struct bio *bp, const char *attribute, const char *str)
sys/geom/geom_subr.c
1119
return (g_handleattr(bp, attribute, str, 0));
sys/geom/geom_subr.c
1123
g_handleattr(struct bio *bp, const char *attribute, const void *val, int len)
sys/geom/geom_subr.c
1127
if (strcmp(bp->bio_attribute, attribute))
sys/geom/geom_subr.c
1130
bzero(bp->bio_data, bp->bio_length);
sys/geom/geom_subr.c
1131
if (strlcpy(bp->bio_data, val, bp->bio_length) >=
sys/geom/geom_subr.c
1132
bp->bio_length) {
sys/geom/geom_subr.c
1134
__func__, bp->bio_to->name, attribute,
sys/geom/geom_subr.c
1135
(intmax_t)bp->bio_length, strlen(val));
sys/geom/geom_subr.c
1138
} else if (bp->bio_length == len) {
sys/geom/geom_subr.c
1139
bcopy(val, bp->bio_data, len);
sys/geom/geom_subr.c
1142
bp->bio_to->name, attribute, (intmax_t)bp->bio_length, len);
sys/geom/geom_subr.c
1146
bp->bio_completed = bp->bio_length;
sys/geom/geom_subr.c
1147
g_io_deliver(bp, error);
sys/geom/geom_subr.c
1162
g_std_done(struct bio *bp)
sys/geom/geom_subr.c
1166
bp2 = bp->bio_parent;
sys/geom/geom_subr.c
1168
if ((bp->bio_flags & BIO_EXTERR) != 0) {
sys/geom/geom_subr.c
1170
bp2->bio_exterr = bp->bio_exterr;
sys/geom/geom_subr.c
1172
bp2->bio_error = bp->bio_error;
sys/geom/geom_subr.c
1175
bp2->bio_completed += bp->bio_completed;
sys/geom/geom_subr.c
1176
g_destroy_bio(bp);
sys/geom/geom_subr.c
1612
db_print_bio_cmd(struct bio *bp)
sys/geom/geom_subr.c
1615
switch (bp->bio_cmd) {
sys/geom/geom_subr.c
1631
db_print_bio_flags(struct bio *bp)
sys/geom/geom_subr.c
1637
if (bp->bio_flags & BIO_ERROR) {
sys/geom/geom_subr.c
1641
if (bp->bio_flags & BIO_DONE) {
sys/geom/geom_subr.c
1645
if (bp->bio_flags & BIO_ONQUEUE)
sys/geom/geom_subr.c
1655
struct bio *bp;
sys/geom/geom_subr.c
1658
bp = (struct bio *)addr;
sys/geom/geom_subr.c
1659
db_printf("BIO %p\n", bp);
sys/geom/geom_subr.c
1660
db_print_bio_cmd(bp);
sys/geom/geom_subr.c
1661
db_print_bio_flags(bp);
sys/geom/geom_subr.c
1662
db_printf(" cflags: 0x%hx\n", bp->bio_cflags);
sys/geom/geom_subr.c
1663
db_printf(" pflags: 0x%hx\n", bp->bio_pflags);
sys/geom/geom_subr.c
1664
db_printf(" offset: %jd\n", (intmax_t)bp->bio_offset);
sys/geom/geom_subr.c
1665
db_printf(" length: %jd\n", (intmax_t)bp->bio_length);
sys/geom/geom_subr.c
1666
db_printf(" bcount: %ld\n", bp->bio_bcount);
sys/geom/geom_subr.c
1667
db_printf(" resid: %ld\n", bp->bio_resid);
sys/geom/geom_subr.c
1668
db_printf(" completed: %jd\n", (intmax_t)bp->bio_completed);
sys/geom/geom_subr.c
1669
db_printf(" children: %u\n", bp->bio_children);
sys/geom/geom_subr.c
1670
db_printf(" inbed: %u\n", bp->bio_inbed);
sys/geom/geom_subr.c
1671
db_printf(" error: %d\n", bp->bio_error);
sys/geom/geom_subr.c
1672
db_printf(" parent: %p\n", bp->bio_parent);
sys/geom/geom_subr.c
1673
db_printf(" driver1: %p\n", bp->bio_driver1);
sys/geom/geom_subr.c
1674
db_printf(" driver2: %p\n", bp->bio_driver2);
sys/geom/geom_subr.c
1675
db_printf(" caller1: %p\n", bp->bio_caller1);
sys/geom/geom_subr.c
1676
db_printf(" caller2: %p\n", bp->bio_caller2);
sys/geom/geom_subr.c
1677
db_printf(" bio_from: %p\n", bp->bio_from);
sys/geom/geom_subr.c
1678
db_printf(" bio_to: %p\n", bp->bio_to);
sys/geom/geom_subr.c
1679
if ((bp->bio_flags & BIO_EXTERR) != 0)
sys/geom/geom_subr.c
1680
exterr_db_print(&bp->bio_exterr);
sys/geom/geom_subr.c
1683
db_printf(" bio_track_bp: %p\n", bp->bio_track_bp);
sys/geom/geom_subr.c
84
g_dbg_printf(const char *classname, int lvl, struct bio *bp,
sys/geom/geom_vfs.c
102
struct buf *bp;
sys/geom/geom_vfs.c
112
bp = bip->bio_caller2;
sys/geom/geom_vfs.c
113
vp = bp->b_vp;
sys/geom/geom_vfs.c
128
if (bp->b_iocmd == BIO_READ) {
sys/geom/geom_vfs.c
129
if (BUF_DISOWNED(bp))
sys/geom/geom_vfs.c
133
} else if (bp->b_iocmd == BIO_WRITE) {
sys/geom/geom_vfs.c
134
if (BUF_DISOWNED(bp))
sys/geom/geom_vfs.c
146
if ((bp->b_xflags & BX_CVTENXIO) != 0) {
sys/geom/geom_vfs.c
161
bp->b_ioflags = bip->bio_flags;
sys/geom/geom_vfs.c
163
bp->b_ioflags |= BIO_ERROR;
sys/geom/geom_vfs.c
164
if ((bp->b_ioflags & BIO_EXTERR) != 0)
sys/geom/geom_vfs.c
165
bp->b_exterr = bip->bio_exterr;
sys/geom/geom_vfs.c
167
bp->b_error = bip->bio_error;
sys/geom/geom_vfs.c
168
bp->b_resid = bp->b_bcount - bip->bio_completed;
sys/geom/geom_vfs.c
182
bufdone(bp);
sys/geom/geom_vfs.c
186
g_vfs_strategy(struct bufobj *bo, struct buf *bp)
sys/geom/geom_vfs.c
201
bp->b_error = ENXIO;
sys/geom/geom_vfs.c
202
bp->b_ioflags |= BIO_ERROR;
sys/geom/geom_vfs.c
203
EXTERROR_KE(&bp->b_exterr, ENXIO,
sys/geom/geom_vfs.c
205
bufdone(bp);
sys/geom/geom_vfs.c
212
bip->bio_cmd = bp->b_iocmd;
sys/geom/geom_vfs.c
213
bip->bio_offset = bp->b_iooffset;
sys/geom/geom_vfs.c
214
bip->bio_length = bp->b_bcount;
sys/geom/geom_vfs.c
215
bdata2bio(bp, bip);
sys/geom/geom_vfs.c
216
if ((bp->b_flags & B_BARRIER) != 0) {
sys/geom/geom_vfs.c
218
bp->b_flags &= ~B_BARRIER;
sys/geom/geom_vfs.c
220
if (bp->b_iocmd == BIO_SPEEDUP)
sys/geom/geom_vfs.c
221
bip->bio_flags |= bp->b_ioflags;
sys/geom/geom_vfs.c
223
bip->bio_caller2 = bp;
sys/geom/geom_vfs.c
225
buf_track(bp, __func__);
sys/geom/geom_vfs.c
226
bip->bio_track_bp = bp;
sys/geom/geom_vfs.h
38
void g_vfs_strategy(struct bufobj *bo, struct buf *bp);
sys/geom/journal/g_journal.c
1095
g_journal_read_first(struct g_journal_softc *sc, struct bio *bp)
sys/geom/journal/g_journal.c
1104
cbp->bio_cflags = bp->bio_cflags;
sys/geom/journal/g_journal.c
1105
cbp->bio_parent = bp;
sys/geom/journal/g_journal.c
1106
cbp->bio_offset = bp->bio_joffset;
sys/geom/journal/g_journal.c
1107
cbp->bio_length = bp->bio_length;
sys/geom/journal/g_journal.c
1108
cbp->bio_data = gj_malloc(bp->bio_length, M_WAITOK);
sys/geom/journal/g_journal.c
1119
struct bio *bioq, *bp, *lbp;
sys/geom/journal/g_journal.c
1124
bp = GJQ_FIRST(sc->sc_inactive.jj_queue);
sys/geom/journal/g_journal.c
1125
if (bp == NULL)
sys/geom/journal/g_journal.c
1127
GJQ_REMOVE(sc->sc_inactive.jj_queue, bp);
sys/geom/journal/g_journal.c
1129
GJQ_INSERT_AFTER(bioq, bp, lbp);
sys/geom/journal/g_journal.c
1130
lbp = bp;
sys/geom/journal/g_journal.c
1135
while ((bp = GJQ_FIRST(bioq)) != NULL) {
sys/geom/journal/g_journal.c
1136
GJQ_REMOVE(bioq, bp);
sys/geom/journal/g_journal.c
1137
GJQ_INSERT_HEAD(sc->sc_copy_queue, bp);
sys/geom/journal/g_journal.c
1138
bp->bio_cflags = GJ_BIO_COPY;
sys/geom/journal/g_journal.c
1139
if (bp->bio_data == NULL)
sys/geom/journal/g_journal.c
1140
g_journal_read_first(sc, bp);
sys/geom/journal/g_journal.c
1142
bp->bio_joffset = 0;
sys/geom/journal/g_journal.c
1143
GJ_LOGREQ(4, bp, "SEND");
sys/geom/journal/g_journal.c
1144
g_io_request(bp, sc->sc_dconsumer);
sys/geom/journal/g_journal.c
1170
g_journal_copy_read_done(struct bio *bp)
sys/geom/journal/g_journal.c
1176
KASSERT(bp->bio_cflags == GJ_BIO_COPY,
sys/geom/journal/g_journal.c
1177
("Invalid bio (%d != %d).", bp->bio_cflags, GJ_BIO_COPY));
sys/geom/journal/g_journal.c
1179
sc = bp->bio_from->geom->softc;
sys/geom/journal/g_journal.c
1180
pbp = bp->bio_parent;
sys/geom/journal/g_journal.c
1182
if (bp->bio_error != 0) {
sys/geom/journal/g_journal.c
1184
bp->bio_to->name, bp->bio_error);
sys/geom/journal/g_journal.c
1188
gj_free(bp->bio_data, bp->bio_length);
sys/geom/journal/g_journal.c
1190
g_destroy_bio(bp);
sys/geom/journal/g_journal.c
1194
pbp->bio_data = bp->bio_data;
sys/geom/journal/g_journal.c
1197
GJ_LOGREQ(4, bp, "READ DONE");
sys/geom/journal/g_journal.c
1198
g_destroy_bio(bp);
sys/geom/journal/g_journal.c
1206
g_journal_copy_write_done(struct bio *bp)
sys/geom/journal/g_journal.c
1210
KASSERT(bp->bio_cflags == GJ_BIO_COPY,
sys/geom/journal/g_journal.c
1211
("Invalid bio (%d != %d).", bp->bio_cflags, GJ_BIO_COPY));
sys/geom/journal/g_journal.c
1213
sc = bp->bio_from->geom->softc;
sys/geom/journal/g_journal.c
1216
if (bp->bio_error != 0) {
sys/geom/journal/g_journal.c
1217
GJ_LOGREQ(0, bp, "[copy] Error while writing data (error=%d)",
sys/geom/journal/g_journal.c
1218
bp->bio_error);
sys/geom/journal/g_journal.c
1220
GJQ_REMOVE(sc->sc_copy_queue, bp);
sys/geom/journal/g_journal.c
1221
gj_free(bp->bio_data, bp->bio_length);
sys/geom/journal/g_journal.c
1222
GJ_LOGREQ(4, bp, "DONE");
sys/geom/journal/g_journal.c
1223
g_destroy_bio(bp);
sys/geom/journal/g_journal.c
1234
static void g_journal_flush_done(struct bio *bp);
sys/geom/journal/g_journal.c
1246
struct bio *bp, *fbp, *pbp;
sys/geom/journal/g_journal.c
1291
bp = sc->sc_current_queue;
sys/geom/journal/g_journal.c
1292
KASSERT(bp != NULL, ("NULL bp"));
sys/geom/journal/g_journal.c
1293
bp->bio_to = pp;
sys/geom/journal/g_journal.c
1294
GJ_LOGREQ(4, bp, "FLUSHED");
sys/geom/journal/g_journal.c
1295
sc->sc_current_queue = bp->bio_next;
sys/geom/journal/g_journal.c
1296
bp->bio_next = NULL;
sys/geom/journal/g_journal.c
1301
ent->je_offset = bp->bio_offset;
sys/geom/journal/g_journal.c
1303
ent->je_length = bp->bio_length;
sys/geom/journal/g_journal.c
1305
data = bp->bio_data;
sys/geom/journal/g_journal.c
1308
g_reset_bio(bp);
sys/geom/journal/g_journal.c
1309
bp->bio_cflags = GJ_BIO_JOURNAL;
sys/geom/journal/g_journal.c
1310
bp->bio_offset = ent->je_offset;
sys/geom/journal/g_journal.c
1311
bp->bio_joffset = ent->je_joffset;
sys/geom/journal/g_journal.c
1312
bp->bio_length = ent->je_length;
sys/geom/journal/g_journal.c
1313
bp->bio_data = data;
sys/geom/journal/g_journal.c
1314
bp->bio_cmd = BIO_WRITE;
sys/geom/journal/g_journal.c
1315
bp->bio_done = g_journal_std_done;
sys/geom/journal/g_journal.c
1316
GJQ_INSERT_AFTER(sc->sc_flush_queue, bp, pbp);
sys/geom/journal/g_journal.c
1317
pbp = bp;
sys/geom/journal/g_journal.c
1318
bp->bio_to = pp;
sys/geom/journal/g_journal.c
1319
GJ_LOGREQ(4, bp, "FLUSH_OUT");
sys/geom/journal/g_journal.c
1320
joffset += bp->bio_length;
sys/geom/journal/g_journal.c
1354
g_journal_flush_done(struct bio *bp)
sys/geom/journal/g_journal.c
1359
KASSERT((bp->bio_cflags & GJ_BIO_MASK) == GJ_BIO_JOURNAL,
sys/geom/journal/g_journal.c
1360
("Invalid bio (%d != %d).", bp->bio_cflags, GJ_BIO_JOURNAL));
sys/geom/journal/g_journal.c
1362
cp = bp->bio_from;
sys/geom/journal/g_journal.c
1366
if (bp->bio_error != 0) {
sys/geom/journal/g_journal.c
1367
GJ_LOGREQ(0, bp, "[flush] Error while writing data (error=%d)",
sys/geom/journal/g_journal.c
1368
bp->bio_error);
sys/geom/journal/g_journal.c
1370
gj_free(bp->bio_data, bp->bio_length);
sys/geom/journal/g_journal.c
1371
GJ_LOGREQ(4, bp, "DONE");
sys/geom/journal/g_journal.c
1372
g_destroy_bio(bp);
sys/geom/journal/g_journal.c
1381
struct bio *bioq, *bp, *lbp;
sys/geom/journal/g_journal.c
1387
bp = GJQ_FIRST(sc->sc_flush_queue);
sys/geom/journal/g_journal.c
1388
if (bp != NULL) {
sys/geom/journal/g_journal.c
1389
GJQ_REMOVE(sc->sc_flush_queue, bp);
sys/geom/journal/g_journal.c
1391
bp->bio_offset = bp->bio_joffset;
sys/geom/journal/g_journal.c
1392
bp->bio_joffset = 0;
sys/geom/journal/g_journal.c
1394
GJQ_INSERT_AFTER(bioq, bp, lbp);
sys/geom/journal/g_journal.c
1395
lbp = bp;
sys/geom/journal/g_journal.c
1405
while ((bp = GJQ_FIRST(bioq)) != NULL) {
sys/geom/journal/g_journal.c
1406
GJQ_REMOVE(bioq, bp);
sys/geom/journal/g_journal.c
1407
GJ_LOGREQ(3, bp, "Flush request send");
sys/geom/journal/g_journal.c
1408
g_io_request(bp, cp);
sys/geom/journal/g_journal.c
1413
g_journal_add_current(struct g_journal_softc *sc, struct bio *bp)
sys/geom/journal/g_journal.c
1417
GJ_LOGREQ(4, bp, "CURRENT %d", sc->sc_current_count);
sys/geom/journal/g_journal.c
1418
n = g_journal_insert_bio(&sc->sc_current_queue, bp, M_WAITOK);
sys/geom/journal/g_journal.c
1426
bp->bio_completed = bp->bio_length;
sys/geom/journal/g_journal.c
1427
g_io_deliver(bp, 0);
sys/geom/journal/g_journal.c
1439
struct bio *bp;
sys/geom/journal/g_journal.c
1445
bp = bioq_takefirst(&sc->sc_delayed_queue);
sys/geom/journal/g_journal.c
1446
if (bp == NULL)
sys/geom/journal/g_journal.c
1449
g_journal_add_current(sc, bp);
sys/geom/journal/g_journal.c
1458
g_journal_add_request(struct g_journal_softc *sc, struct bio *bp)
sys/geom/journal/g_journal.c
1466
GJ_LOGREQ(4, bp, "DELAYED");
sys/geom/journal/g_journal.c
1467
bioq_insert_tail(&sc->sc_delayed_queue, bp);
sys/geom/journal/g_journal.c
1474
g_journal_add_current(sc, bp);
sys/geom/journal/g_journal.c
1477
static void g_journal_read_done(struct bio *bp);
sys/geom/journal/g_journal.c
1487
struct bio *bp;
sys/geom/journal/g_journal.c
1489
GJQ_FOREACH(head, bp) {
sys/geom/journal/g_journal.c
1490
if (bp->bio_offset == -1)
sys/geom/journal/g_journal.c
1492
cstart = MAX(ostart, bp->bio_offset);
sys/geom/journal/g_journal.c
1493
cend = MIN(oend, bp->bio_offset + bp->bio_length);
sys/geom/journal/g_journal.c
1500
bp = NULL;
sys/geom/journal/g_journal.c
1504
if (bp->bio_data == NULL)
sys/geom/journal/g_journal.c
1507
bp);
sys/geom/journal/g_journal.c
1508
bcopy(bp->bio_data + cstart - bp->bio_offset,
sys/geom/journal/g_journal.c
1521
return (bp);
sys/geom/journal/g_journal.c
1537
struct bio *bp, *nbp, *head;
sys/geom/journal/g_journal.c
1544
bp = NULL;
sys/geom/journal/g_journal.c
1572
bp = g_journal_read_find(head, sorted, pbp, ostart, oend);
sys/geom/journal/g_journal.c
1573
if (bp == pbp) { /* Got the whole request. */
sys/geom/journal/g_journal.c
1576
} else if (bp != NULL) {
sys/geom/journal/g_journal.c
1577
cstart = MAX(ostart, bp->bio_offset);
sys/geom/journal/g_journal.c
1578
cend = MIN(oend, bp->bio_offset + bp->bio_length);
sys/geom/journal/g_journal.c
1584
if (bp != NULL) {
sys/geom/journal/g_journal.c
1585
if (bp->bio_data == NULL) {
sys/geom/journal/g_journal.c
1591
bp->bio_joffset + cstart - bp->bio_offset;
sys/geom/journal/g_journal.c
1628
g_journal_read_done(struct bio *bp)
sys/geom/journal/g_journal.c
1632
KASSERT(bp->bio_cflags == GJ_BIO_READ,
sys/geom/journal/g_journal.c
1633
("Invalid bio (%d != %d).", bp->bio_cflags, GJ_BIO_READ));
sys/geom/journal/g_journal.c
1635
pbp = bp->bio_parent;
sys/geom/journal/g_journal.c
1637
pbp->bio_completed += bp->bio_length;
sys/geom/journal/g_journal.c
1639
if (bp->bio_error != 0) {
sys/geom/journal/g_journal.c
1641
pbp->bio_error = bp->bio_error;
sys/geom/journal/g_journal.c
1643
bp->bio_to->name, bp->bio_error);
sys/geom/journal/g_journal.c
1645
g_destroy_bio(bp);
sys/geom/journal/g_journal.c
1731
g_journal_sync_read(struct g_consumer *cp, struct bio *bp, off_t offset,
sys/geom/journal/g_journal.c
1736
g_reset_bio(bp);
sys/geom/journal/g_journal.c
1737
bp->bio_cmd = BIO_READ;
sys/geom/journal/g_journal.c
1738
bp->bio_done = NULL;
sys/geom/journal/g_journal.c
1739
bp->bio_offset = offset;
sys/geom/journal/g_journal.c
1740
bp->bio_length = cp->provider->sectorsize;
sys/geom/journal/g_journal.c
1741
bp->bio_data = data;
sys/geom/journal/g_journal.c
1742
g_io_request(bp, cp);
sys/geom/journal/g_journal.c
1743
error = biowait(bp, "gjs_read");
sys/geom/journal/g_journal.c
1767
struct bio *bp, *fbp, *tbp;
sys/geom/journal/g_journal.c
1777
bp = g_alloc_bio();
sys/geom/journal/g_journal.c
1786
error = g_journal_sync_read(cp, bp, offset, buf);
sys/geom/journal/g_journal.c
1813
error = g_journal_sync_read(cp, bp, offset, buf);
sys/geom/journal/g_journal.c
1925
gj_free(bp->bio_data, cp->provider->sectorsize);
sys/geom/journal/g_journal.c
1926
g_destroy_bio(bp);
sys/geom/journal/g_journal.c
2018
struct bio *bp;
sys/geom/journal/g_journal.c
2081
bp = bioq_first(&sc->sc_back_queue);
sys/geom/journal/g_journal.c
2082
if (bp != NULL)
sys/geom/journal/g_journal.c
2083
type = (bp->bio_cflags & GJ_BIO_MASK);
sys/geom/journal/g_journal.c
2084
if (bp == NULL) {
sys/geom/journal/g_journal.c
2085
bp = bioq_first(&sc->sc_regular_queue);
sys/geom/journal/g_journal.c
2086
if (bp != NULL)
sys/geom/journal/g_journal.c
2089
if (bp == NULL) {
sys/geom/journal/g_journal.c
2127
type == GJ_BIO_REGULAR && bp->bio_cmd == BIO_WRITE) {
sys/geom/journal/g_journal.c
2128
GJ_LOGREQ(2, bp, "WRITE on SWITCH");
sys/geom/journal/g_journal.c
2132
bioq_remove(&sc->sc_regular_queue, bp);
sys/geom/journal/g_journal.c
2134
bioq_remove(&sc->sc_back_queue, bp);
sys/geom/journal/g_journal.c
2139
switch (bp->bio_cmd) {
sys/geom/journal/g_journal.c
2141
g_journal_read(sc, bp, bp->bio_offset,
sys/geom/journal/g_journal.c
2142
bp->bio_offset + bp->bio_length);
sys/geom/journal/g_journal.c
2146
g_journal_add_request(sc, bp);
sys/geom/journal/g_journal.c
2150
panic("Invalid bio_cmd (%d).", bp->bio_cmd);
sys/geom/journal/g_journal.c
2154
switch (bp->bio_cmd) {
sys/geom/journal/g_journal.c
2156
if (g_journal_copy_read_done(bp))
sys/geom/journal/g_journal.c
2160
g_journal_copy_write_done(bp);
sys/geom/journal/g_journal.c
2164
panic("Invalid bio_cmd (%d).", bp->bio_cmd);
sys/geom/journal/g_journal.c
2168
g_journal_flush_done(bp);
sys/geom/journal/g_journal.c
2689
struct bio *bp;
sys/geom/journal/g_journal.c
2700
for (bp = sc->sc_inactive.jj_queue; nfree > 0 && bp != NULL;
sys/geom/journal/g_journal.c
2701
nfree--, bp = bp->bio_next) {
sys/geom/journal/g_journal.c
2712
if (bp->bio_data != NULL) {
sys/geom/journal/g_journal.c
2715
gj_free(bp->bio_data, bp->bio_length);
sys/geom/journal/g_journal.c
2716
bp->bio_data = NULL;
sys/geom/journal/g_journal.c
652
g_journal_metadata_done(struct bio *bp)
sys/geom/journal/g_journal.c
658
if (bp->bio_error != 0) {
sys/geom/journal/g_journal.c
659
GJ_LOGREQ(0, bp, "Cannot update metadata (error=%d).",
sys/geom/journal/g_journal.c
660
bp->bio_error);
sys/geom/journal/g_journal.c
662
GJ_LOGREQ(2, bp, "Metadata updated.");
sys/geom/journal/g_journal.c
664
gj_free(bp->bio_data, bp->bio_length);
sys/geom/journal/g_journal.c
665
g_destroy_bio(bp);
sys/geom/journal/g_journal.c
673
struct bio *bp;
sys/geom/journal/g_journal.c
705
bp = g_alloc_bio();
sys/geom/journal/g_journal.c
706
bp->bio_offset = cp->provider->mediasize - cp->provider->sectorsize;
sys/geom/journal/g_journal.c
707
bp->bio_length = cp->provider->sectorsize;
sys/geom/journal/g_journal.c
708
bp->bio_data = sector;
sys/geom/journal/g_journal.c
709
bp->bio_cmd = BIO_WRITE;
sys/geom/journal/g_journal.c
711
bp->bio_done = g_journal_metadata_done;
sys/geom/journal/g_journal.c
712
g_io_request(bp, cp);
sys/geom/journal/g_journal.c
714
bp->bio_done = NULL;
sys/geom/journal/g_journal.c
715
g_io_request(bp, cp);
sys/geom/journal/g_journal.c
716
biowait(bp, "gjmdu");
sys/geom/journal/g_journal.c
717
g_journal_metadata_done(bp);
sys/geom/journal/g_journal.c
730
g_journal_start(struct bio *bp)
sys/geom/journal/g_journal.c
734
sc = bp->bio_to->geom->softc;
sys/geom/journal/g_journal.c
735
GJ_LOGREQ(3, bp, "Request received.");
sys/geom/journal/g_journal.c
737
switch (bp->bio_cmd) {
sys/geom/journal/g_journal.c
741
bioq_insert_tail(&sc->sc_regular_queue, bp);
sys/geom/journal/g_journal.c
746
if (strcmp(bp->bio_attribute, "GJOURNAL::provider") == 0) {
sys/geom/journal/g_journal.c
747
strlcpy(bp->bio_data, bp->bio_to->name, bp->bio_length);
sys/geom/journal/g_journal.c
748
bp->bio_completed = strlen(bp->bio_to->name) + 1;
sys/geom/journal/g_journal.c
749
g_io_deliver(bp, 0);
sys/geom/journal/g_journal.c
756
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/journal/g_journal.c
762
g_journal_std_done(struct bio *bp)
sys/geom/journal/g_journal.c
766
sc = bp->bio_from->geom->softc;
sys/geom/journal/g_journal.c
768
bioq_insert_tail(&sc->sc_back_queue, bp);
sys/geom/journal/g_journal.c
777
struct bio *bp;
sys/geom/journal/g_journal.c
779
bp = g_alloc_bio();
sys/geom/journal/g_journal.c
780
bp->bio_offset = start;
sys/geom/journal/g_journal.c
781
bp->bio_joffset = joffset;
sys/geom/journal/g_journal.c
782
bp->bio_length = end - start;
sys/geom/journal/g_journal.c
783
bp->bio_cmd = BIO_WRITE;
sys/geom/journal/g_journal.c
784
bp->bio_done = g_journal_std_done;
sys/geom/journal/g_journal.c
786
bp->bio_data = NULL;
sys/geom/journal/g_journal.c
788
bp->bio_data = gj_malloc(bp->bio_length, flags);
sys/geom/journal/g_journal.c
789
if (bp->bio_data != NULL)
sys/geom/journal/g_journal.c
790
bcopy(data, bp->bio_data, bp->bio_length);
sys/geom/journal/g_journal.c
792
return (bp);
sys/geom/journal/g_journal.c
795
#define g_journal_insert_bio(head, bp, flags) \
sys/geom/journal/g_journal.c
796
g_journal_insert((head), (bp)->bio_offset, \
sys/geom/journal/g_journal.c
797
(bp)->bio_offset + (bp)->bio_length, (bp)->bio_joffset, \
sys/geom/journal/g_journal.c
798
(bp)->bio_data, flags)
sys/geom/journal/g_journal.h
155
#define GJQ_INSERT_HEAD(head, bp) do { \
sys/geom/journal/g_journal.h
156
(bp)->bio_next = (head); \
sys/geom/journal/g_journal.h
157
(head) = (bp); \
sys/geom/journal/g_journal.h
159
#define GJQ_INSERT_AFTER(head, bp, pbp) do { \
sys/geom/journal/g_journal.h
161
GJQ_INSERT_HEAD(head, bp); \
sys/geom/journal/g_journal.h
163
(bp)->bio_next = (pbp)->bio_next; \
sys/geom/journal/g_journal.h
164
(pbp)->bio_next = (bp); \
sys/geom/journal/g_journal.h
167
#define GJQ_LAST(head, bp) do { \
sys/geom/journal/g_journal.h
171
(bp) = (head); \
sys/geom/journal/g_journal.h
176
(bp) = (_bp); \
sys/geom/journal/g_journal.h
179
#define GJQ_REMOVE(head, bp) do { \
sys/geom/journal/g_journal.h
182
if ((head) == (bp)) { \
sys/geom/journal/g_journal.h
183
(head) = (bp)->bio_next; \
sys/geom/journal/g_journal.h
184
(bp)->bio_next = NULL; \
sys/geom/journal/g_journal.h
188
if (_bp->bio_next == (bp)) \
sys/geom/journal/g_journal.h
192
KASSERT(_bp->bio_next == (bp), ("bio_next != bp")); \
sys/geom/journal/g_journal.h
193
_bp->bio_next = (bp)->bio_next; \
sys/geom/journal/g_journal.h
194
(bp)->bio_next = NULL; \
sys/geom/journal/g_journal.h
196
#define GJQ_FOREACH(head, bp) \
sys/geom/journal/g_journal.h
197
for ((bp) = (head); (bp) != NULL; (bp) = (bp)->bio_next)
sys/geom/journal/g_journal.h
52
#define GJ_LOGREQ(lvl, bp, ...) \
sys/geom/journal/g_journal.h
53
_GEOM_DEBUG("GEOM_JOURNAL", g_journal_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/label/g_label.c
332
g_label_start_taste(struct bio *bp __unused)
sys/geom/linux_lvm/g_linux_lvm.c
192
g_llvm_start(struct bio *bp)
sys/geom/linux_lvm/g_linux_lvm.c
206
pp = bp->bio_to;
sys/geom/linux_lvm/g_linux_lvm.c
210
switch (bp->bio_cmd) {
sys/geom/linux_lvm/g_linux_lvm.c
221
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/linux_lvm/g_linux_lvm.c
228
addr = bp->bio_data;
sys/geom/linux_lvm/g_linux_lvm.c
229
offset = bp->bio_offset; /* virtual offset and length */
sys/geom/linux_lvm/g_linux_lvm.c
230
length = bp->bio_length;
sys/geom/linux_lvm/g_linux_lvm.c
236
cb = g_clone_bio(bp);
sys/geom/linux_lvm/g_linux_lvm.c
239
if (bp->bio_error == 0)
sys/geom/linux_lvm/g_linux_lvm.c
240
bp->bio_error = ENOMEM;
sys/geom/linux_lvm/g_linux_lvm.c
241
g_io_deliver(bp, bp->bio_error);
sys/geom/linux_lvm/g_linux_lvm.c
287
bp->bio_cmd == BIO_READ ? "R" : "W",
sys/geom/linux_lvm/g_linux_lvm.c
309
bp->bio_completed = bp->bio_length;
sys/geom/linux_lvm/g_linux_lvm.c
310
g_io_deliver(bp, 0);
sys/geom/mirror/g_mirror.c
1005
if (bp->bio_error == 0 && pbp->bio_error == 0) {
sys/geom/mirror/g_mirror.c
1006
G_MIRROR_LOGREQ(3, bp, "Request delivered.");
sys/geom/mirror/g_mirror.c
1007
g_destroy_bio(bp);
sys/geom/mirror/g_mirror.c
1020
} else if (bp->bio_error != 0) {
sys/geom/mirror/g_mirror.c
1022
pbp->bio_error = bp->bio_error;
sys/geom/mirror/g_mirror.c
1024
g_mirror_regular_request_error(sc, disk, bp);
sys/geom/mirror/g_mirror.c
1035
g_destroy_bio(bp);
sys/geom/mirror/g_mirror.c
1092
g_mirror_sync_done(struct bio *bp)
sys/geom/mirror/g_mirror.c
1096
G_MIRROR_LOGREQ(3, bp, "Synchronization request delivered.");
sys/geom/mirror/g_mirror.c
1097
sc = bp->bio_from->geom->softc;
sys/geom/mirror/g_mirror.c
1098
bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC;
sys/geom/mirror/g_mirror.c
1100
TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue);
sys/geom/mirror/g_mirror.c
1106
g_mirror_candelete(struct bio *bp)
sys/geom/mirror/g_mirror.c
1112
sc = bp->bio_to->private;
sys/geom/mirror/g_mirror.c
1118
g_handleattr(bp, "GEOM::candelete", &val, sizeof(val));
sys/geom/mirror/g_mirror.c
1122
g_mirror_kernel_dump(struct bio *bp)
sys/geom/mirror/g_mirror.c
1136
sc = bp->bio_to->private;
sys/geom/mirror/g_mirror.c
1139
gkd = (struct g_kerneldump *)bp->bio_data;
sys/geom/mirror/g_mirror.c
1140
if (gkd->length > bp->bio_to->mediasize)
sys/geom/mirror/g_mirror.c
1141
gkd->length = bp->bio_to->mediasize;
sys/geom/mirror/g_mirror.c
1142
cbp = g_clone_bio(bp);
sys/geom/mirror/g_mirror.c
1144
g_io_deliver(bp, ENOMEM);
sys/geom/mirror/g_mirror.c
1154
g_mirror_rotation_rate(struct bio *bp)
sys/geom/mirror/g_mirror.c
1161
sc = bp->bio_to->private;
sys/geom/mirror/g_mirror.c
1171
g_handleattr(bp, "GEOM::rotation_rate", &rr, sizeof(rr));
sys/geom/mirror/g_mirror.c
1175
g_mirror_start(struct bio *bp)
sys/geom/mirror/g_mirror.c
1179
sc = bp->bio_to->private;
sys/geom/mirror/g_mirror.c
1186
bp->bio_to->error, bp->bio_to->name));
sys/geom/mirror/g_mirror.c
1187
G_MIRROR_LOGREQ(3, bp, "Request received.");
sys/geom/mirror/g_mirror.c
1189
switch (bp->bio_cmd) {
sys/geom/mirror/g_mirror.c
1197
if (!strcmp(bp->bio_attribute, "GEOM::candelete")) {
sys/geom/mirror/g_mirror.c
1198
g_mirror_candelete(bp);
sys/geom/mirror/g_mirror.c
1200
} else if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) {
sys/geom/mirror/g_mirror.c
1201
g_mirror_kernel_dump(bp);
sys/geom/mirror/g_mirror.c
1203
} else if (!strcmp(bp->bio_attribute, "GEOM::rotation_rate")) {
sys/geom/mirror/g_mirror.c
1204
g_mirror_rotation_rate(bp);
sys/geom/mirror/g_mirror.c
1209
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/mirror/g_mirror.c
121
struct bio *bp, off_t offset);
sys/geom/mirror/g_mirror.c
1213
if (bp->bio_to->error != 0) {
sys/geom/mirror/g_mirror.c
1215
g_io_deliver(bp, bp->bio_to->error);
sys/geom/mirror/g_mirror.c
1218
TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue);
sys/geom/mirror/g_mirror.c
1229
g_mirror_sync_collision(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1238
rstart = bp->bio_offset;
sys/geom/mirror/g_mirror.c
1239
rend = bp->bio_offset + bp->bio_length;
sys/geom/mirror/g_mirror.c
124
struct bio *bp);
sys/geom/mirror/g_mirror.c
1264
struct bio *bp;
sys/geom/mirror/g_mirror.c
1270
TAILQ_FOREACH(bp, &sc->sc_inflight, bio_queue) {
sys/geom/mirror/g_mirror.c
1271
rstart = bp->bio_offset;
sys/geom/mirror/g_mirror.c
1272
rend = bp->bio_offset + bp->bio_length;
sys/geom/mirror/g_mirror.c
1283
g_mirror_regular_delay(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1286
G_MIRROR_LOGREQ(2, bp, "Delaying request.");
sys/geom/mirror/g_mirror.c
1287
TAILQ_INSERT_TAIL(&sc->sc_regular_delayed, bp, bio_queue);
sys/geom/mirror/g_mirror.c
1294
g_mirror_sync_delay(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1297
G_MIRROR_LOGREQ(2, bp, "Delaying synchronization request.");
sys/geom/mirror/g_mirror.c
1298
TAILQ_INSERT_TAIL(&sc->sc_sync_delayed, bp, bio_queue);
sys/geom/mirror/g_mirror.c
1307
struct bio *bp;
sys/geom/mirror/g_mirror.c
1309
if ((bp = TAILQ_FIRST(&sc->sc_regular_delayed)) == NULL)
sys/geom/mirror/g_mirror.c
1311
if (g_mirror_sync_collision(sc, bp))
sys/geom/mirror/g_mirror.c
1328
struct bio *bp, *bp2;
sys/geom/mirror/g_mirror.c
1330
TAILQ_FOREACH_SAFE(bp, &sc->sc_sync_delayed, bio_queue, bp2) {
sys/geom/mirror/g_mirror.c
1331
if (g_mirror_regular_collision(sc, bp))
sys/geom/mirror/g_mirror.c
1333
TAILQ_REMOVE(&sc->sc_sync_delayed, bp, bio_queue);
sys/geom/mirror/g_mirror.c
1334
G_MIRROR_LOGREQ(2, bp,
sys/geom/mirror/g_mirror.c
1336
g_io_request(bp, bp->bio_from);
sys/geom/mirror/g_mirror.c
1344
g_mirror_sync_request_free(struct g_mirror_disk *disk, struct bio *bp)
sys/geom/mirror/g_mirror.c
1349
idx = (int)(uintptr_t)bp->bio_caller1;
sys/geom/mirror/g_mirror.c
1350
KASSERT(disk->d_sync.ds_bios[idx] == bp,
sys/geom/mirror/g_mirror.c
1354
free(bp->bio_data, M_MIRROR);
sys/geom/mirror/g_mirror.c
1355
g_destroy_bio(bp);
sys/geom/mirror/g_mirror.c
1367
g_mirror_sync_request(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1372
KASSERT((bp->bio_cmd == BIO_READ &&
sys/geom/mirror/g_mirror.c
1373
bp->bio_from->geom == sc->sc_sync.ds_geom) ||
sys/geom/mirror/g_mirror.c
1374
(bp->bio_cmd == BIO_WRITE && bp->bio_from->geom == sc->sc_geom),
sys/geom/mirror/g_mirror.c
1375
("Sync BIO %p with unexpected origin", bp));
sys/geom/mirror/g_mirror.c
1377
bp->bio_from->index--;
sys/geom/mirror/g_mirror.c
1378
disk = bp->bio_from->private;
sys/geom/mirror/g_mirror.c
1382
g_mirror_kill_consumer(sc, bp->bio_from);
sys/geom/mirror/g_mirror.c
1384
g_mirror_sync_request_free(NULL, bp);
sys/geom/mirror/g_mirror.c
1394
switch (bp->bio_cmd) {
sys/geom/mirror/g_mirror.c
1399
bp->bio_error);
sys/geom/mirror/g_mirror.c
1401
if (bp->bio_error != 0) {
sys/geom/mirror/g_mirror.c
1402
G_MIRROR_LOGREQ(0, bp,
sys/geom/mirror/g_mirror.c
1404
bp->bio_error);
sys/geom/mirror/g_mirror.c
1414
g_mirror_sync_request_free(disk, bp);
sys/geom/mirror/g_mirror.c
1420
G_MIRROR_LOGREQ(3, bp,
sys/geom/mirror/g_mirror.c
1422
bp->bio_cmd = BIO_WRITE;
sys/geom/mirror/g_mirror.c
1423
bp->bio_cflags = 0;
sys/geom/mirror/g_mirror.c
1429
g_io_request(bp, cp);
sys/geom/mirror/g_mirror.c
1437
bp->bio_error);
sys/geom/mirror/g_mirror.c
1439
if (bp->bio_error != 0) {
sys/geom/mirror/g_mirror.c
1440
G_MIRROR_LOGREQ(0, bp,
sys/geom/mirror/g_mirror.c
1442
bp->bio_error);
sys/geom/mirror/g_mirror.c
1443
g_mirror_sync_request_free(disk, bp);
sys/geom/mirror/g_mirror.c
1450
G_MIRROR_LOGREQ(3, bp, "Synchronization request finished.");
sys/geom/mirror/g_mirror.c
1456
g_mirror_sync_request_free(disk, bp);
sys/geom/mirror/g_mirror.c
1470
g_mirror_sync_reinit(disk, bp, sync->ds_offset);
sys/geom/mirror/g_mirror.c
1471
sync->ds_offset += bp->bio_length;
sys/geom/mirror/g_mirror.c
1473
G_MIRROR_LOGREQ(3, bp, "Sending synchronization request.");
sys/geom/mirror/g_mirror.c
1479
if (g_mirror_regular_collision(sc, bp))
sys/geom/mirror/g_mirror.c
1480
g_mirror_sync_delay(sc, bp);
sys/geom/mirror/g_mirror.c
1482
g_io_request(bp, sync->ds_consumer);
sys/geom/mirror/g_mirror.c
1490
bp = sync->ds_bios[i];
sys/geom/mirror/g_mirror.c
1491
if (bp != NULL && bp->bio_offset < offset)
sys/geom/mirror/g_mirror.c
1492
offset = bp->bio_offset;
sys/geom/mirror/g_mirror.c
1503
panic("Invalid I/O request %p", bp);
sys/geom/mirror/g_mirror.c
1508
g_mirror_request_prefer(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1519
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1520
bp->bio_error = ENXIO;
sys/geom/mirror/g_mirror.c
1521
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1524
cbp = g_clone_bio(bp);
sys/geom/mirror/g_mirror.c
1526
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1527
bp->bio_error = ENOMEM;
sys/geom/mirror/g_mirror.c
1528
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1546
g_mirror_request_round_robin(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1554
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1555
bp->bio_error = ENXIO;
sys/geom/mirror/g_mirror.c
1556
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1559
cbp = g_clone_bio(bp);
sys/geom/mirror/g_mirror.c
1561
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1562
bp->bio_error = ENOMEM;
sys/geom/mirror/g_mirror.c
1563
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1585
g_mirror_request_load(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1600
if (dp->d_last_offset == bp->bio_offset)
sys/geom/mirror/g_mirror.c
1604
if (ABS(dp->d_last_offset - bp->bio_offset) < TRACK_SIZE)
sys/geom/mirror/g_mirror.c
1612
cbp = g_clone_bio(bp);
sys/geom/mirror/g_mirror.c
1614
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1615
bp->bio_error = ENOMEM;
sys/geom/mirror/g_mirror.c
1616
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1631
disk->d_last_offset = bp->bio_offset + bp->bio_length;
sys/geom/mirror/g_mirror.c
1641
g_mirror_request_split(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1651
if (bp->bio_length <= sc->sc_slice) {
sys/geom/mirror/g_mirror.c
1652
g_mirror_request_round_robin(sc, bp);
sys/geom/mirror/g_mirror.c
1656
slice = bp->bio_length / ndisks;
sys/geom/mirror/g_mirror.c
1664
left = bp->bio_length;
sys/geom/mirror/g_mirror.c
1665
offset = bp->bio_offset;
sys/geom/mirror/g_mirror.c
1666
data = bp->bio_data;
sys/geom/mirror/g_mirror.c
1671
cbp = g_clone_bio(bp);
sys/geom/mirror/g_mirror.c
1677
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1678
bp->bio_error = ENOMEM;
sys/geom/mirror/g_mirror.c
1679
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1710
g_mirror_register_request(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
1724
if (bp->bio_from->geom != sc->sc_sync.ds_geom &&
sys/geom/mirror/g_mirror.c
1726
g_mirror_regular_delay(sc, bp);
sys/geom/mirror/g_mirror.c
1730
switch (bp->bio_cmd) {
sys/geom/mirror/g_mirror.c
1734
g_mirror_request_load(sc, bp);
sys/geom/mirror/g_mirror.c
1737
g_mirror_request_prefer(sc, bp);
sys/geom/mirror/g_mirror.c
1740
g_mirror_request_round_robin(sc, bp);
sys/geom/mirror/g_mirror.c
1743
g_mirror_request_split(sc, bp);
sys/geom/mirror/g_mirror.c
1753
if (g_mirror_sync_collision(sc, bp)) {
sys/geom/mirror/g_mirror.c
1754
g_mirror_regular_delay(sc, bp);
sys/geom/mirror/g_mirror.c
1781
if (bp->bio_offset >= disk->d_sync.ds_offset)
sys/geom/mirror/g_mirror.c
1787
if (bp->bio_cmd == BIO_DELETE &&
sys/geom/mirror/g_mirror.c
1790
cbp = g_clone_bio(bp);
sys/geom/mirror/g_mirror.c
1796
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1797
bp->bio_error = ENOMEM;
sys/geom/mirror/g_mirror.c
1798
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1811
KASSERT(bp->bio_cmd == BIO_DELETE,
sys/geom/mirror/g_mirror.c
1812
("No consumers for regular request %p", bp));
sys/geom/mirror/g_mirror.c
1813
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/mirror/g_mirror.c
1829
TAILQ_INSERT_TAIL(&sc->sc_inflight, bp, bio_queue);
sys/geom/mirror/g_mirror.c
1837
cbp = g_clone_bio(bp);
sys/geom/mirror/g_mirror.c
1843
if (bp->bio_error == 0)
sys/geom/mirror/g_mirror.c
1844
bp->bio_error = ENOMEM;
sys/geom/mirror/g_mirror.c
1845
g_io_deliver(bp, bp->bio_error);
sys/geom/mirror/g_mirror.c
1854
("No consumers for regular request %p", bp));
sys/geom/mirror/g_mirror.c
1870
bp->bio_cmd, sc->sc_name));
sys/geom/mirror/g_mirror.c
1941
struct bio *bp;
sys/geom/mirror/g_mirror.c
2009
bp = TAILQ_FIRST(&sc->sc_queue);
sys/geom/mirror/g_mirror.c
2010
if (bp != NULL)
sys/geom/mirror/g_mirror.c
2011
TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue);
sys/geom/mirror/g_mirror.c
2040
if (bp->bio_from->geom == sc->sc_sync.ds_geom &&
sys/geom/mirror/g_mirror.c
2041
(bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0) {
sys/geom/mirror/g_mirror.c
2046
g_mirror_sync_request(sc, bp);
sys/geom/mirror/g_mirror.c
2047
} else if (bp->bio_to != sc->sc_provider) {
sys/geom/mirror/g_mirror.c
2048
if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_REGULAR) != 0)
sys/geom/mirror/g_mirror.c
2052
g_mirror_regular_request(sc, bp);
sys/geom/mirror/g_mirror.c
2053
else if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0)
sys/geom/mirror/g_mirror.c
2058
g_mirror_sync_request(sc, bp);
sys/geom/mirror/g_mirror.c
2062
bp->bio_cflags, bp->bio_to->name));
sys/geom/mirror/g_mirror.c
2068
g_mirror_register_request(sc, bp);
sys/geom/mirror/g_mirror.c
2095
g_mirror_sync_reinit(const struct g_mirror_disk *disk, struct bio *bp,
sys/geom/mirror/g_mirror.c
2101
data = bp->bio_data;
sys/geom/mirror/g_mirror.c
2102
idx = (int)(uintptr_t)bp->bio_caller1;
sys/geom/mirror/g_mirror.c
2103
g_reset_bio(bp);
sys/geom/mirror/g_mirror.c
2105
bp->bio_cmd = BIO_READ;
sys/geom/mirror/g_mirror.c
2106
bp->bio_data = data;
sys/geom/mirror/g_mirror.c
2107
bp->bio_done = g_mirror_sync_done;
sys/geom/mirror/g_mirror.c
2108
bp->bio_from = disk->d_sync.ds_consumer;
sys/geom/mirror/g_mirror.c
2109
bp->bio_to = disk->d_softc->sc_provider;
sys/geom/mirror/g_mirror.c
2110
bp->bio_caller1 = (void *)(uintptr_t)idx;
sys/geom/mirror/g_mirror.c
2111
bp->bio_offset = offset;
sys/geom/mirror/g_mirror.c
2112
bp->bio_length = MIN(maxphys,
sys/geom/mirror/g_mirror.c
2113
disk->d_softc->sc_mediasize - bp->bio_offset);
sys/geom/mirror/g_mirror.c
2122
struct bio *bp;
sys/geom/mirror/g_mirror.c
2167
bp = g_alloc_bio();
sys/geom/mirror/g_mirror.c
2168
sync->ds_bios[i] = bp;
sys/geom/mirror/g_mirror.c
2170
bp->bio_data = malloc(maxphys, M_MIRROR, M_WAITOK);
sys/geom/mirror/g_mirror.c
2171
bp->bio_caller1 = (void *)(uintptr_t)i;
sys/geom/mirror/g_mirror.c
2172
g_mirror_sync_reinit(disk, bp, sync->ds_offset);
sys/geom/mirror/g_mirror.c
2173
sync->ds_offset += bp->bio_length;
sys/geom/mirror/g_mirror.c
2185
bp = sync->ds_bios[i];
sys/geom/mirror/g_mirror.c
2186
G_MIRROR_LOGREQ(3, bp, "Sending synchronization request.");
sys/geom/mirror/g_mirror.c
2191
if (g_mirror_regular_collision(sc, bp))
sys/geom/mirror/g_mirror.c
2192
g_mirror_sync_delay(sc, bp);
sys/geom/mirror/g_mirror.c
2194
g_io_request(bp, sync->ds_consumer);
sys/geom/mirror/g_mirror.c
2292
struct bio *bp;
sys/geom/mirror/g_mirror.c
2306
while ((bp = TAILQ_FIRST(&sc->sc_queue)) != NULL) {
sys/geom/mirror/g_mirror.c
2307
TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue);
sys/geom/mirror/g_mirror.c
2313
if (bp->bio_to == sc->sc_provider &&
sys/geom/mirror/g_mirror.c
2314
bp->bio_from->geom != sc->sc_sync.ds_geom) {
sys/geom/mirror/g_mirror.c
2315
g_io_deliver(bp, ENXIO);
sys/geom/mirror/g_mirror.c
2317
if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0)
sys/geom/mirror/g_mirror.c
2318
free(bp->bio_data, M_MIRROR);
sys/geom/mirror/g_mirror.c
2319
g_destroy_bio(bp);
sys/geom/mirror/g_mirror.c
320
struct bio *bp;
sys/geom/mirror/g_mirror.c
324
TAILQ_FOREACH(bp, &sc->sc_queue, bio_queue) {
sys/geom/mirror/g_mirror.c
325
if (bp->bio_from == cp)
sys/geom/mirror/g_mirror.c
914
g_mirror_done(struct bio *bp)
sys/geom/mirror/g_mirror.c
918
sc = bp->bio_from->geom->softc;
sys/geom/mirror/g_mirror.c
919
bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR;
sys/geom/mirror/g_mirror.c
921
TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue);
sys/geom/mirror/g_mirror.c
928
struct g_mirror_disk *disk, struct bio *bp)
sys/geom/mirror/g_mirror.c
931
if ((bp->bio_cmd == BIO_FLUSH || bp->bio_cmd == BIO_SPEEDUP) &&
sys/geom/mirror/g_mirror.c
932
bp->bio_error == EOPNOTSUPP)
sys/geom/mirror/g_mirror.c
937
G_MIRROR_LOGREQ(0, bp, "Request failed (error=%d).",
sys/geom/mirror/g_mirror.c
938
bp->bio_error);
sys/geom/mirror/g_mirror.c
940
G_MIRROR_LOGREQ(1, bp, "Request failed (error=%d).",
sys/geom/mirror/g_mirror.c
941
bp->bio_error);
sys/geom/mirror/g_mirror.c
945
if (bp->bio_error == ENXIO &&
sys/geom/mirror/g_mirror.c
946
bp->bio_cmd == BIO_READ)
sys/geom/mirror/g_mirror.c
948
else if (bp->bio_error == ENXIO)
sys/geom/mirror/g_mirror.c
958
g_mirror_regular_request(struct g_mirror_softc *sc, struct bio *bp)
sys/geom/mirror/g_mirror.c
964
KASSERT(sc->sc_provider == bp->bio_parent->bio_to,
sys/geom/mirror/g_mirror.c
965
("regular request %p with unexpected origin", bp));
sys/geom/mirror/g_mirror.c
967
pbp = bp->bio_parent;
sys/geom/mirror/g_mirror.c
968
bp->bio_from->index--;
sys/geom/mirror/g_mirror.c
969
if (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_DELETE)
sys/geom/mirror/g_mirror.c
971
disk = bp->bio_from->private;
sys/geom/mirror/g_mirror.c
974
g_mirror_kill_consumer(sc, bp->bio_from);
sys/geom/mirror/g_mirror.c
978
switch (bp->bio_cmd) {
sys/geom/mirror/g_mirror.c
981
bp->bio_error);
sys/geom/mirror/g_mirror.c
985
bp->bio_error);
sys/geom/mirror/g_mirror.c
989
bp->bio_error);
sys/geom/mirror/g_mirror.c
993
bp->bio_error);
sys/geom/mirror/g_mirror.c
997
bp->bio_error);
sys/geom/mirror/g_mirror.h
89
#define G_MIRROR_LOGREQ(lvl, bp, ...) \
sys/geom/mirror/g_mirror.h
90
_GEOM_DEBUG("GEOM_MIRROR", g_mirror_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/mountver/g_mountver.c
103
cp = bp->bio_from;
sys/geom/mountver/g_mountver.c
105
if (bp->bio_error != ENXIO) {
sys/geom/mountver/g_mountver.c
106
g_std_done(bp);
sys/geom/mountver/g_mountver.c
116
pbp = bp->bio_parent;
sys/geom/mountver/g_mountver.c
119
g_destroy_bio(bp);
sys/geom/mountver/g_mountver.c
136
g_mountver_send(struct g_geom *gp, struct bio *bp)
sys/geom/mountver/g_mountver.c
143
cbp = g_clone_bio(bp);
sys/geom/mountver/g_mountver.c
146
g_io_deliver(bp, ENOMEM);
sys/geom/mountver/g_mountver.c
158
g_mountver_queue(struct bio *bp)
sys/geom/mountver/g_mountver.c
163
gp = bp->bio_to->geom;
sys/geom/mountver/g_mountver.c
167
TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue);
sys/geom/mountver/g_mountver.c
175
struct bio *bp;
sys/geom/mountver/g_mountver.c
180
while ((bp = TAILQ_FIRST(&sc->sc_queue)) != NULL && !sc->sc_orphaned) {
sys/geom/mountver/g_mountver.c
181
TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue);
sys/geom/mountver/g_mountver.c
182
G_MOUNTVER_LOGREQ(bp, "Sending queued request.");
sys/geom/mountver/g_mountver.c
184
g_mountver_send(gp, bp);
sys/geom/mountver/g_mountver.c
194
struct bio *bp;
sys/geom/mountver/g_mountver.c
199
while ((bp = TAILQ_FIRST(&sc->sc_queue)) != NULL) {
sys/geom/mountver/g_mountver.c
200
TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue);
sys/geom/mountver/g_mountver.c
202
G_MOUNTVER_LOGREQ(bp, "Discarding queued request.");
sys/geom/mountver/g_mountver.c
203
g_io_deliver(bp, ENXIO);
sys/geom/mountver/g_mountver.c
210
g_mountver_start(struct bio *bp)
sys/geom/mountver/g_mountver.c
215
gp = bp->bio_to->geom;
sys/geom/mountver/g_mountver.c
217
G_MOUNTVER_LOGREQ(bp, "Request received.");
sys/geom/mountver/g_mountver.c
228
G_MOUNTVER_LOGREQ(bp, "Discarding request due to shutdown.");
sys/geom/mountver/g_mountver.c
229
g_io_deliver(bp, ENXIO);
sys/geom/mountver/g_mountver.c
232
G_MOUNTVER_LOGREQ(bp, "Queueing request.");
sys/geom/mountver/g_mountver.c
233
g_mountver_queue(bp);
sys/geom/mountver/g_mountver.c
237
G_MOUNTVER_LOGREQ(bp, "Sending request.");
sys/geom/mountver/g_mountver.c
239
g_mountver_send(gp, bp);
sys/geom/mountver/g_mountver.c
60
static void g_mountver_queue(struct bio *bp);
sys/geom/mountver/g_mountver.c
96
g_mountver_done(struct bio *bp)
sys/geom/mountver/g_mountver.h
41
#define G_MOUNTVER_LOGREQ(bp, ...) \
sys/geom/mountver/g_mountver.h
42
_GEOM_DEBUG("GEOM_MOUNTVER", g_mountver_debug, 2, (bp), __VA_ARGS__)
sys/geom/multipath/g_multipath.c
181
g_multipath_choose(struct g_geom *gp, struct bio *bp)
sys/geom/multipath/g_multipath.c
188
(sc->sc_active_active == 2 && bp->bio_cmd != BIO_READ))
sys/geom/multipath/g_multipath.c
338
g_multipath_start(struct bio *bp)
sys/geom/multipath/g_multipath.c
346
gp = bp->bio_to->geom;
sys/geom/multipath/g_multipath.c
349
cbp = g_clone_bio(bp);
sys/geom/multipath/g_multipath.c
351
g_io_deliver(bp, ENOMEM);
sys/geom/multipath/g_multipath.c
355
cp = g_multipath_choose(gp, bp);
sys/geom/multipath/g_multipath.c
359
g_io_deliver(bp, ENXIO);
sys/geom/multipath/g_multipath.c
362
if ((uintptr_t)bp->bio_driver1 < sc->sc_ndisks)
sys/geom/multipath/g_multipath.c
363
bp->bio_driver1 = (void *)(uintptr_t)sc->sc_ndisks;
sys/geom/multipath/g_multipath.c
372
g_multipath_done(struct bio *bp)
sys/geom/multipath/g_multipath.c
378
if (bp->bio_error == ENXIO || bp->bio_error == EIO) {
sys/geom/multipath/g_multipath.c
380
bioq_insert_tail(&gmtbq, bp);
sys/geom/multipath/g_multipath.c
384
cp = bp->bio_from;
sys/geom/multipath/g_multipath.c
395
if (bp->bio_error == 0 &&
sys/geom/multipath/g_multipath.c
396
bp->bio_cmd == BIO_GETATTR &&
sys/geom/multipath/g_multipath.c
397
!strcmp(bp->bio_attribute, "GEOM::physpath"))
sys/geom/multipath/g_multipath.c
399
strlcat(bp->bio_data, "/mp", bp->bio_length);
sys/geom/multipath/g_multipath.c
401
g_std_done(bp);
sys/geom/multipath/g_multipath.c
406
g_multipath_done_error(struct bio *bp)
sys/geom/multipath/g_multipath.c
423
pbp = bp->bio_parent;
sys/geom/multipath/g_multipath.c
426
cp = bp->bio_from;
sys/geom/multipath/g_multipath.c
433
bp->bio_error, pp->name, sc->sc_name);
sys/geom/multipath/g_multipath.c
435
sc->sc_name, pp->name, bp->bio_error);
sys/geom/multipath/g_multipath.c
451
SDT_PROBE2(geom, multipath, io, restart, bp, pbp);
sys/geom/multipath/g_multipath.c
452
g_destroy_bio(bp);
sys/geom/multipath/g_multipath.c
455
g_std_done(bp);
sys/geom/multipath/g_multipath.c
467
struct bio *bp;
sys/geom/multipath/g_multipath.c
469
bp = bioq_takefirst(&gmtbq);
sys/geom/multipath/g_multipath.c
470
if (bp == NULL)
sys/geom/multipath/g_multipath.c
473
g_multipath_done_error(bp);
sys/geom/nop/g_nop.c
137
g_nop_kerneldump(struct bio *bp, struct g_nop_softc *sc)
sys/geom/nop/g_nop.c
143
gkd = (struct g_kerneldump *)bp->bio_data;
sys/geom/nop/g_nop.c
144
gp = bp->bio_to->geom;
sys/geom/nop/g_nop.c
156
g_io_deliver(bp, ENODEV);
sys/geom/nop/g_nop.c
162
g_io_deliver(bp, 0);
sys/geom/nop/g_nop.c
195
g_nop_start(struct bio *bp)
sys/geom/nop/g_nop.c
205
gp = bp->bio_to->geom;
sys/geom/nop/g_nop.c
208
G_NOP_LOGREQ(bp, "Request received.");
sys/geom/nop/g_nop.c
210
switch (bp->bio_cmd) {
sys/geom/nop/g_nop.c
213
sc->sc_readbytes += bp->bio_length;
sys/geom/nop/g_nop.c
224
sc->sc_wrotebytes += bp->bio_length;
sys/geom/nop/g_nop.c
239
g_handleattr_str(bp, "GEOM::physpath", sc->sc_physpath))
sys/geom/nop/g_nop.c
241
else if (strcmp(bp->bio_attribute, "GEOM::kerneldump") == 0)
sys/geom/nop/g_nop.c
242
g_nop_kerneldump(bp, sc);
sys/geom/nop/g_nop.c
274
G_NOP_LOGREQLVL(1, bp, "Returning error=%d.", sc->sc_error);
sys/geom/nop/g_nop.c
275
g_io_deliver(bp, sc->sc_error);
sys/geom/nop/g_nop.c
280
cbp = g_clone_bio(bp);
sys/geom/nop/g_nop.c
282
g_io_deliver(bp, ENOMEM);
sys/geom/nop/g_nop.c
286
cbp->bio_offset = bp->bio_offset + sc->sc_offset;
sys/geom/nop/g_nop.h
44
#define G_NOP_LOGREQLVL(lvl, bp, ...) \
sys/geom/nop/g_nop.h
45
_GEOM_DEBUG("GEOM_NOP", g_nop_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/nop/g_nop.h
46
#define G_NOP_LOGREQ(bp, ...) G_NOP_LOGREQLVL(2, bp, __VA_ARGS__)
sys/geom/part/g_part.c
2219
g_part_start(struct bio *bp)
sys/geom/part/g_part.c
2231
biotrack(bp, __func__);
sys/geom/part/g_part.c
2233
pp = bp->bio_to;
sys/geom/part/g_part.c
2238
G_PART_TRACE((G_T_BIO, "%s: cmd=%d, provider=%s", __func__, bp->bio_cmd,
sys/geom/part/g_part.c
2243
g_io_deliver(bp, ENXIO);
sys/geom/part/g_part.c
2247
switch(bp->bio_cmd) {
sys/geom/part/g_part.c
2251
if (bp->bio_offset >= pp->mediasize) {
sys/geom/part/g_part.c
2252
g_io_deliver(bp, EIO);
sys/geom/part/g_part.c
2255
bp2 = g_clone_bio(bp);
sys/geom/part/g_part.c
2257
g_io_deliver(bp, ENOMEM);
sys/geom/part/g_part.c
2270
if (g_handleattr_int(bp, "GEOM::fwheads", table->gpt_heads))
sys/geom/part/g_part.c
2272
if (g_handleattr_int(bp, "GEOM::fwsectors", table->gpt_sectors))
sys/geom/part/g_part.c
2278
if (g_handleattr_int(bp, "PART::isleaf",
sys/geom/part/g_part.c
2282
if (g_handleattr_int(bp, "PART::depth", table->gpt_depth))
sys/geom/part/g_part.c
2284
if (g_handleattr_str(bp, "PART::scheme",
sys/geom/part/g_part.c
2287
if (g_handleattr_str(bp, "PART::type",
sys/geom/part/g_part.c
2290
if (!strcmp("GEOM::physpath", bp->bio_attribute)) {
sys/geom/part/g_part.c
2294
if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) {
sys/geom/part/g_part.c
2301
if ((bp->bio_from == NULL ||
sys/geom/part/g_part.c
2302
bp->bio_from->geom->class != &g_part_class) &&
sys/geom/part/g_part.c
2304
g_io_deliver(bp, ENODEV);
sys/geom/part/g_part.c
2310
gkd = (struct g_kerneldump *)bp->bio_data;
sys/geom/part/g_part.c
2312
g_io_deliver(bp, EIO);
sys/geom/part/g_part.c
2321
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/part/g_part.c
2325
bp2 = g_clone_bio(bp);
sys/geom/part/g_part.c
2327
g_io_deliver(bp, ENOMEM);
sys/geom/part/g_part.c
293
g_part_get_physpath_done(struct bio *bp)
sys/geom/part/g_part.c
301
pbp = bp->bio_parent;
sys/geom/part/g_part.c
307
if (bp->bio_error == 0) {
sys/geom/part/g_part.c
310
len = strlcat(bp->bio_data, "/", bp->bio_length);
sys/geom/part/g_part.c
311
if (len < bp->bio_length) {
sys/geom/part/g_part.c
312
end = bp->bio_data + len;
sys/geom/part/g_part.c
313
remainder = bp->bio_length - len;
sys/geom/part/g_part.c
317
g_std_done(bp);
sys/geom/part/g_part_gpt.c
1215
unsigned char *buf, *bp;
sys/geom/part/g_part_gpt.c
1258
bp = buf + pp->sectorsize + table->hdr->hdr_entsz * index;
sys/geom/part/g_part_gpt.c
1259
le_uuid_enc(bp, &entry->ent.ent_type);
sys/geom/part/g_part_gpt.c
1260
le_uuid_enc(bp + 16, &entry->ent.ent_uuid);
sys/geom/part/g_part_gpt.c
1261
le64enc(bp + 32, entry->ent.ent_lba_start);
sys/geom/part/g_part_gpt.c
1262
le64enc(bp + 40, entry->ent.ent_lba_end);
sys/geom/part/g_part_gpt.c
1263
le64enc(bp + 48, entry->ent.ent_attr);
sys/geom/part/g_part_gpt.c
1264
memcpy(bp + 56, entry->ent.ent_name,
sys/geom/raid/g_raid.c
1000
bp->bio_flags |= BIO_DONE;
sys/geom/raid/g_raid.c
1009
struct bio bp;
sys/geom/raid/g_raid.c
1014
g_reset_bio(&bp);
sys/geom/raid/g_raid.c
1015
bp.bio_cmd = BIO_WRITE;
sys/geom/raid/g_raid.c
1016
bp.bio_done = g_raid_tr_kerneldump_common_done;
sys/geom/raid/g_raid.c
1017
bp.bio_attribute = NULL;
sys/geom/raid/g_raid.c
1018
bp.bio_offset = offset;
sys/geom/raid/g_raid.c
1019
bp.bio_length = length;
sys/geom/raid/g_raid.c
1020
bp.bio_data = virtual;
sys/geom/raid/g_raid.c
1021
bp.bio_to = vol->v_provider;
sys/geom/raid/g_raid.c
1023
g_raid_start(&bp);
sys/geom/raid/g_raid.c
1024
while (!(bp.bio_flags & BIO_DONE)) {
sys/geom/raid/g_raid.c
1030
return (bp.bio_error != 0 ? EIO : 0);
sys/geom/raid/g_raid.c
1048
g_raid_kerneldump(struct g_raid_softc *sc, struct bio *bp)
sys/geom/raid/g_raid.c
1054
gkd = (struct g_kerneldump*)bp->bio_data;
sys/geom/raid/g_raid.c
1055
pp = bp->bio_to;
sys/geom/raid/g_raid.c
1067
g_io_deliver(bp, 0);
sys/geom/raid/g_raid.c
1071
g_raid_candelete(struct g_raid_softc *sc, struct bio *bp)
sys/geom/raid/g_raid.c
1078
pp = bp->bio_to;
sys/geom/raid/g_raid.c
1088
g_handleattr(bp, "GEOM::candelete", &val, sizeof(val));
sys/geom/raid/g_raid.c
1092
g_raid_start(struct bio *bp)
sys/geom/raid/g_raid.c
1096
sc = bp->bio_to->geom->softc;
sys/geom/raid/g_raid.c
1104
G_RAID_LOGREQ(3, bp, "Request received.");
sys/geom/raid/g_raid.c
1106
switch (bp->bio_cmd) {
sys/geom/raid/g_raid.c
1114
if (!strcmp(bp->bio_attribute, "GEOM::candelete"))
sys/geom/raid/g_raid.c
1115
g_raid_candelete(sc, bp);
sys/geom/raid/g_raid.c
1116
else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump"))
sys/geom/raid/g_raid.c
1117
g_raid_kerneldump(sc, bp);
sys/geom/raid/g_raid.c
1119
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/raid/g_raid.c
1122
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/raid/g_raid.c
1126
bioq_insert_tail(&sc->sc_queue, bp);
sys/geom/raid/g_raid.c
1135
g_raid_bio_overlaps(const struct bio *bp, off_t lstart, off_t len)
sys/geom/raid/g_raid.c
1153
off_t bstart = bp->bio_offset;
sys/geom/raid/g_raid.c
1154
off_t bend = bp->bio_offset + bp->bio_length - 1;
sys/geom/raid/g_raid.c
1164
g_raid_is_in_locked_range(struct g_raid_volume *vol, const struct bio *bp)
sys/geom/raid/g_raid.c
1171
if (g_raid_bio_overlaps(bp, lp->l_offset, lp->l_length))
sys/geom/raid/g_raid.c
1178
g_raid_start_request(struct bio *bp)
sys/geom/raid/g_raid.c
1183
sc = bp->bio_to->geom->softc;
sys/geom/raid/g_raid.c
1185
vol = bp->bio_to->private;
sys/geom/raid/g_raid.c
1194
if (!(bp->bio_cflags & G_RAID_BIO_FLAG_SPECIAL) &&
sys/geom/raid/g_raid.c
1195
g_raid_is_in_locked_range(vol, bp)) {
sys/geom/raid/g_raid.c
1196
G_RAID_LOGREQ(3, bp, "Defer request.");
sys/geom/raid/g_raid.c
1197
bioq_insert_tail(&vol->v_locked, bp);
sys/geom/raid/g_raid.c
1205
if (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_DELETE) {
sys/geom/raid/g_raid.c
1216
bioq_insert_tail(&vol->v_inflight, bp);
sys/geom/raid/g_raid.c
1217
G_RAID_LOGREQ(4, bp, "Request started");
sys/geom/raid/g_raid.c
1218
G_RAID_TR_IOSTART(vol->v_tr, bp);
sys/geom/raid/g_raid.c
1222
g_raid_finish_with_locked_ranges(struct g_raid_volume *vol, struct bio *bp)
sys/geom/raid/g_raid.c
1255
g_raid_iodone(struct bio *bp, int error)
sys/geom/raid/g_raid.c
1260
sc = bp->bio_to->geom->softc;
sys/geom/raid/g_raid.c
1262
vol = bp->bio_to->private;
sys/geom/raid/g_raid.c
1263
G_RAID_LOGREQ(3, bp, "Request done: %d.", error);
sys/geom/raid/g_raid.c
1266
if (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_DELETE) {
sys/geom/raid/g_raid.c
1271
bioq_remove(&vol->v_inflight, bp);
sys/geom/raid/g_raid.c
1272
if (vol->v_pending_lock && g_raid_is_in_locked_range(vol, bp))
sys/geom/raid/g_raid.c
1273
g_raid_finish_with_locked_ranges(vol, bp);
sys/geom/raid/g_raid.c
1275
g_io_deliver(bp, error);
sys/geom/raid/g_raid.c
1284
struct bio *bp;
sys/geom/raid/g_raid.c
1294
TAILQ_FOREACH(bp, &vol->v_inflight.queue, bio_queue) {
sys/geom/raid/g_raid.c
1295
if (bp != ignore && g_raid_bio_overlaps(bp, off, len))
sys/geom/raid/g_raid.c
132
static void g_raid_start(struct bio *bp);
sys/geom/raid/g_raid.c
1320
struct bio *bp;
sys/geom/raid/g_raid.c
133
static void g_raid_start_request(struct bio *bp);
sys/geom/raid/g_raid.c
1337
while ((bp = bioq_takefirst(&vol->v_locked)) != NULL)
sys/geom/raid/g_raid.c
1338
bioq_insert_tail(&sc->sc_queue, bp);
sys/geom/raid/g_raid.c
134
static void g_raid_disk_done(struct bio *bp);
sys/geom/raid/g_raid.c
1348
g_raid_subdisk_iostart(struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/g_raid.c
1353
bp->bio_caller1 = sd;
sys/geom/raid/g_raid.c
1361
G_RAID_LOGREQ(0, bp, "Warning! I/O request to an absent disk!");
sys/geom/raid/g_raid.c
1363
bp->bio_from = NULL;
sys/geom/raid/g_raid.c
1364
bp->bio_to = NULL;
sys/geom/raid/g_raid.c
1365
bp->bio_error = ENXIO;
sys/geom/raid/g_raid.c
1366
g_raid_disk_done(bp);
sys/geom/raid/g_raid.c
1372
G_RAID_LOGREQ(0, bp, "Warning! I/O request to a disk in a "
sys/geom/raid/g_raid.c
1378
bp->bio_from = cp;
sys/geom/raid/g_raid.c
1379
bp->bio_to = cp->provider;
sys/geom/raid/g_raid.c
1391
disk->d_last_offset = bp->bio_offset + bp->bio_length;
sys/geom/raid/g_raid.c
1393
G_RAID_LOGREQ(3, bp, "Sending dumping request.");
sys/geom/raid/g_raid.c
1394
if (bp->bio_cmd == BIO_WRITE) {
sys/geom/raid/g_raid.c
1395
bp->bio_error = g_raid_subdisk_kerneldump(sd,
sys/geom/raid/g_raid.c
1396
bp->bio_data, bp->bio_offset, bp->bio_length);
sys/geom/raid/g_raid.c
1398
bp->bio_error = EOPNOTSUPP;
sys/geom/raid/g_raid.c
1399
g_raid_disk_done(bp);
sys/geom/raid/g_raid.c
1401
bp->bio_done = g_raid_disk_done;
sys/geom/raid/g_raid.c
1402
bp->bio_offset += sd->sd_offset;
sys/geom/raid/g_raid.c
1403
G_RAID_LOGREQ(3, bp, "Sending request.");
sys/geom/raid/g_raid.c
1404
g_io_request(bp, cp);
sys/geom/raid/g_raid.c
1422
g_raid_disk_done(struct bio *bp)
sys/geom/raid/g_raid.c
1427
sd = bp->bio_caller1;
sys/geom/raid/g_raid.c
1430
bioq_insert_tail(&sc->sc_queue, bp);
sys/geom/raid/g_raid.c
1437
g_raid_disk_done_request(struct bio *bp)
sys/geom/raid/g_raid.c
1446
G_RAID_LOGREQ(3, bp, "Disk request done: %d.", bp->bio_error);
sys/geom/raid/g_raid.c
1447
sd = bp->bio_caller1;
sys/geom/raid/g_raid.c
1450
if (bp->bio_from != NULL) {
sys/geom/raid/g_raid.c
1451
bp->bio_from->index--;
sys/geom/raid/g_raid.c
1452
disk = bp->bio_from->private;
sys/geom/raid/g_raid.c
1454
g_raid_kill_consumer(sc, bp->bio_from);
sys/geom/raid/g_raid.c
1456
bp->bio_offset -= sd->sd_offset;
sys/geom/raid/g_raid.c
1458
G_RAID_TR_IODONE(vol->v_tr, sd, bp);
sys/geom/raid/g_raid.c
1495
struct bio *bp;
sys/geom/raid/g_raid.c
1511
bp = NULL;
sys/geom/raid/g_raid.c
1517
else if ((bp = bioq_takefirst(&sc->sc_queue)) != NULL)
sys/geom/raid/g_raid.c
1553
} else if (bp != NULL) {
sys/geom/raid/g_raid.c
1554
if (bp->bio_to != NULL &&
sys/geom/raid/g_raid.c
1555
bp->bio_to->geom == sc->sc_geom)
sys/geom/raid/g_raid.c
1556
g_raid_start_request(bp);
sys/geom/raid/g_raid.c
1558
g_raid_disk_done_request(bp);
sys/geom/raid/g_raid.c
1584
struct bio *bp;
sys/geom/raid/g_raid.c
1599
bp = bioq_takefirst(&sc->sc_queue);
sys/geom/raid/g_raid.c
1600
if (bp != NULL) {
sys/geom/raid/g_raid.c
1602
if (bp->bio_from == NULL ||
sys/geom/raid/g_raid.c
1603
bp->bio_from->geom != sc->sc_geom)
sys/geom/raid/g_raid.c
1604
g_raid_start_request(bp);
sys/geom/raid/g_raid.c
1606
g_raid_disk_done_request(bp);
sys/geom/raid/g_raid.c
1684
struct bio *bp, *tmp;
sys/geom/raid/g_raid.c
1694
TAILQ_FOREACH_SAFE(bp, &sc->sc_queue.queue, bio_queue, tmp) {
sys/geom/raid/g_raid.c
1695
if (bp->bio_to != pp)
sys/geom/raid/g_raid.c
1697
bioq_remove(&sc->sc_queue, bp);
sys/geom/raid/g_raid.c
1698
g_io_deliver(bp, ENXIO);
sys/geom/raid/g_raid.c
798
struct bio *bp;
sys/geom/raid/g_raid.c
802
TAILQ_FOREACH(bp, &sc->sc_queue.queue, bio_queue) {
sys/geom/raid/g_raid.c
803
if (bp->bio_from == cp)
sys/geom/raid/g_raid.c
956
g_raid_tr_flush_common(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/g_raid.c
976
cbp = g_clone_bio(bp);
sys/geom/raid/g_raid.c
991
if (bp->bio_error == 0)
sys/geom/raid/g_raid.c
992
bp->bio_error = ENOMEM;
sys/geom/raid/g_raid.c
993
g_raid_iodone(bp, bp->bio_error);
sys/geom/raid/g_raid.c
997
g_raid_tr_kerneldump_common_done(struct bio *bp)
sys/geom/raid/g_raid.h
405
void g_raid_iodone(struct bio *bp, int error);
sys/geom/raid/g_raid.h
406
void g_raid_subdisk_iostart(struct g_raid_subdisk *sd, struct bio *bp);
sys/geom/raid/g_raid.h
424
void g_raid_tr_flush_common(struct g_raid_tr_object *tr, struct bio *bp);
sys/geom/raid/g_raid.h
67
#define G_RAID_LOGREQ(lvl, bp, ...) \
sys/geom/raid/g_raid.h
68
_GEOM_DEBUG("GEOM_RAID", g_raid_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/raid/tr_concat.c
207
g_raid_tr_iostart_concat(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_concat.c
220
g_raid_iodone(bp, EIO);
sys/geom/raid/tr_concat.c
223
if (bp->bio_cmd == BIO_FLUSH || bp->bio_cmd == BIO_SPEEDUP) {
sys/geom/raid/tr_concat.c
224
g_raid_tr_flush_common(tr, bp);
sys/geom/raid/tr_concat.c
228
offset = bp->bio_offset;
sys/geom/raid/tr_concat.c
229
remain = bp->bio_length;
sys/geom/raid/tr_concat.c
230
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/raid/tr_concat.c
233
addr = bp->bio_data;
sys/geom/raid/tr_concat.c
241
g_raid_iodone(bp, EIO);
sys/geom/raid/tr_concat.c
248
cbp = g_clone_bio(bp);
sys/geom/raid/tr_concat.c
253
if ((bp->bio_flags & BIO_UNMAPPED) != 0 &&
sys/geom/raid/tr_concat.c
254
bp->bio_cmd != BIO_DELETE) {
sys/geom/raid/tr_concat.c
265
if (bp->bio_cmd != BIO_DELETE)
sys/geom/raid/tr_concat.c
270
bp->bio_completed = bp->bio_length - remain;
sys/geom/raid/tr_concat.c
280
if (bp->bio_error == 0)
sys/geom/raid/tr_concat.c
281
bp->bio_error = ENOMEM;
sys/geom/raid/tr_concat.c
282
g_raid_iodone(bp, bp->bio_error);
sys/geom/raid/tr_concat.c
329
struct g_raid_subdisk *sd,struct bio *bp)
sys/geom/raid/tr_concat.c
333
pbp = bp->bio_parent;
sys/geom/raid/tr_concat.c
335
pbp->bio_error = bp->bio_error;
sys/geom/raid/tr_concat.c
336
g_destroy_bio(bp);
sys/geom/raid/tr_raid0.c
188
g_raid_tr_iostart_raid0(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid0.c
201
g_raid_iodone(bp, EIO);
sys/geom/raid/tr_raid0.c
204
if (bp->bio_cmd == BIO_FLUSH || bp->bio_cmd == BIO_SPEEDUP) {
sys/geom/raid/tr_raid0.c
205
g_raid_tr_flush_common(tr, bp);
sys/geom/raid/tr_raid0.c
208
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/raid/tr_raid0.c
211
addr = bp->bio_data;
sys/geom/raid/tr_raid0.c
215
nstripe = bp->bio_offset / strip_size;
sys/geom/raid/tr_raid0.c
217
start = bp->bio_offset % strip_size;
sys/geom/raid/tr_raid0.c
223
remain = bp->bio_length;
sys/geom/raid/tr_raid0.c
228
cbp = g_clone_bio(bp);
sys/geom/raid/tr_raid0.c
233
if ((bp->bio_flags & BIO_UNMAPPED) != 0 &&
sys/geom/raid/tr_raid0.c
234
bp->bio_cmd != BIO_DELETE) {
sys/geom/raid/tr_raid0.c
249
if (bp->bio_cmd != BIO_DELETE)
sys/geom/raid/tr_raid0.c
262
if (bp->bio_error == 0)
sys/geom/raid/tr_raid0.c
263
bp->bio_error = ENOMEM;
sys/geom/raid/tr_raid0.c
264
g_raid_iodone(bp, bp->bio_error);
sys/geom/raid/tr_raid0.c
313
struct g_raid_subdisk *sd,struct bio *bp)
sys/geom/raid/tr_raid0.c
317
pbp = bp->bio_parent;
sys/geom/raid/tr_raid0.c
319
pbp->bio_error = bp->bio_error;
sys/geom/raid/tr_raid0.c
320
g_destroy_bio(bp);
sys/geom/raid/tr_raid1.c
243
struct bio *bp;
sys/geom/raid/tr_raid1.c
254
bp = &trs->trso_bio;
sys/geom/raid/tr_raid1.c
255
memset(bp, 0, sizeof(*bp));
sys/geom/raid/tr_raid1.c
256
bp->bio_offset = sd->sd_rebuild_pos;
sys/geom/raid/tr_raid1.c
257
bp->bio_length = MIN(g_raid1_rebuild_slab,
sys/geom/raid/tr_raid1.c
259
bp->bio_data = trs->trso_buffer;
sys/geom/raid/tr_raid1.c
260
bp->bio_cmd = BIO_READ;
sys/geom/raid/tr_raid1.c
261
bp->bio_cflags = G_RAID_BIO_FLAG_SYNC;
sys/geom/raid/tr_raid1.c
262
bp->bio_caller1 = good_sd;
sys/geom/raid/tr_raid1.c
266
bp->bio_offset, bp->bio_length, NULL, bp);
sys/geom/raid/tr_raid1.c
486
g_raid_tr_raid1_select_read_disk(struct g_raid_volume *vol, struct bio *bp,
sys/geom/raid/tr_raid1.c
499
bp->bio_offset + bp->bio_length > sd->sd_rebuild_pos))
sys/geom/raid/tr_raid1.c
507
if (G_RAID_SUBDISK_POS(sd) == bp->bio_offset)
sys/geom/raid/tr_raid1.c
511
if (ABS(G_RAID_SUBDISK_POS(sd) - bp->bio_offset) <
sys/geom/raid/tr_raid1.c
523
g_raid_tr_iostart_raid1_read(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid1.c
528
sd = g_raid_tr_raid1_select_read_disk(tr->tro_volume, bp, 0);
sys/geom/raid/tr_raid1.c
532
cbp = g_clone_bio(bp);
sys/geom/raid/tr_raid1.c
534
g_raid_iodone(bp, ENOMEM);
sys/geom/raid/tr_raid1.c
542
g_raid_tr_iostart_raid1_write(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid1.c
568
if (bp->bio_offset >= sd->sd_rebuild_pos)
sys/geom/raid/tr_raid1.c
583
cbp = g_clone_bio(bp);
sys/geom/raid/tr_raid1.c
598
if (bp->bio_error == 0)
sys/geom/raid/tr_raid1.c
599
bp->bio_error = ENOMEM;
sys/geom/raid/tr_raid1.c
600
g_raid_iodone(bp, bp->bio_error);
sys/geom/raid/tr_raid1.c
604
g_raid_tr_iostart_raid1(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid1.c
614
g_raid_iodone(bp, EIO);
sys/geom/raid/tr_raid1.c
624
!(bp->bio_cflags & G_RAID_BIO_FLAG_SPECIAL)) {
sys/geom/raid/tr_raid1.c
632
switch (bp->bio_cmd) {
sys/geom/raid/tr_raid1.c
634
g_raid_tr_iostart_raid1_read(tr, bp);
sys/geom/raid/tr_raid1.c
638
g_raid_tr_iostart_raid1_write(tr, bp);
sys/geom/raid/tr_raid1.c
642
g_raid_tr_flush_common(tr, bp);
sys/geom/raid/tr_raid1.c
646
bp->bio_cmd, vol->v_name));
sys/geom/raid/tr_raid1.c
653
struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/tr_raid1.c
665
if (bp->bio_cflags & G_RAID_BIO_FLAG_SYNC) {
sys/geom/raid/tr_raid1.c
681
if (bp->bio_cmd == BIO_READ) {
sys/geom/raid/tr_raid1.c
690
if (bp->bio_error != 0) {
sys/geom/raid/tr_raid1.c
691
G_RAID_LOGREQ(0, bp,
sys/geom/raid/tr_raid1.c
694
bp->bio_error);
sys/geom/raid/tr_raid1.c
702
G_RAID_LOGREQ(4, bp, "rebuild read done. %d",
sys/geom/raid/tr_raid1.c
703
bp->bio_error);
sys/geom/raid/tr_raid1.c
704
bp->bio_cmd = BIO_WRITE;
sys/geom/raid/tr_raid1.c
705
bp->bio_cflags = G_RAID_BIO_FLAG_SYNC;
sys/geom/raid/tr_raid1.c
706
G_RAID_LOGREQ(4, bp, "Queueing rebuild write.");
sys/geom/raid/tr_raid1.c
707
g_raid_subdisk_iostart(trs->trso_failed_sd, bp);
sys/geom/raid/tr_raid1.c
715
G_RAID_LOGREQ(4, bp,
sys/geom/raid/tr_raid1.c
717
bp->bio_error);
sys/geom/raid/tr_raid1.c
719
if (bp->bio_error != 0 ||
sys/geom/raid/tr_raid1.c
734
bp->bio_offset, bp->bio_length);
sys/geom/raid/tr_raid1.c
735
nsd->sd_rebuild_pos += bp->bio_length;
sys/geom/raid/tr_raid1.c
769
pbp = bp->bio_parent;
sys/geom/raid/tr_raid1.c
771
if (bp->bio_cmd == BIO_READ && bp->bio_error != 0) {
sys/geom/raid/tr_raid1.c
778
G_RAID_LOGREQ(0, bp,
sys/geom/raid/tr_raid1.c
780
bp->bio_error, sd->sd_disk->d_read_errs);
sys/geom/raid/tr_raid1.c
807
g_destroy_bio(bp);
sys/geom/raid/tr_raid1.c
828
G_RAID_LOGREQ(2, bp, "Couldn't retry read, failing it");
sys/geom/raid/tr_raid1.c
830
if (bp->bio_cmd == BIO_READ &&
sys/geom/raid/tr_raid1.c
831
bp->bio_error == 0 &&
sys/geom/raid/tr_raid1.c
845
G_RAID_LOGREQ(3, bp, "Recovered data from other drive");
sys/geom/raid/tr_raid1.c
848
g_destroy_bio(bp);
sys/geom/raid/tr_raid1.c
867
if (bp->bio_cmd == BIO_WRITE && bp->bio_error) {
sys/geom/raid/tr_raid1.c
868
G_RAID_LOGREQ(0, bp, "Remap write failed: "
sys/geom/raid/tr_raid1.c
871
bp->bio_error = 0;
sys/geom/raid/tr_raid1.c
877
G_RAID_LOGREQ(2, bp, "REMAP done %d.", bp->bio_error);
sys/geom/raid/tr_raid1.c
878
g_raid_unlock_range(sd->sd_volume, bp->bio_offset,
sys/geom/raid/tr_raid1.c
879
bp->bio_length);
sys/geom/raid/tr_raid1.c
883
pbp->bio_error = bp->bio_error;
sys/geom/raid/tr_raid1.c
884
if (pbp->bio_cmd == BIO_WRITE && bp->bio_error != 0) {
sys/geom/raid/tr_raid1.c
885
G_RAID_LOGREQ(0, bp, "Write failed: failing subdisk.");
sys/geom/raid/tr_raid1.c
890
error = bp->bio_error;
sys/geom/raid/tr_raid1.c
891
g_destroy_bio(bp);
sys/geom/raid/tr_raid1.c
945
struct bio *bp;
sys/geom/raid/tr_raid1.c
948
bp = (struct bio *)argp;
sys/geom/raid/tr_raid1.c
949
sd = (struct g_raid_subdisk *)bp->bio_caller1;
sys/geom/raid/tr_raid1.c
950
g_raid_subdisk_iostart(sd, bp);
sys/geom/raid/tr_raid1e.c
1004
G_RAID_LOGREQ(0, bp,
sys/geom/raid/tr_raid1e.c
1006
bp->bio_error, sd->sd_disk->d_read_errs);
sys/geom/raid/tr_raid1e.c
1021
P2V(vol, sd->sd_pos, bp->bio_offset, &virtual, ©);
sys/geom/raid/tr_raid1e.c
1035
cbp->bio_length = bp->bio_length;
sys/geom/raid/tr_raid1e.c
1036
cbp->bio_data = bp->bio_data;
sys/geom/raid/tr_raid1e.c
1037
cbp->bio_ma = bp->bio_ma;
sys/geom/raid/tr_raid1e.c
1038
cbp->bio_ma_offset = bp->bio_ma_offset;
sys/geom/raid/tr_raid1e.c
1039
cbp->bio_ma_n = bp->bio_ma_n;
sys/geom/raid/tr_raid1e.c
1040
g_destroy_bio(bp);
sys/geom/raid/tr_raid1e.c
1065
G_RAID_LOGREQ(2, bp, "Couldn't retry read, failing it");
sys/geom/raid/tr_raid1e.c
1067
if (bp->bio_cmd == BIO_READ &&
sys/geom/raid/tr_raid1e.c
1068
bp->bio_error == 0 &&
sys/geom/raid/tr_raid1e.c
1070
G_RAID_LOGREQ(3, bp, "Recovered data from other drive");
sys/geom/raid/tr_raid1e.c
1073
P2V(vol, sd->sd_pos, bp->bio_offset, &virtual, ©);
sys/geom/raid/tr_raid1e.c
1089
g_destroy_bio(bp);
sys/geom/raid/tr_raid1e.c
1108
P2V(vol, sd->sd_pos, bp->bio_offset, &virtual, ©);
sys/geom/raid/tr_raid1e.c
1117
if (bp->bio_cmd == BIO_WRITE && bp->bio_error) {
sys/geom/raid/tr_raid1e.c
1118
G_RAID_LOGREQ(0, bp, "Remap write failed: "
sys/geom/raid/tr_raid1e.c
1121
bp->bio_error = 0;
sys/geom/raid/tr_raid1e.c
1123
G_RAID_LOGREQ(2, bp, "REMAP done %d.", bp->bio_error);
sys/geom/raid/tr_raid1e.c
1124
g_raid_unlock_range(sd->sd_volume, virtual, bp->bio_length);
sys/geom/raid/tr_raid1e.c
1128
pbp->bio_error = bp->bio_error;
sys/geom/raid/tr_raid1e.c
1129
if (pbp->bio_cmd == BIO_WRITE && bp->bio_error != 0) {
sys/geom/raid/tr_raid1e.c
1130
G_RAID_LOGREQ(0, bp, "Write failed: failing subdisk.");
sys/geom/raid/tr_raid1e.c
1135
error = bp->bio_error;
sys/geom/raid/tr_raid1e.c
1136
g_destroy_bio(bp);
sys/geom/raid/tr_raid1e.c
1197
struct bio *bp;
sys/geom/raid/tr_raid1e.c
1200
bp = (struct bio *)argp;
sys/geom/raid/tr_raid1e.c
1201
sd = (struct g_raid_subdisk *)bp->bio_caller1;
sys/geom/raid/tr_raid1e.c
1202
g_raid_subdisk_iostart(sd, bp);
sys/geom/raid/tr_raid1e.c
428
struct bio *bp;
sys/geom/raid/tr_raid1e.c
470
bp = &trs->trso_bio;
sys/geom/raid/tr_raid1e.c
471
memset(bp, 0, sizeof(*bp));
sys/geom/raid/tr_raid1e.c
472
bp->bio_offset = offset + start +
sys/geom/raid/tr_raid1e.c
474
bp->bio_length = len;
sys/geom/raid/tr_raid1e.c
475
bp->bio_data = trs->trso_buffer;
sys/geom/raid/tr_raid1e.c
476
bp->bio_cmd = BIO_READ;
sys/geom/raid/tr_raid1e.c
477
bp->bio_cflags = G_RAID_BIO_FLAG_SYNC;
sys/geom/raid/tr_raid1e.c
478
bp->bio_caller1 = &vol->v_subdisks[(disk + best) % vol->v_disks_count];
sys/geom/raid/tr_raid1e.c
479
G_RAID_LOGREQ(3, bp, "Queueing rebuild read");
sys/geom/raid/tr_raid1e.c
493
g_raid_lock_range(sd->sd_volume, virtual, len, NULL, bp);
sys/geom/raid/tr_raid1e.c
685
g_raid_tr_iostart_raid1e_read(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid1e.c
697
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/raid/tr_raid1e.c
700
addr = bp->bio_data;
sys/geom/raid/tr_raid1e.c
702
V2P(vol, bp->bio_offset, &no, &offset, &start);
sys/geom/raid/tr_raid1e.c
703
remain = bp->bio_length;
sys/geom/raid/tr_raid1e.c
716
cbp = g_clone_bio(bp);
sys/geom/raid/tr_raid1e.c
721
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/geom/raid/tr_raid1e.c
749
if (bp->bio_error == 0)
sys/geom/raid/tr_raid1e.c
750
bp->bio_error = ENOMEM;
sys/geom/raid/tr_raid1e.c
751
g_raid_iodone(bp, bp->bio_error);
sys/geom/raid/tr_raid1e.c
755
g_raid_tr_iostart_raid1e_write(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid1e.c
767
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/raid/tr_raid1e.c
770
addr = bp->bio_data;
sys/geom/raid/tr_raid1e.c
772
V2P(vol, bp->bio_offset, &no, &offset, &start);
sys/geom/raid/tr_raid1e.c
773
remain = bp->bio_length;
sys/geom/raid/tr_raid1e.c
791
cbp = g_clone_bio(bp);
sys/geom/raid/tr_raid1e.c
796
if ((bp->bio_flags & BIO_UNMAPPED) != 0 &&
sys/geom/raid/tr_raid1e.c
797
bp->bio_cmd != BIO_DELETE) {
sys/geom/raid/tr_raid1e.c
814
if (bp->bio_cmd != BIO_DELETE)
sys/geom/raid/tr_raid1e.c
827
if (bp->bio_error == 0)
sys/geom/raid/tr_raid1e.c
828
bp->bio_error = ENOMEM;
sys/geom/raid/tr_raid1e.c
829
g_raid_iodone(bp, bp->bio_error);
sys/geom/raid/tr_raid1e.c
833
g_raid_tr_iostart_raid1e(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid1e.c
843
g_raid_iodone(bp, EIO);
sys/geom/raid/tr_raid1e.c
853
!(bp->bio_cflags & G_RAID_BIO_FLAG_SPECIAL)) {
sys/geom/raid/tr_raid1e.c
861
switch (bp->bio_cmd) {
sys/geom/raid/tr_raid1e.c
863
g_raid_tr_iostart_raid1e_read(tr, bp);
sys/geom/raid/tr_raid1e.c
867
g_raid_tr_iostart_raid1e_write(tr, bp);
sys/geom/raid/tr_raid1e.c
871
g_raid_tr_flush_common(tr, bp);
sys/geom/raid/tr_raid1e.c
875
bp->bio_cmd, vol->v_name));
sys/geom/raid/tr_raid1e.c
882
struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/tr_raid1e.c
895
if (bp->bio_cflags & G_RAID_BIO_FLAG_SYNC) {
sys/geom/raid/tr_raid1e.c
898
if (bp->bio_cmd == BIO_READ) {
sys/geom/raid/tr_raid1e.c
907
if (bp->bio_error != 0) {
sys/geom/raid/tr_raid1e.c
908
G_RAID_LOGREQ(0, bp,
sys/geom/raid/tr_raid1e.c
911
bp->bio_error);
sys/geom/raid/tr_raid1e.c
919
G_RAID_LOGREQ(3, bp, "Rebuild read done: %d",
sys/geom/raid/tr_raid1e.c
920
bp->bio_error);
sys/geom/raid/tr_raid1e.c
921
bp->bio_cmd = BIO_WRITE;
sys/geom/raid/tr_raid1e.c
922
bp->bio_cflags = G_RAID_BIO_FLAG_SYNC;
sys/geom/raid/tr_raid1e.c
923
bp->bio_offset = nsd->sd_rebuild_pos;
sys/geom/raid/tr_raid1e.c
924
G_RAID_LOGREQ(3, bp, "Queueing rebuild write.");
sys/geom/raid/tr_raid1e.c
925
g_raid_subdisk_iostart(nsd, bp);
sys/geom/raid/tr_raid1e.c
933
G_RAID_LOGREQ(3, bp, "Rebuild write done: %d",
sys/geom/raid/tr_raid1e.c
934
bp->bio_error);
sys/geom/raid/tr_raid1e.c
935
if (bp->bio_error != 0 ||
sys/geom/raid/tr_raid1e.c
950
nsd->sd_rebuild_pos += bp->bio_length;
sys/geom/raid/tr_raid1e.c
994
pbp = bp->bio_parent;
sys/geom/raid/tr_raid1e.c
996
mask = (intptr_t)bp->bio_caller2;
sys/geom/raid/tr_raid1e.c
997
if (bp->bio_cmd == BIO_READ && bp->bio_error != 0) {
sys/geom/raid/tr_raid5.c
209
g_raid_tr_iostart_raid5_read(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid5.c
221
addr = bp->bio_data;
sys/geom/raid/tr_raid5.c
228
nstripe = bp->bio_offset / strip_size;
sys/geom/raid/tr_raid5.c
230
start = bp->bio_offset % strip_size;
sys/geom/raid/tr_raid5.c
270
remain = bp->bio_length;
sys/geom/raid/tr_raid5.c
275
cbp = g_clone_bio(bp);
sys/geom/raid/tr_raid5.c
335
if (bp->bio_error == 0)
sys/geom/raid/tr_raid5.c
336
bp->bio_error = ENOMEM;
sys/geom/raid/tr_raid5.c
337
g_raid_iodone(bp, bp->bio_error);
sys/geom/raid/tr_raid5.c
341
g_raid_tr_iostart_raid5(struct g_raid_tr_object *tr, struct bio *bp)
sys/geom/raid/tr_raid5.c
347
g_raid_iodone(bp, EIO);
sys/geom/raid/tr_raid5.c
350
switch (bp->bio_cmd) {
sys/geom/raid/tr_raid5.c
352
g_raid_tr_iostart_raid5_read(tr, bp);
sys/geom/raid/tr_raid5.c
358
g_raid_iodone(bp, ENODEV);
sys/geom/raid/tr_raid5.c
362
bp->bio_cmd, vol->v_name));
sys/geom/raid/tr_raid5.c
369
struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/tr_raid5.c
373
pbp = bp->bio_parent;
sys/geom/raid/tr_raid5.c
375
pbp->bio_error = bp->bio_error;
sys/geom/raid/tr_raid5.c
377
g_destroy_bio(bp);
sys/geom/raid/tr_raid5.c
395
struct bio *bp;
sys/geom/raid/tr_raid5.c
398
bp = (struct bio *)argp;
sys/geom/raid/tr_raid5.c
399
sd = (struct g_raid_subdisk *)bp->bio_caller1;
sys/geom/raid/tr_raid5.c
400
g_raid_subdisk_iostart(sd, bp);
sys/geom/raid3/g_raid3.c
1006
struct bio *bp, *pbp;
sys/geom/raid3/g_raid3.c
1019
G_RAID3_FOREACH_BIO(pbp, bp) {
sys/geom/raid3/g_raid3.c
1020
if (G_RAID3_NEXT_BIO(bp) == cbp)
sys/geom/raid3/g_raid3.c
1023
if (bp != NULL) {
sys/geom/raid3/g_raid3.c
1024
KASSERT(G_RAID3_NEXT_BIO(bp) != NULL,
sys/geom/raid3/g_raid3.c
1026
G_RAID3_NEXT_BIO(bp) = G_RAID3_NEXT_BIO(cbp);
sys/geom/raid3/g_raid3.c
1036
struct bio *bp, *cbp;
sys/geom/raid3/g_raid3.c
1058
G_RAID3_FOREACH_BIO(pbp, bp) {
sys/geom/raid3/g_raid3.c
1059
if (G_RAID3_NEXT_BIO(bp) == NULL) {
sys/geom/raid3/g_raid3.c
1060
G_RAID3_NEXT_BIO(bp) = cbp;
sys/geom/raid3/g_raid3.c
1073
struct bio *bp, *cbp, *tmpbp;
sys/geom/raid3/g_raid3.c
1078
bp = NULL;
sys/geom/raid3/g_raid3.c
1085
bp = cbp;
sys/geom/raid3/g_raid3.c
1089
KASSERT(bp != NULL, ("NULL parity bio."));
sys/geom/raid3/g_raid3.c
1095
if (cbp == bp)
sys/geom/raid3/g_raid3.c
1108
if (cbp == bp)
sys/geom/raid3/g_raid3.c
1111
bcopy(cbp->bio_data, bp->bio_data,
sys/geom/raid3/g_raid3.c
1112
bp->bio_length);
sys/geom/raid3/g_raid3.c
1115
g_raid3_xor(cbp->bio_data, bp->bio_data,
sys/geom/raid3/g_raid3.c
1116
bp->bio_length);
sys/geom/raid3/g_raid3.c
1288
g_raid3_done(struct bio *bp)
sys/geom/raid3/g_raid3.c
1292
sc = bp->bio_from->geom->softc;
sys/geom/raid3/g_raid3.c
1293
bp->bio_cflags |= G_RAID3_BIO_CFLAG_REGULAR;
sys/geom/raid3/g_raid3.c
1294
G_RAID3_LOGREQ(3, bp, "Regular request done (error=%d).", bp->bio_error);
sys/geom/raid3/g_raid3.c
1296
bioq_insert_head(&sc->sc_queue, bp);
sys/geom/raid3/g_raid3.c
1396
g_raid3_sync_done(struct bio *bp)
sys/geom/raid3/g_raid3.c
1400
G_RAID3_LOGREQ(3, bp, "Synchronization request delivered.");
sys/geom/raid3/g_raid3.c
1401
sc = bp->bio_from->geom->softc;
sys/geom/raid3/g_raid3.c
1402
bp->bio_cflags |= G_RAID3_BIO_CFLAG_SYNC;
sys/geom/raid3/g_raid3.c
1404
bioq_insert_head(&sc->sc_queue, bp);
sys/geom/raid3/g_raid3.c
1411
g_raid3_flush(struct g_raid3_softc *sc, struct bio *bp)
sys/geom/raid3/g_raid3.c
1424
cbp = g_clone_bio(bp);
sys/geom/raid3/g_raid3.c
1431
if (bp->bio_error == 0)
sys/geom/raid3/g_raid3.c
1432
bp->bio_error = ENOMEM;
sys/geom/raid3/g_raid3.c
1433
g_io_deliver(bp, bp->bio_error);
sys/geom/raid3/g_raid3.c
1455
g_raid3_start(struct bio *bp)
sys/geom/raid3/g_raid3.c
1459
sc = bp->bio_to->private;
sys/geom/raid3/g_raid3.c
1467
bp->bio_to->error, bp->bio_to->name));
sys/geom/raid3/g_raid3.c
1468
G_RAID3_LOGREQ(3, bp, "Request received.");
sys/geom/raid3/g_raid3.c
1470
switch (bp->bio_cmd) {
sys/geom/raid3/g_raid3.c
1477
g_raid3_flush(sc, bp);
sys/geom/raid3/g_raid3.c
1481
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/raid3/g_raid3.c
1485
bioq_insert_tail(&sc->sc_queue, bp);
sys/geom/raid3/g_raid3.c
1496
g_raid3_sync_collision(struct g_raid3_softc *sc, struct bio *bp)
sys/geom/raid3/g_raid3.c
1506
rstart = bp->bio_offset;
sys/geom/raid3/g_raid3.c
1507
rend = bp->bio_offset + bp->bio_length;
sys/geom/raid3/g_raid3.c
1533
struct bio *bp;
sys/geom/raid3/g_raid3.c
1539
TAILQ_FOREACH(bp, &sc->sc_inflight.queue, bio_queue) {
sys/geom/raid3/g_raid3.c
1540
rstart = bp->bio_offset;
sys/geom/raid3/g_raid3.c
1541
rend = bp->bio_offset + bp->bio_length;
sys/geom/raid3/g_raid3.c
1552
g_raid3_regular_delay(struct g_raid3_softc *sc, struct bio *bp)
sys/geom/raid3/g_raid3.c
1555
G_RAID3_LOGREQ(2, bp, "Delaying request.");
sys/geom/raid3/g_raid3.c
1556
bioq_insert_head(&sc->sc_regular_delayed, bp);
sys/geom/raid3/g_raid3.c
1563
g_raid3_sync_delay(struct g_raid3_softc *sc, struct bio *bp)
sys/geom/raid3/g_raid3.c
1566
G_RAID3_LOGREQ(2, bp, "Delaying synchronization request.");
sys/geom/raid3/g_raid3.c
1567
bioq_insert_tail(&sc->sc_sync_delayed, bp);
sys/geom/raid3/g_raid3.c
1577
struct bio *bp, *bp2;
sys/geom/raid3/g_raid3.c
1579
TAILQ_FOREACH_SAFE(bp, &sc->sc_regular_delayed.queue, bio_queue, bp2) {
sys/geom/raid3/g_raid3.c
1580
if (g_raid3_sync_collision(sc, bp))
sys/geom/raid3/g_raid3.c
1582
bioq_remove(&sc->sc_regular_delayed, bp);
sys/geom/raid3/g_raid3.c
1583
G_RAID3_LOGREQ(2, bp, "Releasing delayed request (%p).", bp);
sys/geom/raid3/g_raid3.c
1585
bioq_insert_head(&sc->sc_queue, bp);
sys/geom/raid3/g_raid3.c
1604
struct bio *bp, *bp2;
sys/geom/raid3/g_raid3.c
1606
TAILQ_FOREACH_SAFE(bp, &sc->sc_sync_delayed.queue, bio_queue, bp2) {
sys/geom/raid3/g_raid3.c
1607
if (g_raid3_regular_collision(sc, bp))
sys/geom/raid3/g_raid3.c
1609
bioq_remove(&sc->sc_sync_delayed, bp);
sys/geom/raid3/g_raid3.c
1610
G_RAID3_LOGREQ(2, bp,
sys/geom/raid3/g_raid3.c
1612
g_io_request(bp, bp->bio_from);
sys/geom/raid3/g_raid3.c
1624
g_raid3_sync_request(struct bio *bp)
sys/geom/raid3/g_raid3.c
1629
bp->bio_from->index--;
sys/geom/raid3/g_raid3.c
1630
sc = bp->bio_from->geom->softc;
sys/geom/raid3/g_raid3.c
1631
disk = bp->bio_from->private;
sys/geom/raid3/g_raid3.c
1635
g_raid3_kill_consumer(sc, bp->bio_from);
sys/geom/raid3/g_raid3.c
1637
free(bp->bio_data, M_RAID3);
sys/geom/raid3/g_raid3.c
1638
g_destroy_bio(bp);
sys/geom/raid3/g_raid3.c
1646
switch (bp->bio_cmd) {
sys/geom/raid3/g_raid3.c
1654
if (bp->bio_error != 0) {
sys/geom/raid3/g_raid3.c
1655
G_RAID3_LOGREQ(0, bp,
sys/geom/raid3/g_raid3.c
1657
bp->bio_error);
sys/geom/raid3/g_raid3.c
1658
g_destroy_bio(bp);
sys/geom/raid3/g_raid3.c
1661
G_RAID3_LOGREQ(3, bp, "Synchronization request finished.");
sys/geom/raid3/g_raid3.c
1663
dst = src = bp->bio_data;
sys/geom/raid3/g_raid3.c
1668
for (left = bp->bio_length; left > 0;
sys/geom/raid3/g_raid3.c
1681
for (left = bp->bio_length; left > 0;
sys/geom/raid3/g_raid3.c
1688
bp->bio_driver1 = bp->bio_driver2 = NULL;
sys/geom/raid3/g_raid3.c
1689
bp->bio_pflags = 0;
sys/geom/raid3/g_raid3.c
1690
bp->bio_offset /= sc->sc_ndisks - 1;
sys/geom/raid3/g_raid3.c
1691
bp->bio_length /= sc->sc_ndisks - 1;
sys/geom/raid3/g_raid3.c
1692
bp->bio_cmd = BIO_WRITE;
sys/geom/raid3/g_raid3.c
1693
bp->bio_cflags = 0;
sys/geom/raid3/g_raid3.c
1694
bp->bio_children = bp->bio_inbed = 0;
sys/geom/raid3/g_raid3.c
1700
g_io_request(bp, cp);
sys/geom/raid3/g_raid3.c
1710
if (bp->bio_error != 0) {
sys/geom/raid3/g_raid3.c
1711
G_RAID3_LOGREQ(0, bp,
sys/geom/raid3/g_raid3.c
1713
bp->bio_error);
sys/geom/raid3/g_raid3.c
1714
g_destroy_bio(bp);
sys/geom/raid3/g_raid3.c
1721
G_RAID3_LOGREQ(3, bp, "Synchronization request finished.");
sys/geom/raid3/g_raid3.c
1729
i = (int)(uintptr_t)bp->bio_caller1;
sys/geom/raid3/g_raid3.c
1732
free(bp->bio_data, M_RAID3);
sys/geom/raid3/g_raid3.c
1733
g_destroy_bio(bp);
sys/geom/raid3/g_raid3.c
1749
data = bp->bio_data;
sys/geom/raid3/g_raid3.c
1750
g_reset_bio(bp);
sys/geom/raid3/g_raid3.c
1751
bp->bio_cmd = BIO_READ;
sys/geom/raid3/g_raid3.c
1752
bp->bio_offset = sync->ds_offset * (sc->sc_ndisks - 1);
sys/geom/raid3/g_raid3.c
1753
bp->bio_length = MIN(maxphys, sc->sc_mediasize - bp->bio_offset);
sys/geom/raid3/g_raid3.c
1754
sync->ds_offset += bp->bio_length / (sc->sc_ndisks - 1);
sys/geom/raid3/g_raid3.c
1755
bp->bio_done = g_raid3_sync_done;
sys/geom/raid3/g_raid3.c
1756
bp->bio_data = data;
sys/geom/raid3/g_raid3.c
1757
bp->bio_from = sync->ds_consumer;
sys/geom/raid3/g_raid3.c
1758
bp->bio_to = sc->sc_provider;
sys/geom/raid3/g_raid3.c
1759
G_RAID3_LOGREQ(3, bp, "Sending synchronization request.");
sys/geom/raid3/g_raid3.c
1764
if (g_raid3_regular_collision(sc, bp))
sys/geom/raid3/g_raid3.c
1765
g_raid3_sync_delay(sc, bp);
sys/geom/raid3/g_raid3.c
1767
g_io_request(bp, sync->ds_consumer);
sys/geom/raid3/g_raid3.c
1775
bp = sync->ds_bios[i];
sys/geom/raid3/g_raid3.c
1776
boffset = bp->bio_offset;
sys/geom/raid3/g_raid3.c
1777
if (bp->bio_cmd == BIO_WRITE)
sys/geom/raid3/g_raid3.c
1791
bp->bio_cmd, sc->sc_name));
sys/geom/raid3/g_raid3.c
2049
struct bio *bp;
sys/geom/raid3/g_raid3.c
2116
bp = bioq_first(&sc->sc_queue);
sys/geom/raid3/g_raid3.c
2117
if (bp == NULL) {
sys/geom/raid3/g_raid3.c
2145
bioq_remove(&sc->sc_queue, bp);
sys/geom/raid3/g_raid3.c
2148
if (bp->bio_from->geom == sc->sc_sync.ds_geom &&
sys/geom/raid3/g_raid3.c
2149
(bp->bio_cflags & G_RAID3_BIO_CFLAG_SYNC) != 0) {
sys/geom/raid3/g_raid3.c
2150
g_raid3_sync_request(bp); /* READ */
sys/geom/raid3/g_raid3.c
2151
} else if (bp->bio_to != sc->sc_provider) {
sys/geom/raid3/g_raid3.c
2152
if ((bp->bio_cflags & G_RAID3_BIO_CFLAG_REGULAR) != 0)
sys/geom/raid3/g_raid3.c
2153
g_raid3_regular_request(bp);
sys/geom/raid3/g_raid3.c
2154
else if ((bp->bio_cflags & G_RAID3_BIO_CFLAG_SYNC) != 0)
sys/geom/raid3/g_raid3.c
2155
g_raid3_sync_request(bp); /* WRITE */
sys/geom/raid3/g_raid3.c
2159
bp->bio_cflags, bp->bio_to->name));
sys/geom/raid3/g_raid3.c
2161
} else if (g_raid3_register_request(bp) != 0) {
sys/geom/raid3/g_raid3.c
2163
bioq_insert_head(&sc->sc_queue, bp);
sys/geom/raid3/g_raid3.c
2168
TAILQ_FOREACH(bp, &sc->sc_queue.queue, bio_queue) {
sys/geom/raid3/g_raid3.c
2169
if (bp->bio_cflags & G_RAID3_BIO_CFLAG_REGULAR)
sys/geom/raid3/g_raid3.c
2176
TAILQ_FOREACH(bp, &sc->sc_queue.queue, bio_queue) {
sys/geom/raid3/g_raid3.c
2177
if (bp->bio_cflags & G_RAID3_BIO_CFLAG_SYNC)
sys/geom/raid3/g_raid3.c
2213
struct bio *bp;
sys/geom/raid3/g_raid3.c
2265
bp = g_alloc_bio();
sys/geom/raid3/g_raid3.c
2266
disk->d_sync.ds_bios[n] = bp;
sys/geom/raid3/g_raid3.c
2267
bp->bio_parent = NULL;
sys/geom/raid3/g_raid3.c
2268
bp->bio_cmd = BIO_READ;
sys/geom/raid3/g_raid3.c
2269
bp->bio_data = malloc(maxphys, M_RAID3, M_WAITOK);
sys/geom/raid3/g_raid3.c
2270
bp->bio_cflags = 0;
sys/geom/raid3/g_raid3.c
2271
bp->bio_offset = disk->d_sync.ds_offset * (sc->sc_ndisks - 1);
sys/geom/raid3/g_raid3.c
2272
bp->bio_length = MIN(maxphys, sc->sc_mediasize - bp->bio_offset);
sys/geom/raid3/g_raid3.c
2273
disk->d_sync.ds_offset += bp->bio_length / (sc->sc_ndisks - 1);
sys/geom/raid3/g_raid3.c
2274
bp->bio_done = g_raid3_sync_done;
sys/geom/raid3/g_raid3.c
2275
bp->bio_from = disk->d_sync.ds_consumer;
sys/geom/raid3/g_raid3.c
2276
bp->bio_to = sc->sc_provider;
sys/geom/raid3/g_raid3.c
2277
bp->bio_caller1 = (void *)(uintptr_t)n;
sys/geom/raid3/g_raid3.c
2287
bp = disk->d_sync.ds_bios[n];
sys/geom/raid3/g_raid3.c
2288
G_RAID3_LOGREQ(3, bp, "Sending synchronization request.");
sys/geom/raid3/g_raid3.c
2293
if (g_raid3_regular_collision(sc, bp))
sys/geom/raid3/g_raid3.c
2294
g_raid3_sync_delay(sc, bp);
sys/geom/raid3/g_raid3.c
2296
g_io_request(bp, disk->d_sync.ds_consumer);
sys/geom/raid3/g_raid3.c
2385
struct bio *bp;
sys/geom/raid3/g_raid3.c
2394
while ((bp = bioq_first(&sc->sc_queue)) != NULL) {
sys/geom/raid3/g_raid3.c
2395
bioq_remove(&sc->sc_queue, bp);
sys/geom/raid3/g_raid3.c
2396
g_io_deliver(bp, ENXIO);
sys/geom/raid3/g_raid3.c
262
g_raid3_is_zero(struct bio *bp)
sys/geom/raid3/g_raid3.c
270
size = bp->bio_length;
sys/geom/raid3/g_raid3.c
271
addr = (u_char *)bp->bio_data;
sys/geom/raid3/g_raid3.c
415
struct bio *bp;
sys/geom/raid3/g_raid3.c
419
TAILQ_FOREACH(bp, &sc->sc_queue.queue, bio_queue) {
sys/geom/raid3/g_raid3.c
420
if (bp->bio_from == cp)
sys/geom/raid3/g_raid3.c
947
#define G_RAID3_FOREACH_BIO(pbp, bp) \
sys/geom/raid3/g_raid3.c
948
for ((bp) = G_RAID3_HEAD_BIO(pbp); (bp) != NULL; \
sys/geom/raid3/g_raid3.c
949
(bp) = G_RAID3_NEXT_BIO(bp))
sys/geom/raid3/g_raid3.c
951
#define G_RAID3_FOREACH_SAFE_BIO(pbp, bp, tmpbp) \
sys/geom/raid3/g_raid3.c
952
for ((bp) = G_RAID3_HEAD_BIO(pbp); \
sys/geom/raid3/g_raid3.c
953
(bp) != NULL && ((tmpbp) = G_RAID3_NEXT_BIO(bp), 1); \
sys/geom/raid3/g_raid3.c
954
(bp) = (tmpbp))
sys/geom/raid3/g_raid3.c
966
struct bio *pbp, *bp;
sys/geom/raid3/g_raid3.c
972
G_RAID3_FOREACH_BIO(pbp, bp) {
sys/geom/raid3/g_raid3.c
973
if (G_RAID3_NEXT_BIO(bp) == cbp) {
sys/geom/raid3/g_raid3.c
974
G_RAID3_NEXT_BIO(bp) = G_RAID3_NEXT_BIO(cbp);
sys/geom/raid3/g_raid3.c
985
struct bio *pbp, *bp;
sys/geom/raid3/g_raid3.c
993
G_RAID3_FOREACH_BIO(pbp, bp) {
sys/geom/raid3/g_raid3.c
994
if (G_RAID3_NEXT_BIO(bp) == dbp) {
sys/geom/raid3/g_raid3.c
995
G_RAID3_NEXT_BIO(bp) = sbp;
sys/geom/raid3/g_raid3.h
72
#define G_RAID3_LOGREQ(lvl, bp, ...) \
sys/geom/raid3/g_raid3.h
73
_GEOM_DEBUG("GEOM_RAID3", g_raid3_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/shsec/g_shsec.c
247
g_shsec_done(struct bio *bp)
sys/geom/shsec/g_shsec.c
251
pbp = bp->bio_parent;
sys/geom/shsec/g_shsec.c
252
if (bp->bio_error == 0)
sys/geom/shsec/g_shsec.c
253
G_SHSEC_LOGREQ(2, bp, "Request done.");
sys/geom/shsec/g_shsec.c
255
G_SHSEC_LOGREQ(0, bp, "Request failed (error=%d).",
sys/geom/shsec/g_shsec.c
256
bp->bio_error);
sys/geom/shsec/g_shsec.c
258
pbp->bio_error = bp->bio_error;
sys/geom/shsec/g_shsec.c
262
bcopy(bp->bio_data, pbp->bio_data, pbp->bio_length);
sys/geom/shsec/g_shsec.c
265
g_shsec_xor1((uint32_t *)bp->bio_data,
sys/geom/shsec/g_shsec.c
270
if (bp->bio_data != NULL) {
sys/geom/shsec/g_shsec.c
271
explicit_bzero(bp->bio_data, bp->bio_length);
sys/geom/shsec/g_shsec.c
272
uma_zfree(g_shsec_zone, bp->bio_data);
sys/geom/shsec/g_shsec.c
274
g_destroy_bio(bp);
sys/geom/shsec/g_shsec.c
294
g_shsec_start(struct bio *bp)
sys/geom/shsec/g_shsec.c
304
sc = bp->bio_to->geom->softc;
sys/geom/shsec/g_shsec.c
311
bp->bio_to->error, bp->bio_to->name));
sys/geom/shsec/g_shsec.c
313
G_SHSEC_LOGREQ(2, bp, "Request received.");
sys/geom/shsec/g_shsec.c
315
switch (bp->bio_cmd) {
sys/geom/shsec/g_shsec.c
328
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/shsec/g_shsec.c
336
len = bp->bio_length;
sys/geom/shsec/g_shsec.c
337
if (bp->bio_cmd == BIO_READ)
sys/geom/shsec/g_shsec.c
338
bp->bio_pflags = G_SHSEC_BFLAG_FIRST;
sys/geom/shsec/g_shsec.c
340
cbp = g_clone_bio(bp);
sys/geom/shsec/g_shsec.c
352
if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/geom/shsec/g_shsec.c
359
if (bp->bio_cmd == BIO_WRITE) {
sys/geom/shsec/g_shsec.c
362
bcopy(bp->bio_data, dst, len);
sys/geom/shsec/g_shsec.c
387
bp->bio_children--;
sys/geom/shsec/g_shsec.c
394
if (bp->bio_error == 0)
sys/geom/shsec/g_shsec.c
395
bp->bio_error = error;
sys/geom/shsec/g_shsec.c
396
g_io_deliver(bp, bp->bio_error);
sys/geom/shsec/g_shsec.h
49
#define G_SHSEC_LOGREQ(lvl, bp, ...) \
sys/geom/shsec/g_shsec.h
50
_GEOM_DEBUG("GEOM_SHSEC", g_shsec_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/stripe/g_stripe.c
269
g_stripe_done(struct bio *bp)
sys/geom/stripe/g_stripe.c
274
pbp = bp->bio_parent;
sys/geom/stripe/g_stripe.c
276
if (bp->bio_cmd == BIO_READ && bp->bio_caller1 != NULL) {
sys/geom/stripe/g_stripe.c
277
g_stripe_copy(sc, bp->bio_data, bp->bio_caller1, bp->bio_offset,
sys/geom/stripe/g_stripe.c
278
bp->bio_length, 1);
sys/geom/stripe/g_stripe.c
279
bp->bio_data = bp->bio_caller1;
sys/geom/stripe/g_stripe.c
280
bp->bio_caller1 = NULL;
sys/geom/stripe/g_stripe.c
284
pbp->bio_error = bp->bio_error;
sys/geom/stripe/g_stripe.c
285
pbp->bio_completed += bp->bio_completed;
sys/geom/stripe/g_stripe.c
291
if (bp->bio_cmd == BIO_SPEEDUP)
sys/geom/stripe/g_stripe.c
296
g_destroy_bio(bp);
sys/geom/stripe/g_stripe.c
300
g_stripe_start_fast(struct bio *bp, u_int no, off_t offset, off_t length)
sys/geom/stripe/g_stripe.c
310
sc = bp->bio_to->geom->softc;
sys/geom/stripe/g_stripe.c
312
addr = bp->bio_data;
sys/geom/stripe/g_stripe.c
315
cbp = g_clone_bio(bp);
sys/geom/stripe/g_stripe.c
335
length = bp->bio_length - length;
sys/geom/stripe/g_stripe.c
367
cbp = g_clone_bio(bp);
sys/geom/stripe/g_stripe.c
390
bp->bio_driver1 = data;
sys/geom/stripe/g_stripe.c
403
if (bp->bio_cmd == BIO_WRITE) {
sys/geom/stripe/g_stripe.c
422
bp->bio_children--;
sys/geom/stripe/g_stripe.c
429
g_stripe_start_economic(struct bio *bp, u_int no, off_t offset, off_t length)
sys/geom/stripe/g_stripe.c
438
sc = bp->bio_to->geom->softc;
sys/geom/stripe/g_stripe.c
442
cbp = g_clone_bio(bp);
sys/geom/stripe/g_stripe.c
451
if (bp->bio_length == length)
sys/geom/stripe/g_stripe.c
457
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/stripe/g_stripe.c
460
addr = bp->bio_data;
sys/geom/stripe/g_stripe.c
465
if (bp->bio_cmd != BIO_DELETE)
sys/geom/stripe/g_stripe.c
467
length = bp->bio_length - length;
sys/geom/stripe/g_stripe.c
473
cbp = g_clone_bio(bp);
sys/geom/stripe/g_stripe.c
490
if ((bp->bio_flags & BIO_UNMAPPED) != 0) {
sys/geom/stripe/g_stripe.c
501
if (bp->bio_cmd != BIO_DELETE)
sys/geom/stripe/g_stripe.c
521
bp->bio_children--;
sys/geom/stripe/g_stripe.c
528
g_stripe_pushdown(struct g_stripe_softc *sc, struct bio *bp)
sys/geom/stripe/g_stripe.c
537
cbp = g_clone_bio(bp);
sys/geom/stripe/g_stripe.c
544
if (bp->bio_error == 0)
sys/geom/stripe/g_stripe.c
545
bp->bio_error = ENOMEM;
sys/geom/stripe/g_stripe.c
546
g_io_deliver(bp, bp->bio_error);
sys/geom/stripe/g_stripe.c
564
g_stripe_start(struct bio *bp)
sys/geom/stripe/g_stripe.c
571
sc = bp->bio_to->geom->softc;
sys/geom/stripe/g_stripe.c
578
bp->bio_to->error, bp->bio_to->name));
sys/geom/stripe/g_stripe.c
580
G_STRIPE_LOGREQ(bp, "Request received.");
sys/geom/stripe/g_stripe.c
582
switch (bp->bio_cmd) {
sys/geom/stripe/g_stripe.c
589
g_stripe_pushdown(sc, bp);
sys/geom/stripe/g_stripe.c
592
if (!strcmp(bp->bio_attribute, "GEOM::candelete")) {
sys/geom/stripe/g_stripe.c
594
g_handleattr(bp, "GEOM::candelete", &val, sizeof(val));
sys/geom/stripe/g_stripe.c
599
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/stripe/g_stripe.c
611
nstripe = bp->bio_offset >> (off_t)sc->sc_stripebits;
sys/geom/stripe/g_stripe.c
616
start = bp->bio_offset & (stripesize - 1);
sys/geom/stripe/g_stripe.c
621
length = MIN(bp->bio_length, stripesize - start);
sys/geom/stripe/g_stripe.c
638
if (g_stripe_fast && bp->bio_length <= maxphys &&
sys/geom/stripe/g_stripe.c
639
bp->bio_length >= stripesize * sc->sc_ndisks &&
sys/geom/stripe/g_stripe.c
640
(bp->bio_flags & BIO_UNMAPPED) == 0 &&
sys/geom/stripe/g_stripe.c
641
bp->bio_cmd != BIO_DELETE) {
sys/geom/stripe/g_stripe.c
646
error = g_stripe_start_fast(bp, no, offset, length);
sys/geom/stripe/g_stripe.c
657
error = g_stripe_start_economic(bp, no, offset, length);
sys/geom/stripe/g_stripe.c
659
if (bp->bio_error == 0)
sys/geom/stripe/g_stripe.c
660
bp->bio_error = error;
sys/geom/stripe/g_stripe.c
661
g_io_deliver(bp, bp->bio_error);
sys/geom/stripe/g_stripe.h
54
#define G_STRIPE_LOGREQ(bp, ...) \
sys/geom/stripe/g_stripe.h
55
_GEOM_DEBUG("GEOM_STRIPE", g_stripe_debug, 2, (bp), __VA_ARGS__)
sys/geom/union/g_union.c
1047
g_union_done(struct bio *bp)
sys/geom/union/g_union.c
1052
wip = bp->bio_caller1;
sys/geom/union/g_union.c
1053
if (wip->wip_error != 0 && bp->bio_error == 0)
sys/geom/union/g_union.c
1054
bp->bio_error = wip->wip_error;
sys/geom/union/g_union.c
1059
if (bp->bio_cmd == BIO_WRITE)
sys/geom/union/g_union.c
1060
g_union_setmap(bp, sc);
sys/geom/union/g_union.c
1069
g_std_done(bp);
sys/geom/union/g_union.c
1076
g_union_setmap(struct bio *bp, struct g_union_softc *sc)
sys/geom/union/g_union.c
1084
KASSERT(bp->bio_offset % sc->sc_sectorsize == 0,
sys/geom/union/g_union.c
1086
KASSERT(bp->bio_length % sc->sc_sectorsize == 0,
sys/geom/union/g_union.c
1088
start = bp->bio_offset / sc->sc_sectorsize;
sys/geom/union/g_union.c
1089
numsec = bp->bio_length / sc->sc_sectorsize;
sys/geom/union/g_union.c
1113
g_union_getmap(struct bio *bp, struct g_union_softc *sc, off_t *len2read)
sys/geom/union/g_union.c
1120
KASSERT(bp->bio_offset % sc->sc_sectorsize == 0,
sys/geom/union/g_union.c
1122
KASSERT(bp->bio_length % sc->sc_sectorsize == 0,
sys/geom/union/g_union.c
1124
start = bp->bio_offset / sc->sc_sectorsize;
sys/geom/union/g_union.c
1125
numsec = bp->bio_length / sc->sc_sectorsize;
sys/geom/union/g_union.c
1188
*len2read = bp->bio_length - (numsec * sc->sc_sectorsize);
sys/geom/union/g_union.c
1200
g_union_kerneldump(struct bio *bp, struct g_union_softc *sc)
sys/geom/union/g_union.c
1206
gkd = (struct g_kerneldump *)bp->bio_data;
sys/geom/union/g_union.c
1207
gp = bp->bio_to->geom;
sys/geom/union/g_union.c
1219
g_io_deliver(bp, ENODEV);
sys/geom/union/g_union.c
1225
g_io_deliver(bp, 0);
sys/geom/union/g_union.c
611
struct bio *bp;
sys/geom/union/g_union.c
639
bp = g_alloc_bio();
sys/geom/union/g_union.c
640
bp->bio_data = g_malloc(MAXBSIZE, M_WAITOK);
sys/geom/union/g_union.c
641
bp->bio_done = biodone;
sys/geom/union/g_union.c
702
bp->bio_offset = 0;
sys/geom/union/g_union.c
703
bp->bio_length = sc->sc_map_size * sc->sc_sectorsize;
sys/geom/union/g_union.c
706
while (bp->bio_length > 0) {
sys/geom/union/g_union.c
707
if (!g_union_getmap(bp, sc, &len2rd)) {
sys/geom/union/g_union.c
709
bp->bio_offset += len2rd;
sys/geom/union/g_union.c
710
bp->bio_length -= len2rd;
sys/geom/union/g_union.c
720
savelen = bp->bio_length;
sys/geom/union/g_union.c
721
bp->bio_length = len2wt;
sys/geom/union/g_union.c
722
bp->bio_cmd = BIO_READ;
sys/geom/union/g_union.c
723
g_io_request(bp, sc->sc_uppercp);
sys/geom/union/g_union.c
724
if ((error = biowait(bp, "rdunion")) != 0) {
sys/geom/union/g_union.c
730
bp->bio_flags &= ~BIO_DONE;
sys/geom/union/g_union.c
731
bp->bio_cmd = BIO_WRITE;
sys/geom/union/g_union.c
732
g_io_request(bp, lowercp);
sys/geom/union/g_union.c
733
if ((error = biowait(bp, "wtunion")) != 0) {
sys/geom/union/g_union.c
739
bp->bio_flags &= ~BIO_DONE;
sys/geom/union/g_union.c
740
bp->bio_offset += len2wt;
sys/geom/union/g_union.c
741
bp->bio_length = savelen - len2wt;
sys/geom/union/g_union.c
763
g_free(bp->bio_data);
sys/geom/union/g_union.c
764
g_destroy_bio(bp);
sys/geom/union/g_union.c
799
g_union_start(struct bio *bp)
sys/geom/union/g_union.c
805
sc = bp->bio_to->geom->softc;
sys/geom/union/g_union.c
806
if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/geom/union/g_union.c
809
g_io_deliver(bp, ENOMEM);
sys/geom/union/g_union.c
813
wip->wip_bp = bp;
sys/geom/union/g_union.c
815
wip->wip_start = bp->bio_offset + sc->sc_offset;
sys/geom/union/g_union.c
816
wip->wip_end = wip->wip_start + bp->bio_length - 1;
sys/geom/union/g_union.c
828
cbp = g_clone_bio(bp);
sys/geom/union/g_union.c
830
g_io_deliver(bp, ENOMEM);
sys/geom/union/g_union.c
833
cbp->bio_offset = bp->bio_offset + sc->sc_offset;
sys/geom/union/g_union.c
847
g_union_kerneldump(bp, sc);
sys/geom/union/g_union.c
86
static void g_union_setmap(struct bio *bp, struct g_union_softc *sc);
sys/geom/union/g_union.c
87
static bool g_union_getmap(struct bio *bp, struct g_union_softc *sc,
sys/geom/union/g_union.c
89
static void g_union_done(struct bio *bp);
sys/geom/union/g_union.c
90
static void g_union_kerneldump(struct bio *bp, struct g_union_softc *sc);
sys/geom/union/g_union.h
43
#define G_UNION_LOGREQLVL(lvl, bp, ...) \
sys/geom/union/g_union.h
44
_GEOM_DEBUG("GEOM_UNION", g_union_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/union/g_union.h
45
#define G_UNION_LOGREQ(bp, ...) G_UNION_LOGREQLVL(3, (bp), __VA_ARGS__)
sys/geom/uzip/g_uzip.c
141
static void g_uzip_read_done(struct bio *bp);
sys/geom/uzip/g_uzip.c
142
static void g_uzip_do(struct g_uzip_softc *, struct bio *bp);
sys/geom/uzip/g_uzip.c
171
g_uzip_cached(struct g_geom *gp, struct bio *bp)
sys/geom/uzip/g_uzip.c
178
ofs = bp->bio_offset + bp->bio_completed;
sys/geom/uzip/g_uzip.c
184
if (bp->bio_resid < usz)
sys/geom/uzip/g_uzip.c
185
usz = bp->bio_resid;
sys/geom/uzip/g_uzip.c
186
memcpy(bp->bio_data + bp->bio_completed, sc->last_buf + blkofs,
sys/geom/uzip/g_uzip.c
192
"from cache\n", __func__, gp->name, bp, (intmax_t)ofs,
sys/geom/uzip/g_uzip.c
195
bp->bio_completed += usz;
sys/geom/uzip/g_uzip.c
196
bp->bio_resid -= usz;
sys/geom/uzip/g_uzip.c
198
if (bp->bio_resid == 0) {
sys/geom/uzip/g_uzip.c
199
g_io_deliver(bp, 0);
sys/geom/uzip/g_uzip.c
217
#define TLEN_2_BLEN(sc, pp, bp, ei) roundup(BLK_ENDS((sc), (ei)) - \
sys/geom/uzip/g_uzip.c
218
(bp)->bio_offset, (pp)->sectorsize)
sys/geom/uzip/g_uzip.c
221
g_uzip_request(struct g_geom *gp, struct bio *bp)
sys/geom/uzip/g_uzip.c
230
if (g_uzip_cached(gp, bp) != 0)
sys/geom/uzip/g_uzip.c
238
ofs = bp->bio_offset + bp->bio_completed;
sys/geom/uzip/g_uzip.c
241
end_blk = howmany(ofs + bp->bio_resid, sc->blksz);
sys/geom/uzip/g_uzip.c
247
zsize = MIN(sc->blksz - start_blk_ofs, bp->bio_resid);
sys/geom/uzip/g_uzip.c
250
(uintmax_t)bp->bio_completed, (uintmax_t)zsize));
sys/geom/uzip/g_uzip.c
251
bzero(bp->bio_data + bp->bio_completed, zsize);
sys/geom/uzip/g_uzip.c
252
bp->bio_completed += zsize;
sys/geom/uzip/g_uzip.c
253
bp->bio_resid -= zsize;
sys/geom/uzip/g_uzip.c
258
KASSERT(bp->bio_resid == 0, ("bp->bio_resid is invalid"));
sys/geom/uzip/g_uzip.c
264
(uintmax_t)bp->bio_completed));
sys/geom/uzip/g_uzip.c
265
g_io_deliver(bp, 0);
sys/geom/uzip/g_uzip.c
278
"start=%u (%ju[%jd]), end=%u (%ju)\n", __func__, gp->name, bp,
sys/geom/uzip/g_uzip.c
283
bp2 = g_clone_bio(bp);
sys/geom/uzip/g_uzip.c
285
g_io_deliver(bp, ENOMEM);
sys/geom/uzip/g_uzip.c
309
g_io_deliver(bp, ENOMEM);
sys/geom/uzip/g_uzip.c
314
"reading %jd bytes from offset %jd\n", __func__, gp->name, bp,
sys/geom/uzip/g_uzip.c
322
g_uzip_read_done(struct bio *bp)
sys/geom/uzip/g_uzip.c
328
bp2 = bp->bio_parent;
sys/geom/uzip/g_uzip.c
333
bioq_disksort(&sc->bio_queue, bp);
sys/geom/uzip/g_uzip.c
348
g_uzip_do(struct g_uzip_softc *sc, struct bio *bp)
sys/geom/uzip/g_uzip.c
359
bp2 = bp->bio_parent;
sys/geom/uzip/g_uzip.c
365
bp2->bio_error = bp->bio_error;
sys/geom/uzip/g_uzip.c
370
if (bp->bio_completed == 0) {
sys/geom/uzip/g_uzip.c
378
data = bp->bio_data + sc->toc[blk].offset % pp->sectorsize;
sys/geom/uzip/g_uzip.c
380
while (bp->bio_completed && bp2->bio_resid) {
sys/geom/uzip/g_uzip.c
391
bp->bio_completed, data2, (u_int)ulen, data, (u_int)len));
sys/geom/uzip/g_uzip.c
396
} else if (len <= bp->bio_completed) {
sys/geom/uzip/g_uzip.c
440
bp->bio_completed -= len;
sys/geom/uzip/g_uzip.c
447
free(bp->bio_data, M_GEOM_UZIP);
sys/geom/uzip/g_uzip.c
448
g_destroy_bio(bp);
sys/geom/uzip/g_uzip.c
456
g_uzip_start(struct bio *bp)
sys/geom/uzip/g_uzip.c
462
pp = bp->bio_to;
sys/geom/uzip/g_uzip.c
466
"buffer=%p\n", __func__, gp->name, bp, bp->bio_cmd,
sys/geom/uzip/g_uzip.c
467
(intmax_t)bp->bio_offset, (intmax_t)bp->bio_length, bp->bio_data));
sys/geom/uzip/g_uzip.c
472
if (bp->bio_cmd == BIO_GETATTR) {
sys/geom/uzip/g_uzip.c
479
if (strncmp(bp->bio_attribute, "MNT:", 4) == 0) {
sys/geom/uzip/g_uzip.c
480
bp2 = g_clone_bio(bp);
sys/geom/uzip/g_uzip.c
482
g_io_deliver(bp, ENOMEM);
sys/geom/uzip/g_uzip.c
486
pp = bp->bio_to;
sys/geom/uzip/g_uzip.c
493
if (bp->bio_cmd != BIO_READ) {
sys/geom/uzip/g_uzip.c
494
g_io_deliver(bp, EOPNOTSUPP);
sys/geom/uzip/g_uzip.c
498
bp->bio_resid = bp->bio_length;
sys/geom/uzip/g_uzip.c
499
bp->bio_completed = 0;
sys/geom/uzip/g_uzip.c
501
g_uzip_request(gp, bp);
sys/geom/uzip/g_uzip_wrkthr.c
45
struct bio *bp;
sys/geom/uzip/g_uzip_wrkthr.c
59
bp = bioq_takefirst(&sc->bio_queue);
sys/geom/uzip/g_uzip_wrkthr.c
60
if (!bp) {
sys/geom/uzip/g_uzip_wrkthr.c
66
sc->uzip_do(sc, bp);
sys/geom/virstor/g_virstor.h
51
#define LOG_REQ(lvl, bp, ...) \
sys/geom/virstor/g_virstor.h
52
_GEOM_DEBUG("GEOM_VIRSTOR", g_virstor_debug, (lvl), (bp), __VA_ARGS__)
sys/geom/zero/g_zero.c
101
bp->bio_resid = bp->bio_length;
sys/geom/zero/g_zero.c
102
offset = bp->bio_ma_offset & PAGE_MASK;
sys/geom/zero/g_zero.c
103
for (int i = 0; i < bp->bio_ma_n && bp->bio_resid > 0; i++) {
sys/geom/zero/g_zero.c
104
length = MIN(PAGE_SIZE - offset, bp->bio_resid);
sys/geom/zero/g_zero.c
107
(void)uiomove_fromphys(&bp->bio_ma[i], offset, length, &auio);
sys/geom/zero/g_zero.c
110
bp->bio_resid -= length;
sys/geom/zero/g_zero.c
116
g_zero_start(struct bio *bp)
sys/geom/zero/g_zero.c
120
switch (bp->bio_cmd) {
sys/geom/zero/g_zero.c
123
if ((bp->bio_flags & BIO_UNMAPPED) != 0)
sys/geom/zero/g_zero.c
124
g_zero_fill_pages(bp);
sys/geom/zero/g_zero.c
126
memset(bp->bio_data, g_zero_byte,
sys/geom/zero/g_zero.c
127
bp->bio_length);
sys/geom/zero/g_zero.c
132
bp->bio_completed = bp->bio_length;
sys/geom/zero/g_zero.c
140
g_io_deliver(bp, error);
sys/geom/zero/g_zero.c
79
g_zero_fill_pages(struct bio *bp)
sys/i386/i386/exec_machdep.c
1389
u_int32_t bp; /* breakpoint bits extracted from dr6 */
sys/i386/i386/exec_machdep.c
1394
bp = dr6 & DBREG_DR6_BMASK;
sys/i386/i386/exec_machdep.c
1395
if (bp == 0) {
sys/i386/i386/exec_machdep.c
1420
if (bp & 0x01) {
sys/i386/i386/exec_machdep.c
1423
if (bp & 0x02) {
sys/i386/i386/exec_machdep.c
1426
if (bp & 0x04) {
sys/i386/i386/exec_machdep.c
1429
if (bp & 0x08) {
sys/kern/kern_conf.c
297
dead_strategy(struct bio *bp)
sys/kern/kern_conf.c
300
biofinish(bp, NULL, ENXIO);
sys/kern/kern_conf.c
333
no_strategy(struct bio *bp)
sys/kern/kern_conf.c
336
biofinish(bp, NULL, ENODEV);
sys/kern/kern_conf.c
395
giant_strategy(struct bio *bp)
sys/kern/kern_conf.c
401
dev = bp->bio_dev;
sys/kern/kern_conf.c
404
biofinish(bp, NULL, ENXIO);
sys/kern/kern_conf.c
408
dsw->d_gianttrick->d_strategy(bp);
sys/kern/kern_physio.c
130
g_reset_bio(bp);
sys/kern/kern_physio.c
133
bp->bio_cmd = BIO_READ;
sys/kern/kern_physio.c
137
bp->bio_cmd = BIO_WRITE;
sys/kern/kern_physio.c
141
bp->bio_offset = uio->uio_offset;
sys/kern/kern_physio.c
143
bp->bio_length = uio->uio_iov[i].iov_len;
sys/kern/kern_physio.c
144
if (bp->bio_length > dev->si_iosize_max)
sys/kern/kern_physio.c
145
bp->bio_length = dev->si_iosize_max;
sys/kern/kern_physio.c
146
if (bp->bio_length > maxphys)
sys/kern/kern_physio.c
147
bp->bio_length = maxphys;
sys/kern/kern_physio.c
148
bp->bio_bcount = bp->bio_length;
sys/kern/kern_physio.c
149
bp->bio_dev = dev;
sys/kern/kern_physio.c
154
(vm_offset_t)base, bp->bio_length,
sys/kern/kern_physio.c
163
bp->bio_data = sa + poff;
sys/kern/kern_physio.c
165
bp->bio_ma = pages;
sys/kern/kern_physio.c
166
bp->bio_ma_n = npages;
sys/kern/kern_physio.c
167
bp->bio_ma_offset = poff;
sys/kern/kern_physio.c
168
bp->bio_data = unmapped_buf;
sys/kern/kern_physio.c
169
bp->bio_flags |= BIO_UNMAPPED;
sys/kern/kern_physio.c
172
bp->bio_data = base;
sys/kern/kern_physio.c
174
csw->d_strategy(bp);
sys/kern/kern_physio.c
176
biowait(bp, "physrd");
sys/kern/kern_physio.c
178
biowait(bp, "physwr");
sys/kern/kern_physio.c
186
iolen = bp->bio_length - bp->bio_resid;
sys/kern/kern_physio.c
187
if (iolen == 0 && !(bp->bio_flags & BIO_ERROR))
sys/kern/kern_physio.c
194
if (bp->bio_flags & BIO_ERROR) {
sys/kern/kern_physio.c
195
error = bp->bio_error;
sys/kern/kern_physio.c
205
g_destroy_bio(bp);
sys/kern/kern_physio.c
44
struct bio *bp;
sys/kern/kern_physio.c
90
bp = g_alloc_bio();
sys/kern/kern_racct.c
418
racct_add_buf(struct proc *p, const struct buf *bp, int is_write)
sys/kern/kern_racct.c
424
SDT_PROBE3(racct, , rusage, add__buf, p, bp, is_write);
sys/kern/kern_racct.c
428
racct_add_locked(curproc, RACCT_WRITEBPS, bp->b_bcount, 1);
sys/kern/kern_racct.c
431
racct_add_locked(curproc, RACCT_READBPS, bp->b_bcount, 1);
sys/kern/subr_devstat.c
244
devstat_start_transaction_bio(struct devstat *ds, struct bio *bp)
sys/kern/subr_devstat.c
251
binuptime(&bp->bio_t0);
sys/kern/subr_devstat.c
252
devstat_start_transaction_bio_t0(ds, bp);
sys/kern/subr_devstat.c
256
devstat_start_transaction_bio_t0(struct devstat *ds, struct bio *bp)
sys/kern/subr_devstat.c
263
devstat_start_transaction(ds, &bp->bio_t0);
sys/kern/subr_devstat.c
339
devstat_end_transaction_bio(struct devstat *ds, const struct bio *bp)
sys/kern/subr_devstat.c
342
devstat_end_transaction_bio_bt(ds, bp, NULL);
sys/kern/subr_devstat.c
346
devstat_end_transaction_bio_bt(struct devstat *ds, const struct bio *bp,
sys/kern/subr_devstat.c
356
if (bp->bio_flags & BIO_ORDERED)
sys/kern/subr_devstat.c
360
if (bp->bio_cmd == BIO_DELETE)
sys/kern/subr_devstat.c
362
else if ((bp->bio_cmd == BIO_READ)
sys/kern/subr_devstat.c
363
|| ((bp->bio_cmd == BIO_ZONE)
sys/kern/subr_devstat.c
364
&& (bp->bio_zone.zone_cmd == DISK_ZONE_REPORT_ZONES)))
sys/kern/subr_devstat.c
366
else if (bp->bio_cmd == BIO_WRITE)
sys/kern/subr_devstat.c
371
devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid,
sys/kern/subr_devstat.c
372
tag, flg, now, &bp->bio_t0);
sys/kern/subr_devstat.c
57
#define DTRACE_DEVSTAT_BIO_START() SDT_PROBE2(io, , , start, bp, ds)
sys/kern/subr_devstat.c
58
#define DTRACE_DEVSTAT_BIO_DONE() SDT_PROBE2(io, , , done, bp, ds)
sys/kern/subr_disk.c
163
bioq_remove(struct bio_queue_head *head, struct bio *bp)
sys/kern/subr_disk.c
167
if (bp == TAILQ_FIRST(&head->queue))
sys/kern/subr_disk.c
168
head->last_offset = bp->bio_offset + bp->bio_length;
sys/kern/subr_disk.c
169
} else if (bp == head->insert_point)
sys/kern/subr_disk.c
172
TAILQ_REMOVE(&head->queue, bp, bio_queue);
sys/kern/subr_disk.c
181
struct bio *bp;
sys/kern/subr_disk.c
183
while ((bp = bioq_takefirst(head)) != NULL)
sys/kern/subr_disk.c
184
biofinish(bp, stp, error);
sys/kern/subr_disk.c
188
bioq_insert_head(struct bio_queue_head *head, struct bio *bp)
sys/kern/subr_disk.c
192
head->last_offset = bp->bio_offset;
sys/kern/subr_disk.c
193
TAILQ_INSERT_HEAD(&head->queue, bp, bio_queue);
sys/kern/subr_disk.c
199
bioq_insert_tail(struct bio_queue_head *head, struct bio *bp)
sys/kern/subr_disk.c
202
TAILQ_INSERT_TAIL(&head->queue, bp, bio_queue);
sys/kern/subr_disk.c
205
head->insert_point = bp;
sys/kern/subr_disk.c
206
head->last_offset = bp->bio_offset;
sys/kern/subr_disk.c
219
struct bio *bp;
sys/kern/subr_disk.c
221
bp = TAILQ_FIRST(&head->queue);
sys/kern/subr_disk.c
222
if (bp != NULL)
sys/kern/subr_disk.c
223
bioq_remove(head, bp);
sys/kern/subr_disk.c
224
return (bp);
sys/kern/subr_disk.c
233
bioq_bio_key(struct bio_queue_head *head, struct bio *bp)
sys/kern/subr_disk.c
236
return ((uoff_t)(bp->bio_offset - head->last_offset));
sys/kern/subr_disk.c
247
bioq_disksort(struct bio_queue_head *head, struct bio *bp)
sys/kern/subr_disk.c
252
if ((bp->bio_flags & BIO_ORDERED) != 0) {
sys/kern/subr_disk.c
259
bioq_insert_tail(head, bp);
sys/kern/subr_disk.c
268
if (bp->bio_cmd != BIO_READ && bp->bio_cmd != BIO_WRITE &&
sys/kern/subr_disk.c
269
bp->bio_cmd != BIO_DELETE) {
sys/kern/subr_disk.c
270
bioq_insert_tail(head, bp);
sys/kern/subr_disk.c
275
bioq_insert_tail(head, bp);
sys/kern/subr_disk.c
280
key = bioq_bio_key(head, bp);
sys/kern/subr_disk.c
294
TAILQ_INSERT_HEAD(&head->queue, bp, bio_queue);
sys/kern/subr_disk.c
296
TAILQ_INSERT_AFTER(&head->queue, prev, bp, bio_queue);
sys/kern/subr_disk.c
39
disk_err(struct bio *bp, const char *what, int blkdone, int nl)
sys/kern/subr_disk.c
43
if (bp->bio_dev != NULL)
sys/kern/subr_disk.c
44
printf("%s: %s ", devtoname(bp->bio_dev), what);
sys/kern/subr_disk.c
45
else if (bp->bio_disk != NULL)
sys/kern/subr_disk.c
47
bp->bio_disk->d_name, bp->bio_disk->d_unit, what);
sys/kern/subr_disk.c
50
switch(bp->bio_cmd) {
sys/kern/subr_disk.c
56
default: printf("cmd=%x ", bp->bio_cmd); break;
sys/kern/subr_disk.c
58
sn = bp->bio_pblkno;
sys/kern/subr_disk.c
59
if (bp->bio_bcount <= DEV_BSIZE) {
sys/kern/subr_disk.c
67
printf("%jd-%jd", (intmax_t)bp->bio_pblkno,
sys/kern/subr_disk.c
68
(intmax_t)(bp->bio_pblkno + (bp->bio_bcount - 1) / DEV_BSIZE));
sys/kern/subr_msan.c
561
kmsan_mark_bio(const struct bio *bp, uint8_t c)
sys/kern/subr_msan.c
563
kmsan_mark(bp->bio_data, bp->bio_length, c);
sys/kern/subr_msan.c
583
kmsan_check_bio(const struct bio *bp, const char *descr)
sys/kern/subr_msan.c
585
kmsan_shadow_check((uintptr_t)bp->bio_data, bp->bio_length, descr);
sys/kern/subr_prf.c
1087
char buf[128], *bp;
sys/kern/subr_prf.c
1107
bp = memchr(buf, '\n', len);
sys/kern/subr_prf.c
1108
if (bp == NULL) {
sys/kern/subr_prf.c
1113
bp++;
sys/kern/subr_prf.c
1114
len -= bp - buf;
sys/kern/subr_prf.c
1120
bp = buf;
sys/kern/subr_prf.c
1121
error = sysctl_handle_opaque(oidp, bp, len, req);
sys/kern/subr_sglist.c
334
sglist_append_bio(struct sglist *sg, struct bio *bp)
sys/kern/subr_sglist.c
338
if ((bp->bio_flags & BIO_UNMAPPED) == 0)
sys/kern/subr_sglist.c
339
error = sglist_append(sg, bp->bio_data, bp->bio_bcount);
sys/kern/subr_sglist.c
341
error = sglist_append_vmpages(sg, bp->bio_ma,
sys/kern/subr_sglist.c
342
bp->bio_ma_offset, bp->bio_bcount);
sys/kern/vfs_aio.c
1296
struct bio *bp;
sys/kern/vfs_aio.c
1305
bp = bios[i];
sys/kern/vfs_aio.c
1318
bp->bio_length = nbytes;
sys/kern/vfs_aio.c
1319
bp->bio_bcount = nbytes;
sys/kern/vfs_aio.c
1320
bp->bio_done = aio_biowakeup;
sys/kern/vfs_aio.c
1321
bp->bio_offset = offset;
sys/kern/vfs_aio.c
1322
bp->bio_cmd = bio_cmd;
sys/kern/vfs_aio.c
1323
bp->bio_dev = dev;
sys/kern/vfs_aio.c
1324
bp->bio_caller1 = job;
sys/kern/vfs_aio.c
1325
bp->bio_caller2 = pbuf;
sys/kern/vfs_aio.c
1331
(vm_offset_t)buf, bp->bio_length, prot, pages,
sys/kern/vfs_aio.c
1339
g_destroy_bio(bp);
sys/kern/vfs_aio.c
1345
bp->bio_data = pbuf->b_data + poff;
sys/kern/vfs_aio.c
1349
bp->bio_ma = pages;
sys/kern/vfs_aio.c
1350
bp->bio_ma_n = npages;
sys/kern/vfs_aio.c
1351
bp->bio_ma_offset = poff;
sys/kern/vfs_aio.c
1352
bp->bio_data = unmapped_buf;
sys/kern/vfs_aio.c
1353
bp->bio_flags |= BIO_UNMAPPED;
sys/kern/vfs_aio.c
2456
aio_biocleanup(struct bio *bp)
sys/kern/vfs_aio.c
2458
struct kaiocb *job = (struct kaiocb *)bp->bio_caller1;
sys/kern/vfs_aio.c
2460
struct buf *pbuf = (struct buf *)bp->bio_caller2;
sys/kern/vfs_aio.c
2474
MPASS(bp->bio_ma_n <= atop(maxphys) + 1);
sys/kern/vfs_aio.c
2475
vm_page_unhold_pages(bp->bio_ma, bp->bio_ma_n);
sys/kern/vfs_aio.c
2476
free(bp->bio_ma, M_TEMP);
sys/kern/vfs_aio.c
2479
g_destroy_bio(bp);
sys/kern/vfs_aio.c
2483
aio_biowakeup(struct bio *bp)
sys/kern/vfs_aio.c
2485
struct kaiocb *job = (struct kaiocb *)bp->bio_caller1;
sys/kern/vfs_aio.c
2487
long bcount = bp->bio_bcount;
sys/kern/vfs_aio.c
2488
long resid = bp->bio_resid;
sys/kern/vfs_aio.c
2490
int abio_error = bp->bio_error;
sys/kern/vfs_aio.c
2491
uint16_t flags = bp->bio_flags;
sys/kern/vfs_aio.c
2495
aio_biocleanup(bp);
sys/kern/vfs_aio.c
304
static void aio_biocleanup(struct bio *bp);
sys/kern/vfs_aio.c
316
static void aio_biowakeup(struct bio *bp);
sys/kern/vfs_bio.c
1000
bp->b_flags &= ~B_CACHE;
sys/kern/vfs_bio.c
1216
struct buf *bp;
sys/kern/vfs_bio.c
1235
bp = nbufp(i);
sys/kern/vfs_bio.c
1236
bzero(bp, sizeof(*bp) + sizeof(vm_page_t) * atop(maxbcachebuf));
sys/kern/vfs_bio.c
1237
bp->b_flags = B_INVAL;
sys/kern/vfs_bio.c
1238
bp->b_rcred = NOCRED;
sys/kern/vfs_bio.c
1239
bp->b_wcred = NOCRED;
sys/kern/vfs_bio.c
1240
bp->b_qindex = QUEUE_NONE;
sys/kern/vfs_bio.c
1241
bp->b_domain = -1;
sys/kern/vfs_bio.c
1242
bp->b_subqueue = mp_maxid + 1;
sys/kern/vfs_bio.c
1243
bp->b_xflags = 0;
sys/kern/vfs_bio.c
1244
bp->b_data = bp->b_kvabase = unmapped_buf;
sys/kern/vfs_bio.c
1245
LIST_INIT(&bp->b_dep);
sys/kern/vfs_bio.c
1246
BUF_LOCKINIT(bp, buf_wmesg);
sys/kern/vfs_bio.c
1247
bq_insert(&bqempty, bp, false);
sys/kern/vfs_bio.c
1364
vfs_buf_check_mapped(struct buf *bp)
sys/kern/vfs_bio.c
1367
KASSERT(bp->b_kvabase != unmapped_buf,
sys/kern/vfs_bio.c
1368
("mapped buf: b_kvabase was not updated %p", bp));
sys/kern/vfs_bio.c
1369
KASSERT(bp->b_data != unmapped_buf,
sys/kern/vfs_bio.c
1370
("mapped buf: b_data was not updated %p", bp));
sys/kern/vfs_bio.c
1371
KASSERT(bp->b_data < unmapped_buf || bp->b_data >= unmapped_buf +
sys/kern/vfs_bio.c
1372
maxphys, ("b_data + b_offset unmapped %p", bp));
sys/kern/vfs_bio.c
1376
vfs_buf_check_unmapped(struct buf *bp)
sys/kern/vfs_bio.c
1379
KASSERT(bp->b_data == unmapped_buf,
sys/kern/vfs_bio.c
1380
("unmapped buf: corrupted b_data %p", bp));
sys/kern/vfs_bio.c
1383
#define BUF_CHECK_MAPPED(bp) vfs_buf_check_mapped(bp)
sys/kern/vfs_bio.c
1384
#define BUF_CHECK_UNMAPPED(bp) vfs_buf_check_unmapped(bp)
sys/kern/vfs_bio.c
1386
#define BUF_CHECK_MAPPED(bp) do {} while (0)
sys/kern/vfs_bio.c
1387
#define BUF_CHECK_UNMAPPED(bp) do {} while (0)
sys/kern/vfs_bio.c
1391
isbufbusy(struct buf *bp)
sys/kern/vfs_bio.c
1393
if (((bp->b_flags & B_INVAL) == 0 && BUF_ISLOCKED(bp)) ||
sys/kern/vfs_bio.c
1394
((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI))
sys/kern/vfs_bio.c
1406
struct buf *bp;
sys/kern/vfs_bio.c
1426
bp = nbufp(i);
sys/kern/vfs_bio.c
1427
if (isbufbusy(bp))
sys/kern/vfs_bio.c
1470
bp = nbufp(i);
sys/kern/vfs_bio.c
1471
if (isbufbusy(bp)) {
sys/kern/vfs_bio.c
1474
if (bp->b_dev == NULL) {
sys/kern/vfs_bio.c
1476
bp->b_vp->v_mount, mnt_list);
sys/kern/vfs_bio.c
1484
nbusy, bp, bp->b_vp, bp->b_flags,
sys/kern/vfs_bio.c
1485
(intmax_t)bp->b_blkno,
sys/kern/vfs_bio.c
1486
(intmax_t)bp->b_lblkno);
sys/kern/vfs_bio.c
1487
BUF_LOCKPRINTINFO(bp);
sys/kern/vfs_bio.c
1489
vn_printf(bp->b_vp,
sys/kern/vfs_bio.c
1530
bpmap_qenter(struct buf *bp)
sys/kern/vfs_bio.c
1533
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
1539
bp->b_data = (caddr_t)trunc_page((vm_offset_t)bp->b_data);
sys/kern/vfs_bio.c
1540
pmap_qenter((vm_offset_t)bp->b_data, bp->b_pages, bp->b_npages);
sys/kern/vfs_bio.c
1541
bp->b_data = (caddr_t)((vm_offset_t)bp->b_data |
sys/kern/vfs_bio.c
1542
(vm_offset_t)(bp->b_offset & PAGE_MASK));
sys/kern/vfs_bio.c
1546
bufdomain(struct buf *bp)
sys/kern/vfs_bio.c
1549
return (&bdomain[bp->b_domain]);
sys/kern/vfs_bio.c
1553
bufqueue(struct buf *bp)
sys/kern/vfs_bio.c
1556
switch (bp->b_qindex) {
sys/kern/vfs_bio.c
1564
return (&bufdomain(bp)->bd_dirtyq);
sys/kern/vfs_bio.c
1566
return (&bufdomain(bp)->bd_subq[bp->b_subqueue]);
sys/kern/vfs_bio.c
1570
panic("bufqueue(%p): Unhandled type %d\n", bp, bp->b_qindex);
sys/kern/vfs_bio.c
1577
bufqueue_acquire(struct buf *bp)
sys/kern/vfs_bio.c
1586
bq = bufqueue(bp);
sys/kern/vfs_bio.c
1589
nbq = bufqueue(bp);
sys/kern/vfs_bio.c
1606
binsfree(struct buf *bp, int qindex)
sys/kern/vfs_bio.c
1613
BUF_ASSERT_XLOCKED(bp);
sys/kern/vfs_bio.c
1618
if (bp->b_flags & B_REMFREE) {
sys/kern/vfs_bio.c
1619
if (bp->b_qindex == qindex) {
sys/kern/vfs_bio.c
1620
bp->b_flags |= B_REUSE;
sys/kern/vfs_bio.c
1621
bp->b_flags &= ~B_REMFREE;
sys/kern/vfs_bio.c
1622
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
1625
bq = bufqueue_acquire(bp);
sys/kern/vfs_bio.c
1626
bq_remove(bq, bp);
sys/kern/vfs_bio.c
1629
bd = bufdomain(bp);
sys/kern/vfs_bio.c
1637
bq_insert(bq, bp, true);
sys/kern/vfs_bio.c
1646
buf_free(struct buf *bp)
sys/kern/vfs_bio.c
1649
if (bp->b_flags & B_REMFREE)
sys/kern/vfs_bio.c
1650
bremfreef(bp);
sys/kern/vfs_bio.c
1651
if (bp->b_vflags & BV_BKGRDINPROG)
sys/kern/vfs_bio.c
1653
if (bp->b_rcred != NOCRED) {
sys/kern/vfs_bio.c
1654
crfree(bp->b_rcred);
sys/kern/vfs_bio.c
1655
bp->b_rcred = NOCRED;
sys/kern/vfs_bio.c
1657
if (bp->b_wcred != NOCRED) {
sys/kern/vfs_bio.c
1658
crfree(bp->b_wcred);
sys/kern/vfs_bio.c
1659
bp->b_wcred = NOCRED;
sys/kern/vfs_bio.c
1661
if (!LIST_EMPTY(&bp->b_dep))
sys/kern/vfs_bio.c
1662
buf_deallocate(bp);
sys/kern/vfs_bio.c
1663
bufkva_free(bp);
sys/kern/vfs_bio.c
1664
atomic_add_int(&bufdomain(bp)->bd_freebuffers, 1);
sys/kern/vfs_bio.c
1665
MPASS((bp->b_flags & B_MAXPHYS) == 0);
sys/kern/vfs_bio.c
1666
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
1667
uma_zfree(buf_zone, bp);
sys/kern/vfs_bio.c
1681
struct buf *bp;
sys/kern/vfs_bio.c
1686
bp = TAILQ_FIRST(&bqempty.bq_queue);
sys/kern/vfs_bio.c
1687
if (bp == NULL)
sys/kern/vfs_bio.c
1689
bq_remove(&bqempty, bp);
sys/kern/vfs_bio.c
1690
store[i] = bp;
sys/kern/vfs_bio.c
1706
struct buf *bp;
sys/kern/vfs_bio.c
171
static void vm_hold_free_pages(struct buf *bp, int newbsize);
sys/kern/vfs_bio.c
1712
bp = store[i];
sys/kern/vfs_bio.c
1714
TAILQ_INSERT_TAIL(&bq->bq_queue, bp, b_freelist);
sys/kern/vfs_bio.c
1715
bp->b_flags &= ~(B_AGE | B_REUSE);
sys/kern/vfs_bio.c
1717
bp->b_qindex = bq->bq_index;
sys/kern/vfs_bio.c
172
static void vm_hold_load_pages(struct buf *bp, vm_offset_t from,
sys/kern/vfs_bio.c
1730
struct buf *bp;
sys/kern/vfs_bio.c
1738
bp = NULL;
sys/kern/vfs_bio.c
174
static void vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, vm_page_t m);
sys/kern/vfs_bio.c
1741
bp = uma_zalloc(buf_zone, M_NOWAIT);
sys/kern/vfs_bio.c
1742
if (bp == NULL) {
sys/kern/vfs_bio.c
175
static void vfs_page_set_validclean(struct buf *bp, vm_ooffset_t off,
sys/kern/vfs_bio.c
1754
error = BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWITNESS, NULL);
sys/kern/vfs_bio.c
1755
KASSERT(error == 0, ("%s: BUF_LOCK on free buf %p: %d.", __func__, bp,
sys/kern/vfs_bio.c
1759
KASSERT(bp->b_vp == NULL,
sys/kern/vfs_bio.c
1760
("bp: %p still has vnode %p.", bp, bp->b_vp));
sys/kern/vfs_bio.c
1761
KASSERT((bp->b_flags & (B_DELWRI | B_NOREUSE)) == 0,
sys/kern/vfs_bio.c
1762
("invalid buffer %p flags %#x", bp, bp->b_flags));
sys/kern/vfs_bio.c
1763
KASSERT((bp->b_xflags & (BX_VNCLEAN|BX_VNDIRTY)) == 0,
sys/kern/vfs_bio.c
1764
("bp: %p still on a buffer list. xflags %X", bp, bp->b_xflags));
sys/kern/vfs_bio.c
1765
KASSERT(bp->b_npages == 0,
sys/kern/vfs_bio.c
1766
("bp: %p still has %d vm pages\n", bp, bp->b_npages));
sys/kern/vfs_bio.c
1767
KASSERT(bp->b_kvasize == 0, ("bp: %p still has kva\n", bp));
sys/kern/vfs_bio.c
1768
KASSERT(bp->b_bufsize == 0, ("bp: %p still has bufspace\n", bp));
sys/kern/vfs_bio.c
1769
MPASS((bp->b_flags & B_MAXPHYS) == 0);
sys/kern/vfs_bio.c
177
static void vfs_clean_pages_dirty_buf(struct buf *bp);
sys/kern/vfs_bio.c
1771
bp->b_domain = BD_DOMAIN(bd);
sys/kern/vfs_bio.c
1772
bp->b_flags = 0;
sys/kern/vfs_bio.c
1773
bp->b_ioflags = 0;
sys/kern/vfs_bio.c
1774
bp->b_xflags = 0;
sys/kern/vfs_bio.c
1775
bp->b_vflags = 0;
sys/kern/vfs_bio.c
1776
bp->b_vp = NULL;
sys/kern/vfs_bio.c
1777
bp->b_blkno = bp->b_lblkno = 0;
sys/kern/vfs_bio.c
1778
bp->b_offset = NOOFFSET;
sys/kern/vfs_bio.c
1779
bp->b_iodone = 0;
sys/kern/vfs_bio.c
178
static void vfs_setdirty_range(struct buf *bp);
sys/kern/vfs_bio.c
1780
bp->b_resid = 0;
sys/kern/vfs_bio.c
1781
bp->b_bcount = 0;
sys/kern/vfs_bio.c
1782
bp->b_npages = 0;
sys/kern/vfs_bio.c
1783
bp->b_dirtyoff = bp->b_dirtyend = 0;
sys/kern/vfs_bio.c
1784
bp->b_bufobj = NULL;
sys/kern/vfs_bio.c
1785
bp->b_data = bp->b_kvabase = unmapped_buf;
sys/kern/vfs_bio.c
1786
bp->b_fsprivate1 = NULL;
sys/kern/vfs_bio.c
1787
bp->b_fsprivate2 = NULL;
sys/kern/vfs_bio.c
1788
bp->b_fsprivate3 = NULL;
sys/kern/vfs_bio.c
1789
exterr_clear(&bp->b_exterr);
sys/kern/vfs_bio.c
179
static void vfs_vmio_invalidate(struct buf *bp);
sys/kern/vfs_bio.c
1790
LIST_INIT(&bp->b_dep);
sys/kern/vfs_bio.c
1792
return (bp);
sys/kern/vfs_bio.c
180
static void vfs_vmio_truncate(struct buf *bp, int npages);
sys/kern/vfs_bio.c
1806
struct buf *bp, *nbp;
sys/kern/vfs_bio.c
181
static void vfs_vmio_extend(struct buf *bp, int npages, int size);
sys/kern/vfs_bio.c
1821
while ((bp = nbp) != NULL) {
sys/kern/vfs_bio.c
1826
nbp = TAILQ_NEXT(bp, b_freelist);
sys/kern/vfs_bio.c
1832
if (kva && bp->b_kvasize == 0)
sys/kern/vfs_bio.c
1835
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0)
sys/kern/vfs_bio.c
1842
if ((bp->b_flags & B_REUSE) != 0) {
sys/kern/vfs_bio.c
1843
TAILQ_REMOVE(&bq->bq_queue, bp, b_freelist);
sys/kern/vfs_bio.c
1844
TAILQ_INSERT_TAIL(&bq->bq_queue, bp, b_freelist);
sys/kern/vfs_bio.c
1845
bp->b_flags &= ~B_REUSE;
sys/kern/vfs_bio.c
1846
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
1853
if ((bp->b_vflags & BV_BKGRDINPROG) != 0) {
sys/kern/vfs_bio.c
1854
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
1858
KASSERT(bp->b_qindex == QUEUE_CLEAN,
sys/kern/vfs_bio.c
1860
bp->b_qindex, bp));
sys/kern/vfs_bio.c
1861
KASSERT(bp->b_domain == BD_DOMAIN(bd),
sys/kern/vfs_bio.c
1863
bp->b_domain, (int)BD_DOMAIN(bd)));
sys/kern/vfs_bio.c
1868
bq_remove(bq, bp);
sys/kern/vfs_bio.c
1875
if ((bp->b_vflags & BV_BKGRDERR) != 0) {
sys/kern/vfs_bio.c
1876
bqrelse(bp);
sys/kern/vfs_bio.c
1881
bp->b_flags |= B_INVAL;
sys/kern/vfs_bio.c
1882
brelse(bp);
sys/kern/vfs_bio.c
1898
bremfree(struct buf *bp)
sys/kern/vfs_bio.c
1901
CTR3(KTR_BUF, "bremfree(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
1902
KASSERT((bp->b_flags & B_REMFREE) == 0,
sys/kern/vfs_bio.c
1903
("bremfree: buffer %p already marked for delayed removal.", bp));
sys/kern/vfs_bio.c
1904
KASSERT(bp->b_qindex != QUEUE_NONE,
sys/kern/vfs_bio.c
1905
("bremfree: buffer %p not on a queue.", bp));
sys/kern/vfs_bio.c
1906
BUF_ASSERT_XLOCKED(bp);
sys/kern/vfs_bio.c
1908
bp->b_flags |= B_REMFREE;
sys/kern/vfs_bio.c
1918
bremfreef(struct buf *bp)
sys/kern/vfs_bio.c
1922
bq = bufqueue_acquire(bp);
sys/kern/vfs_bio.c
1923
bq_remove(bq, bp);
sys/kern/vfs_bio.c
1962
bq_remove(struct bufqueue *bq, struct buf *bp)
sys/kern/vfs_bio.c
1966
bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
1967
KASSERT(bp->b_qindex != QUEUE_NONE,
sys/kern/vfs_bio.c
1968
("bq_remove: buffer %p not on a queue.", bp));
sys/kern/vfs_bio.c
1969
KASSERT(bufqueue(bp) == bq,
sys/kern/vfs_bio.c
197
static void bq_remove(struct bufqueue *bq, struct buf *bp);
sys/kern/vfs_bio.c
1970
("bq_remove: Remove buffer %p from wrong queue.", bp));
sys/kern/vfs_bio.c
1973
if (bp->b_qindex != QUEUE_EMPTY) {
sys/kern/vfs_bio.c
1974
BUF_ASSERT_XLOCKED(bp);
sys/kern/vfs_bio.c
1977
("queue %d underflow", bp->b_qindex));
sys/kern/vfs_bio.c
1978
TAILQ_REMOVE(&bq->bq_queue, bp, b_freelist);
sys/kern/vfs_bio.c
198
static void bq_insert(struct bufqueue *bq, struct buf *bp, bool unlock);
sys/kern/vfs_bio.c
1980
bp->b_qindex = QUEUE_NONE;
sys/kern/vfs_bio.c
1981
bp->b_flags &= ~(B_REMFREE | B_REUSE);
sys/kern/vfs_bio.c
1987
struct buf *bp;
sys/kern/vfs_bio.c
1992
while ((bp = TAILQ_FIRST(&bq->bq_queue)) != NULL) {
sys/kern/vfs_bio.c
1993
TAILQ_REMOVE(&bq->bq_queue, bp, b_freelist);
sys/kern/vfs_bio.c
1994
TAILQ_INSERT_TAIL(&bd->bd_cleanq->bq_queue, bp,
sys/kern/vfs_bio.c
1996
bp->b_subqueue = bd->bd_cleanq->bq_subqueue;
sys/kern/vfs_bio.c
2033
bq_insert(struct bufqueue *bq, struct buf *bp, bool unlock)
sys/kern/vfs_bio.c
2037
if (bp->b_qindex != QUEUE_NONE)
sys/kern/vfs_bio.c
2038
panic("bq_insert: free buffer %p onto another queue?", bp);
sys/kern/vfs_bio.c
2040
bd = bufdomain(bp);
sys/kern/vfs_bio.c
2041
if (bp->b_flags & B_AGE) {
sys/kern/vfs_bio.c
2046
TAILQ_INSERT_HEAD(&bq->bq_queue, bp, b_freelist);
sys/kern/vfs_bio.c
2049
TAILQ_INSERT_TAIL(&bq->bq_queue, bp, b_freelist);
sys/kern/vfs_bio.c
2051
bp->b_flags &= ~(B_AGE | B_REUSE);
sys/kern/vfs_bio.c
2053
bp->b_qindex = bq->bq_index;
sys/kern/vfs_bio.c
2054
bp->b_subqueue = bq->bq_subqueue;
sys/kern/vfs_bio.c
2061
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
2063
if (bp->b_qindex == QUEUE_CLEAN) {
sys/kern/vfs_bio.c
2081
bufkva_free(struct buf *bp)
sys/kern/vfs_bio.c
2085
if (bp->b_kvasize == 0) {
sys/kern/vfs_bio.c
2086
KASSERT(bp->b_kvabase == unmapped_buf &&
sys/kern/vfs_bio.c
2087
bp->b_data == unmapped_buf,
sys/kern/vfs_bio.c
2088
("Leaked KVA space on %p", bp));
sys/kern/vfs_bio.c
2089
} else if (buf_mapped(bp))
sys/kern/vfs_bio.c
2090
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
2092
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
2094
if (bp->b_kvasize == 0)
sys/kern/vfs_bio.c
2097
vmem_free(buffer_arena, (vm_offset_t)bp->b_kvabase, bp->b_kvasize);
sys/kern/vfs_bio.c
2098
counter_u64_add(bufkvaspace, -bp->b_kvasize);
sys/kern/vfs_bio.c
2100
bp->b_data = bp->b_kvabase = unmapped_buf;
sys/kern/vfs_bio.c
2101
bp->b_kvasize = 0;
sys/kern/vfs_bio.c
2110
bufkva_alloc(struct buf *bp, int maxsize, int gbflags)
sys/kern/vfs_bio.c
2117
MPASS((bp->b_flags & B_MAXPHYS) == 0);
sys/kern/vfs_bio.c
2121
bufkva_free(bp);
sys/kern/vfs_bio.c
2132
bp->b_kvabase = (caddr_t)addr;
sys/kern/vfs_bio.c
2133
bp->b_kvasize = maxsize;
sys/kern/vfs_bio.c
2134
counter_u64_add(bufkvaspace, bp->b_kvasize);
sys/kern/vfs_bio.c
2136
bp->b_data = unmapped_buf;
sys/kern/vfs_bio.c
2137
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
2139
bp->b_data = bp->b_kvabase;
sys/kern/vfs_bio.c
2140
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
2239
struct buf *bp;
sys/kern/vfs_bio.c
2249
error = getblkx(vp, blkno, dblkno, size, 0, 0, flags, &bp);
sys/kern/vfs_bio.c
2254
KASSERT(blkno == bp->b_lblkno,
sys/kern/vfs_bio.c
2256
(intmax_t)bp->b_lblkno, (intmax_t)blkno));
sys/kern/vfs_bio.c
2258
*bpp = bp;
sys/kern/vfs_bio.c
2264
if ((bp->b_flags & B_CACHE) == 0) {
sys/kern/vfs_bio.c
2268
racct_add_buf(td->td_proc, bp, 0);
sys/kern/vfs_bio.c
2273
bp->b_iocmd = BIO_READ;
sys/kern/vfs_bio.c
2274
bp->b_flags &= ~B_INVAL;
sys/kern/vfs_bio.c
2276
bp->b_flags |= B_CKHASH;
sys/kern/vfs_bio.c
2277
bp->b_ckhashcalc = ckhashfunc;
sys/kern/vfs_bio.c
2280
bp->b_xflags |= BX_CVTENXIO;
sys/kern/vfs_bio.c
2281
bp->b_ioflags &= ~(BIO_ERROR | BIO_EXTERR);
sys/kern/vfs_bio.c
2282
if (bp->b_rcred == NOCRED && cred != NOCRED)
sys/kern/vfs_bio.c
2283
bp->b_rcred = crhold(cred);
sys/kern/vfs_bio.c
2284
vfs_busy_pages(bp, 0);
sys/kern/vfs_bio.c
2285
bp->b_iooffset = dbtob(bp->b_blkno);
sys/kern/vfs_bio.c
2286
bstrategy(bp);
sys/kern/vfs_bio.c
2297
rv = bufwait(bp);
sys/kern/vfs_bio.c
2299
brelse(bp);
sys/kern/vfs_bio.c
2318
bufwrite(struct buf *bp)
sys/kern/vfs_bio.c
2325
CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
2326
if ((bp->b_bufobj->bo_flag & BO_DEAD) != 0) {
sys/kern/vfs_bio.c
2327
bp->b_flags |= B_INVAL | B_RELBUF;
sys/kern/vfs_bio.c
2328
bp->b_flags &= ~B_CACHE;
sys/kern/vfs_bio.c
2329
brelse(bp);
sys/kern/vfs_bio.c
2332
if ((bp->b_flags & B_INVAL) != 0) {
sys/kern/vfs_bio.c
2333
brelse(bp);
sys/kern/vfs_bio.c
2337
if ((bp->b_flags & B_BARRIER) != 0)
sys/kern/vfs_bio.c
2340
oldflags = bp->b_flags;
sys/kern/vfs_bio.c
2342
KASSERT((bp->b_vflags & BV_BKGRDINPROG) == 0,
sys/kern/vfs_bio.c
2343
("FFS background buffer should not get here %p", bp));
sys/kern/vfs_bio.c
2345
vp = bp->b_vp;
sys/kern/vfs_bio.c
2354
bufobj_wref(bp->b_bufobj);
sys/kern/vfs_bio.c
2355
bundirty(bp);
sys/kern/vfs_bio.c
2357
bp->b_flags &= ~B_DONE;
sys/kern/vfs_bio.c
2358
bp->b_ioflags &= ~(BIO_ERROR | BIO_EXTERR);
sys/kern/vfs_bio.c
2359
bp->b_flags |= B_CACHE;
sys/kern/vfs_bio.c
2360
bp->b_iocmd = BIO_WRITE;
sys/kern/vfs_bio.c
2362
vfs_busy_pages(bp, 1);
sys/kern/vfs_bio.c
2367
space = runningbufclaim(bp, bp->b_bufsize);
sys/kern/vfs_bio.c
2372
racct_add_buf(curproc, bp, 1);
sys/kern/vfs_bio.c
2378
BUF_KERNPROC(bp);
sys/kern/vfs_bio.c
2379
bp->b_iooffset = dbtob(bp->b_blkno);
sys/kern/vfs_bio.c
2380
buf_track(bp, __func__);
sys/kern/vfs_bio.c
2381
bstrategy(bp);
sys/kern/vfs_bio.c
2384
retval = bufwait(bp);
sys/kern/vfs_bio.c
2385
brelse(bp);
sys/kern/vfs_bio.c
2402
bufbdflush(struct bufobj *bo, struct buf *bp)
sys/kern/vfs_bio.c
2409
(void) VOP_FSYNC(bp->b_vp, MNT_NOWAIT, curthread);
sys/kern/vfs_bio.c
2421
if (bp == nbp)
sys/kern/vfs_bio.c
2454
bdwrite(struct buf *bp)
sys/kern/vfs_bio.c
2460
CTR3(KTR_BUF, "bdwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
2461
KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
sys/kern/vfs_bio.c
2462
KASSERT((bp->b_flags & B_BARRIER) == 0,
sys/kern/vfs_bio.c
2463
("Barrier request in delayed write %p", bp));
sys/kern/vfs_bio.c
2465
if (bp->b_flags & B_INVAL) {
sys/kern/vfs_bio.c
2466
brelse(bp);
sys/kern/vfs_bio.c
2477
vp = bp->b_vp;
sys/kern/vfs_bio.c
2478
bo = bp->b_bufobj;
sys/kern/vfs_bio.c
2481
BO_BDFLUSH(bo, bp);
sys/kern/vfs_bio.c
2486
bdirty(bp);
sys/kern/vfs_bio.c
2491
bp->b_flags |= B_CACHE;
sys/kern/vfs_bio.c
2502
if (vp->v_type != VCHR && bp->b_lblkno == bp->b_blkno) {
sys/kern/vfs_bio.c
2503
VOP_BMAP(vp, bp->b_lblkno, NULL, &bp->b_blkno, NULL, NULL);
sys/kern/vfs_bio.c
2506
buf_track(bp, __func__);
sys/kern/vfs_bio.c
2519
vfs_clean_pages_dirty_buf(bp);
sys/kern/vfs_bio.c
2520
bqrelse(bp);
sys/kern/vfs_bio.c
2547
bdirty(struct buf *bp)
sys/kern/vfs_bio.c
2551
bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
2552
KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
sys/kern/vfs_bio.c
2553
KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE,
sys/kern/vfs_bio.c
2554
("bdirty: buffer %p still on queue %d", bp, bp->b_qindex));
sys/kern/vfs_bio.c
2555
bp->b_flags &= ~(B_RELBUF);
sys/kern/vfs_bio.c
2556
bp->b_iocmd = BIO_WRITE;
sys/kern/vfs_bio.c
2558
if ((bp->b_flags & B_DELWRI) == 0) {
sys/kern/vfs_bio.c
2559
bp->b_flags |= /* XXX B_DONE | */ B_DELWRI;
sys/kern/vfs_bio.c
2560
reassignbuf(bp);
sys/kern/vfs_bio.c
2561
bdirtyadd(bp);
sys/kern/vfs_bio.c
2577
bundirty(struct buf *bp)
sys/kern/vfs_bio.c
2580
CTR3(KTR_BUF, "bundirty(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
2581
KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
sys/kern/vfs_bio.c
2582
KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE,
sys/kern/vfs_bio.c
2583
("bundirty: buffer %p still on queue %d", bp, bp->b_qindex));
sys/kern/vfs_bio.c
2585
if (bp->b_flags & B_DELWRI) {
sys/kern/vfs_bio.c
2586
bp->b_flags &= ~B_DELWRI;
sys/kern/vfs_bio.c
2587
reassignbuf(bp);
sys/kern/vfs_bio.c
2588
bdirtysub(bp);
sys/kern/vfs_bio.c
2593
bp->b_flags &= ~B_DEFERRED;
sys/kern/vfs_bio.c
2606
bawrite(struct buf *bp)
sys/kern/vfs_bio.c
2609
bp->b_flags |= B_ASYNC;
sys/kern/vfs_bio.c
2610
(void) bwrite(bp);
sys/kern/vfs_bio.c
2623
babarrierwrite(struct buf *bp)
sys/kern/vfs_bio.c
2626
bp->b_flags |= B_ASYNC | B_BARRIER;
sys/kern/vfs_bio.c
2627
(void) bwrite(bp);
sys/kern/vfs_bio.c
2640
bbarrierwrite(struct buf *bp)
sys/kern/vfs_bio.c
2643
bp->b_flags |= B_BARRIER;
sys/kern/vfs_bio.c
2644
return (bwrite(bp));
sys/kern/vfs_bio.c
2688
brelse(struct buf *bp)
sys/kern/vfs_bio.c
2697
if (bp == NULL)
sys/kern/vfs_bio.c
2700
bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
2701
KASSERT(!(bp->b_flags & (B_CLUSTER|B_PAGING)),
sys/kern/vfs_bio.c
2702
("brelse: inappropriate B_PAGING or B_CLUSTER bp %p", bp));
sys/kern/vfs_bio.c
2703
KASSERT((bp->b_flags & B_VMIO) != 0 || (bp->b_flags & B_NOREUSE) == 0,
sys/kern/vfs_bio.c
2706
if (BUF_LOCKRECURSED(bp)) {
sys/kern/vfs_bio.c
2711
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
2715
if (bp->b_flags & B_MANAGED) {
sys/kern/vfs_bio.c
2716
bqrelse(bp);
sys/kern/vfs_bio.c
2720
if (LIST_EMPTY(&bp->b_dep)) {
sys/kern/vfs_bio.c
2721
bp->b_flags &= ~B_IOSTARTED;
sys/kern/vfs_bio.c
2723
KASSERT((bp->b_flags & B_IOSTARTED) == 0,
sys/kern/vfs_bio.c
2724
("brelse: SU io not finished bp %p", bp));
sys/kern/vfs_bio.c
2727
if ((bp->b_vflags & (BV_BKGRDINPROG | BV_BKGRDERR)) == BV_BKGRDERR) {
sys/kern/vfs_bio.c
2728
BO_LOCK(bp->b_bufobj);
sys/kern/vfs_bio.c
2729
bp->b_vflags &= ~BV_BKGRDERR;
sys/kern/vfs_bio.c
2730
BO_UNLOCK(bp->b_bufobj);
sys/kern/vfs_bio.c
2731
bdirty(bp);
sys/kern/vfs_bio.c
2734
if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) &&
sys/kern/vfs_bio.c
2735
(bp->b_flags & B_INVALONERR)) {
sys/kern/vfs_bio.c
2742
bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE;
sys/kern/vfs_bio.c
2743
bp->b_flags &= ~(B_ASYNC | B_CACHE);
sys/kern/vfs_bio.c
2746
if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) &&
sys/kern/vfs_bio.c
2747
(bp->b_error != ENXIO || !LIST_EMPTY(&bp->b_dep)) &&
sys/kern/vfs_bio.c
2748
!(bp->b_flags & B_INVAL)) {
sys/kern/vfs_bio.c
2770
bp->b_ioflags &= ~BIO_ERROR;
sys/kern/vfs_bio.c
2771
bdirty(bp);
sys/kern/vfs_bio.c
2772
} else if ((bp->b_flags & (B_NOCACHE | B_INVAL)) ||
sys/kern/vfs_bio.c
2773
(bp->b_ioflags & BIO_ERROR) || (bp->b_bufsize <= 0)) {
sys/kern/vfs_bio.c
2779
bp->b_flags |= B_INVAL;
sys/kern/vfs_bio.c
2780
if (!LIST_EMPTY(&bp->b_dep))
sys/kern/vfs_bio.c
2781
buf_deallocate(bp);
sys/kern/vfs_bio.c
2782
if (bp->b_flags & B_DELWRI)
sys/kern/vfs_bio.c
2783
bdirtysub(bp);
sys/kern/vfs_bio.c
2784
bp->b_flags &= ~(B_DELWRI | B_CACHE);
sys/kern/vfs_bio.c
2785
if ((bp->b_flags & B_VMIO) == 0) {
sys/kern/vfs_bio.c
2786
allocbuf(bp, 0);
sys/kern/vfs_bio.c
2787
if (bp->b_vp)
sys/kern/vfs_bio.c
2788
brelvp(bp);
sys/kern/vfs_bio.c
2801
if (bp->b_flags & B_DELWRI)
sys/kern/vfs_bio.c
2802
bp->b_flags &= ~B_RELBUF;
sys/kern/vfs_bio.c
2822
v_mnt = bp->b_vp != NULL ? bp->b_vp->v_mount : NULL;
sys/kern/vfs_bio.c
2824
if ((bp->b_flags & B_VMIO) && (bp->b_flags & B_NOCACHE ||
sys/kern/vfs_bio.c
2825
(bp->b_ioflags & BIO_ERROR && bp->b_iocmd == BIO_READ)) &&
sys/kern/vfs_bio.c
2827
vn_isdisk(bp->b_vp) || (bp->b_flags & B_DELWRI) == 0)) {
sys/kern/vfs_bio.c
2828
vfs_vmio_invalidate(bp);
sys/kern/vfs_bio.c
2829
allocbuf(bp, 0);
sys/kern/vfs_bio.c
2832
if ((bp->b_flags & (B_INVAL | B_RELBUF)) != 0 ||
sys/kern/vfs_bio.c
2833
(bp->b_flags & (B_DELWRI | B_NOREUSE)) == B_NOREUSE) {
sys/kern/vfs_bio.c
2834
allocbuf(bp, 0);
sys/kern/vfs_bio.c
2835
bp->b_flags &= ~B_NOREUSE;
sys/kern/vfs_bio.c
2836
if (bp->b_vp != NULL)
sys/kern/vfs_bio.c
2837
brelvp(bp);
sys/kern/vfs_bio.c
2845
if (bp->b_bufsize == 0 || (bp->b_ioflags & BIO_ERROR) != 0 ||
sys/kern/vfs_bio.c
2846
(bp->b_flags & (B_INVAL | B_NOCACHE | B_RELBUF)) != 0)
sys/kern/vfs_bio.c
2847
bp->b_flags |= B_INVAL;
sys/kern/vfs_bio.c
2848
if (bp->b_flags & B_INVAL) {
sys/kern/vfs_bio.c
2849
if (bp->b_flags & B_DELWRI)
sys/kern/vfs_bio.c
2850
bundirty(bp);
sys/kern/vfs_bio.c
2851
if (bp->b_vp)
sys/kern/vfs_bio.c
2852
brelvp(bp);
sys/kern/vfs_bio.c
2855
buf_track(bp, __func__);
sys/kern/vfs_bio.c
2858
if (bp->b_bufsize == 0) {
sys/kern/vfs_bio.c
2859
buf_free(bp);
sys/kern/vfs_bio.c
2863
if (bp->b_flags & (B_INVAL | B_NOCACHE | B_RELBUF) ||
sys/kern/vfs_bio.c
2864
(bp->b_ioflags & BIO_ERROR)) {
sys/kern/vfs_bio.c
2865
bp->b_xflags &= ~(BX_BKGRDWRITE | BX_ALTDATA);
sys/kern/vfs_bio.c
2866
if (bp->b_vflags & BV_BKGRDINPROG)
sys/kern/vfs_bio.c
2869
bp->b_flags |= B_AGE;
sys/kern/vfs_bio.c
2871
} else if (bp->b_flags & B_DELWRI)
sys/kern/vfs_bio.c
2876
if ((bp->b_flags & B_DELWRI) == 0 && (bp->b_xflags & BX_VNDIRTY))
sys/kern/vfs_bio.c
2879
bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_RELBUF | B_DIRECT);
sys/kern/vfs_bio.c
2880
bp->b_xflags &= ~(BX_CVTENXIO);
sys/kern/vfs_bio.c
2882
binsfree(bp, qindex);
sys/kern/vfs_bio.c
2897
bqrelse(struct buf *bp)
sys/kern/vfs_bio.c
2901
CTR3(KTR_BUF, "bqrelse(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
2902
KASSERT(!(bp->b_flags & (B_CLUSTER|B_PAGING)),
sys/kern/vfs_bio.c
2903
("bqrelse: inappropriate B_PAGING or B_CLUSTER bp %p", bp));
sys/kern/vfs_bio.c
2906
if (BUF_LOCKRECURSED(bp)) {
sys/kern/vfs_bio.c
2908
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
2911
bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_AGE | B_RELBUF);
sys/kern/vfs_bio.c
2912
bp->b_xflags &= ~(BX_CVTENXIO);
sys/kern/vfs_bio.c
2914
if (LIST_EMPTY(&bp->b_dep)) {
sys/kern/vfs_bio.c
2915
bp->b_flags &= ~B_IOSTARTED;
sys/kern/vfs_bio.c
2917
KASSERT((bp->b_flags & B_IOSTARTED) == 0,
sys/kern/vfs_bio.c
2918
("bqrelse: SU io not finished bp %p", bp));
sys/kern/vfs_bio.c
2921
if (bp->b_flags & B_MANAGED) {
sys/kern/vfs_bio.c
2922
if (bp->b_flags & B_REMFREE)
sys/kern/vfs_bio.c
2923
bremfreef(bp);
sys/kern/vfs_bio.c
2928
if ((bp->b_flags & B_DELWRI) != 0 || (bp->b_vflags & (BV_BKGRDINPROG |
sys/kern/vfs_bio.c
2930
BO_LOCK(bp->b_bufobj);
sys/kern/vfs_bio.c
2931
bp->b_vflags &= ~BV_BKGRDERR;
sys/kern/vfs_bio.c
2932
BO_UNLOCK(bp->b_bufobj);
sys/kern/vfs_bio.c
2935
if ((bp->b_flags & B_DELWRI) == 0 &&
sys/kern/vfs_bio.c
2936
(bp->b_xflags & BX_VNDIRTY))
sys/kern/vfs_bio.c
2938
if ((bp->b_flags & B_NOREUSE) != 0) {
sys/kern/vfs_bio.c
2939
brelse(bp);
sys/kern/vfs_bio.c
2944
buf_track(bp, __func__);
sys/kern/vfs_bio.c
2946
binsfree(bp, qindex);
sys/kern/vfs_bio.c
2950
buf_track(bp, __func__);
sys/kern/vfs_bio.c
2952
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
2960
vfs_vmio_iodone(struct buf *bp)
sys/kern/vfs_bio.c
2969
obj = bp->b_bufobj->bo_object;
sys/kern/vfs_bio.c
2970
KASSERT(blockcount_read(&obj->paging_in_progress) >= bp->b_npages,
sys/kern/vfs_bio.c
2972
blockcount_read(&obj->paging_in_progress), bp->b_npages));
sys/kern/vfs_bio.c
2974
vp = bp->b_vp;
sys/kern/vfs_bio.c
2978
foff = bp->b_offset;
sys/kern/vfs_bio.c
2979
KASSERT(bp->b_offset != NOOFFSET,
sys/kern/vfs_bio.c
2980
("vfs_vmio_iodone: bp %p has no buffer offset", bp));
sys/kern/vfs_bio.c
2983
iosize = bp->b_bcount - bp->b_resid;
sys/kern/vfs_bio.c
2984
for (i = 0; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
2992
m = bp->b_pages[i];
sys/kern/vfs_bio.c
2998
bp->b_pages[i] = m;
sys/kern/vfs_bio.c
2999
} else if ((bp->b_iocmd == BIO_READ) && resid > 0) {
sys/kern/vfs_bio.c
3008
vfs_page_set_valid(bp, foff, m);
sys/kern/vfs_bio.c
3018
vm_object_pip_wakeupn(obj, bp->b_npages);
sys/kern/vfs_bio.c
3019
if (bogus && buf_mapped(bp)) {
sys/kern/vfs_bio.c
3020
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
3021
pmap_qenter(trunc_page((vm_offset_t)bp->b_data),
sys/kern/vfs_bio.c
3022
bp->b_pages, bp->b_npages);
sys/kern/vfs_bio.c
3031
vfs_vmio_invalidate(struct buf *bp)
sys/kern/vfs_bio.c
3037
if (buf_mapped(bp)) {
sys/kern/vfs_bio.c
3038
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
3039
pmap_qremove(trunc_page((vm_offset_t)bp->b_data), bp->b_npages);
sys/kern/vfs_bio.c
3041
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
3054
flags = (bp->b_flags & B_NOREUSE) != 0 ? VPR_NOREUSE : 0;
sys/kern/vfs_bio.c
3055
obj = bp->b_bufobj->bo_object;
sys/kern/vfs_bio.c
3056
resid = bp->b_bufsize;
sys/kern/vfs_bio.c
3057
poffset = bp->b_offset & PAGE_MASK;
sys/kern/vfs_bio.c
3059
for (i = 0; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
3060
m = bp->b_pages[i];
sys/kern/vfs_bio.c
3063
bp->b_pages[i] = NULL;
sys/kern/vfs_bio.c
3077
bp->b_npages = 0;
sys/kern/vfs_bio.c
3084
vfs_vmio_truncate(struct buf *bp, int desiredpages)
sys/kern/vfs_bio.c
3090
if (bp->b_npages == desiredpages)
sys/kern/vfs_bio.c
3093
if (buf_mapped(bp)) {
sys/kern/vfs_bio.c
3094
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
3095
pmap_qremove((vm_offset_t)trunc_page((vm_offset_t)bp->b_data) +
sys/kern/vfs_bio.c
3096
(desiredpages << PAGE_SHIFT), bp->b_npages - desiredpages);
sys/kern/vfs_bio.c
3098
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
3103
flags = (bp->b_flags & B_NOREUSE) != 0 ? VPR_NOREUSE : 0;
sys/kern/vfs_bio.c
3104
if ((bp->b_flags & B_DIRECT) != 0) {
sys/kern/vfs_bio.c
3106
obj = bp->b_bufobj->bo_object;
sys/kern/vfs_bio.c
3111
for (i = desiredpages; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
3112
m = bp->b_pages[i];
sys/kern/vfs_bio.c
3114
bp->b_pages[i] = NULL;
sys/kern/vfs_bio.c
3122
bp->b_npages = desiredpages;
sys/kern/vfs_bio.c
3129
vfs_vmio_extend(struct buf *bp, int desiredpages, int size)
sys/kern/vfs_bio.c
3145
obj = bp->b_bufobj->bo_object;
sys/kern/vfs_bio.c
3146
if (bp->b_npages < desiredpages) {
sys/kern/vfs_bio.c
3149
bp, desiredpages, maxbcachebuf));
sys/kern/vfs_bio.c
3162
OFF_TO_IDX(bp->b_offset) + bp->b_npages,
sys/kern/vfs_bio.c
3165
&bp->b_pages[bp->b_npages], desiredpages - bp->b_npages);
sys/kern/vfs_bio.c
3166
bp->b_npages = desiredpages;
sys/kern/vfs_bio.c
3183
toff = bp->b_bcount;
sys/kern/vfs_bio.c
3184
tinc = PAGE_SIZE - ((bp->b_offset + toff) & PAGE_MASK);
sys/kern/vfs_bio.c
3185
while ((bp->b_flags & B_CACHE) && toff < size) {
sys/kern/vfs_bio.c
3190
pi = ((bp->b_offset & PAGE_MASK) + toff) >> PAGE_SHIFT;
sys/kern/vfs_bio.c
3191
m = bp->b_pages[pi];
sys/kern/vfs_bio.c
3192
vfs_buf_test_cache(bp, bp->b_offset, toff, tinc, m);
sys/kern/vfs_bio.c
3200
if (buf_mapped(bp))
sys/kern/vfs_bio.c
3201
bpmap_qenter(bp);
sys/kern/vfs_bio.c
3203
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
3254
vfs_bio_awrite(struct buf *bp)
sys/kern/vfs_bio.c
3259
daddr_t lblkno = bp->b_lblkno;
sys/kern/vfs_bio.c
3260
struct vnode *vp = bp->b_vp;
sys/kern/vfs_bio.c
3268
gbflags = (bp->b_data == unmapped_buf) ? GB_UNMAPPED : 0;
sys/kern/vfs_bio.c
3276
(bp->b_flags & (B_CLUSTEROK | B_INVAL)) == B_CLUSTEROK) {
sys/kern/vfs_bio.c
3283
bp->b_blkno + ((i * size) >> DEV_BSHIFT)) == 0)
sys/kern/vfs_bio.c
3288
bp->b_blkno - ((j * size) >> DEV_BSHIFT)) == 0)
sys/kern/vfs_bio.c
3297
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
3303
bremfree(bp);
sys/kern/vfs_bio.c
3304
bp->b_flags |= B_ASYNC;
sys/kern/vfs_bio.c
3310
nwritten = bp->b_bufsize;
sys/kern/vfs_bio.c
3311
(void) bwrite(bp);
sys/kern/vfs_bio.c
3322
getnewbuf_kva(struct buf *bp, int gbflags, int maxsize)
sys/kern/vfs_bio.c
3332
if (maxsize != bp->b_kvasize &&
sys/kern/vfs_bio.c
3333
bufkva_alloc(bp, maxsize, gbflags))
sys/kern/vfs_bio.c
3358
struct buf *bp;
sys/kern/vfs_bio.c
3361
bp = NULL;
sys/kern/vfs_bio.c
3386
if ((bp = buf_alloc(bd)) == NULL) {
sys/kern/vfs_bio.c
3390
if (getnewbuf_kva(bp, gbflags, maxsize) == 0)
sys/kern/vfs_bio.c
3391
return (bp);
sys/kern/vfs_bio.c
3397
if (bp != NULL) {
sys/kern/vfs_bio.c
3398
bp->b_flags |= B_INVAL;
sys/kern/vfs_bio.c
3399
brelse(bp);
sys/kern/vfs_bio.c
3580
struct buf *bp;
sys/kern/vfs_bio.c
3588
bp = NULL;
sys/kern/vfs_bio.c
3597
bp = TAILQ_NEXT(sentinel, b_freelist);
sys/kern/vfs_bio.c
3598
if (bp != NULL) {
sys/kern/vfs_bio.c
3600
TAILQ_INSERT_AFTER(&bq->bq_queue, bp, sentinel,
sys/kern/vfs_bio.c
3613
if (bp->b_qindex == QUEUE_SENTINEL || (lvp != NULL &&
sys/kern/vfs_bio.c
3614
bp->b_vp != lvp)) {
sys/kern/vfs_bio.c
3618
error = BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL);
sys/kern/vfs_bio.c
3627
if ((bp->b_vflags & BV_BKGRDINPROG) != 0 ||
sys/kern/vfs_bio.c
3628
(bp->b_flags & B_DELWRI) == 0) {
sys/kern/vfs_bio.c
3629
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
3632
if (bp->b_flags & B_INVAL) {
sys/kern/vfs_bio.c
3633
bremfreef(bp);
sys/kern/vfs_bio.c
3634
brelse(bp);
sys/kern/vfs_bio.c
3639
if (!LIST_EMPTY(&bp->b_dep) && buf_countdeps(bp, 0)) {
sys/kern/vfs_bio.c
3641
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
3657
vp = bp->b_vp;
sys/kern/vfs_bio.c
3659
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
3673
bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
3675
vfs_bio_awrite(bp);
sys/kern/vfs_bio.c
3677
bremfree(bp);
sys/kern/vfs_bio.c
3678
bwrite(bp);
sys/kern/vfs_bio.c
3697
BUF_UNLOCK(bp);
sys/kern/vfs_bio.c
3783
vfs_clean_pages_dirty_buf(struct buf *bp)
sys/kern/vfs_bio.c
3789
if ((bp->b_flags & B_VMIO) == 0 || bp->b_bufsize == 0)
sys/kern/vfs_bio.c
3792
foff = bp->b_offset;
sys/kern/vfs_bio.c
3793
KASSERT(bp->b_offset != NOOFFSET,
sys/kern/vfs_bio.c
3796
vfs_busy_pages_acquire(bp);
sys/kern/vfs_bio.c
3797
vfs_setdirty_range(bp);
sys/kern/vfs_bio.c
3798
for (i = 0; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
3801
if (eoff > bp->b_offset + bp->b_bufsize)
sys/kern/vfs_bio.c
3802
eoff = bp->b_offset + bp->b_bufsize;
sys/kern/vfs_bio.c
3803
m = bp->b_pages[i];
sys/kern/vfs_bio.c
3804
vfs_page_set_validclean(bp, foff, m);
sys/kern/vfs_bio.c
3808
vfs_busy_pages_release(bp);
sys/kern/vfs_bio.c
3812
vfs_setdirty_range(struct buf *bp)
sys/kern/vfs_bio.c
3822
for (i = 0; i < bp->b_npages; i++)
sys/kern/vfs_bio.c
3823
vm_page_test_dirty(bp->b_pages[i]);
sys/kern/vfs_bio.c
3830
for (i = 0; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
3831
if (bp->b_pages[i]->dirty)
sys/kern/vfs_bio.c
3834
boffset = (i << PAGE_SHIFT) - (bp->b_offset & PAGE_MASK);
sys/kern/vfs_bio.c
3836
for (i = bp->b_npages - 1; i >= 0; --i) {
sys/kern/vfs_bio.c
3837
if (bp->b_pages[i]->dirty) {
sys/kern/vfs_bio.c
3841
eoffset = ((i + 1) << PAGE_SHIFT) - (bp->b_offset & PAGE_MASK);
sys/kern/vfs_bio.c
3847
if (eoffset > bp->b_bcount)
sys/kern/vfs_bio.c
3848
eoffset = bp->b_bcount;
sys/kern/vfs_bio.c
3856
if (bp->b_dirtyoff > boffset)
sys/kern/vfs_bio.c
3857
bp->b_dirtyoff = boffset;
sys/kern/vfs_bio.c
3858
if (bp->b_dirtyend < eoffset)
sys/kern/vfs_bio.c
3859
bp->b_dirtyend = eoffset;
sys/kern/vfs_bio.c
3869
bp_unmapped_get_kva(struct buf *bp, daddr_t blkno, int size, int gbflags)
sys/kern/vfs_bio.c
3874
need_mapping = bp->b_data == unmapped_buf &&
sys/kern/vfs_bio.c
3876
need_kva = bp->b_kvabase == unmapped_buf &&
sys/kern/vfs_bio.c
3877
bp->b_data == unmapped_buf &&
sys/kern/vfs_bio.c
3882
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
3884
if (need_mapping && bp->b_kvabase != unmapped_buf) {
sys/kern/vfs_bio.c
3897
bsize = vn_isdisk(bp->b_vp) ? DEV_BSIZE : bp->b_bufobj->bo_bsize;
sys/kern/vfs_bio.c
3903
while (bufkva_alloc(bp, maxsize, gbflags) != 0) {
sys/kern/vfs_bio.c
3909
panic("GB_NOWAIT_BD and GB_UNMAPPED %p", bp);
sys/kern/vfs_bio.c
3912
bufspace_wait(bufdomain(bp), bp->b_vp, gbflags, 0, 0);
sys/kern/vfs_bio.c
3917
bp->b_data = bp->b_kvabase;
sys/kern/vfs_bio.c
3918
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
3919
bpmap_qenter(bp);
sys/kern/vfs_bio.c
3927
struct buf *bp;
sys/kern/vfs_bio.c
3930
error = getblkx(vp, blkno, blkno, size, slpflag, slptimeo, flags, &bp);
sys/kern/vfs_bio.c
3933
return (bp);
sys/kern/vfs_bio.c
3983
struct buf *bp;
sys/kern/vfs_bio.c
4006
bp = gbincore_unlocked(bo, blkno);
sys/kern/vfs_bio.c
4007
if (bp == NULL) {
sys/kern/vfs_bio.c
4023
error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL, "getblku", 0,
sys/kern/vfs_bio.c
4044
if (bp->b_bufobj == bo && bp->b_lblkno == blkno)
sys/kern/vfs_bio.c
4048
BUF_UNLOCK_RAW(bp);
sys/kern/vfs_bio.c
4056
bp = gbincore(bo, blkno);
sys/kern/vfs_bio.c
4057
if (bp != NULL) {
sys/kern/vfs_bio.c
4070
error = BUF_TIMELOCK(bp, lockflags,
sys/kern/vfs_bio.c
4085
if (BUF_LOCKRECURSED(bp))
sys/kern/vfs_bio.c
4094
if (bp->b_flags & B_INVAL)
sys/kern/vfs_bio.c
4095
bp->b_flags &= ~B_CACHE;
sys/kern/vfs_bio.c
4096
else if ((bp->b_flags & (B_VMIO | B_INVAL)) == 0)
sys/kern/vfs_bio.c
4097
bp->b_flags |= B_CACHE;
sys/kern/vfs_bio.c
4098
if (bp->b_flags & B_MANAGED)
sys/kern/vfs_bio.c
4099
MPASS(bp->b_qindex == QUEUE_NONE);
sys/kern/vfs_bio.c
4101
bremfree(bp);
sys/kern/vfs_bio.c
4106
if (bp->b_bcount != size) {
sys/kern/vfs_bio.c
4107
if ((bp->b_flags & B_VMIO) == 0 ||
sys/kern/vfs_bio.c
4108
(size > bp->b_kvasize)) {
sys/kern/vfs_bio.c
4109
if (bp->b_flags & B_DELWRI) {
sys/kern/vfs_bio.c
4110
bp->b_flags |= B_NOCACHE;
sys/kern/vfs_bio.c
4111
bwrite(bp);
sys/kern/vfs_bio.c
4113
if (LIST_EMPTY(&bp->b_dep)) {
sys/kern/vfs_bio.c
4114
bp->b_flags |= B_RELBUF;
sys/kern/vfs_bio.c
4115
brelse(bp);
sys/kern/vfs_bio.c
4117
bp->b_flags |= B_NOCACHE;
sys/kern/vfs_bio.c
4118
bwrite(bp);
sys/kern/vfs_bio.c
4130
bp_unmapped_get_kva(bp, blkno, size, flags);
sys/kern/vfs_bio.c
4138
allocbuf(bp, size);
sys/kern/vfs_bio.c
4140
KASSERT(bp->b_offset != NOOFFSET,
sys/kern/vfs_bio.c
4170
if ((bp->b_flags & (B_CACHE|B_DELWRI)) == B_DELWRI) {
sys/kern/vfs_bio.c
4171
bp->b_flags |= B_NOCACHE;
sys/kern/vfs_bio.c
4172
bwrite(bp);
sys/kern/vfs_bio.c
4175
bp->b_flags &= ~B_DONE;
sys/kern/vfs_bio.c
4221
bp = getnewbuf(vp, slpflag, slptimeo, maxsize, flags);
sys/kern/vfs_bio.c
4222
if (bp == NULL) {
sys/kern/vfs_bio.c
4256
bp->b_lblkno = blkno;
sys/kern/vfs_bio.c
4257
bp->b_blkno = d_blkno;
sys/kern/vfs_bio.c
4258
bp->b_offset = offset;
sys/kern/vfs_bio.c
4259
error = bgetvp(vp, bp);
sys/kern/vfs_bio.c
4264
bp->b_flags |= B_INVAL;
sys/kern/vfs_bio.c
4265
bufspace_release(bufdomain(bp), maxsize);
sys/kern/vfs_bio.c
4266
brelse(bp);
sys/kern/vfs_bio.c
4278
bp->b_flags |= B_VMIO;
sys/kern/vfs_bio.c
4279
KASSERT(vp->v_object == bp->b_bufobj->bo_object,
sys/kern/vfs_bio.c
4281
bp, vp->v_object, bp->b_bufobj->bo_object));
sys/kern/vfs_bio.c
4283
bp->b_flags &= ~B_VMIO;
sys/kern/vfs_bio.c
4284
KASSERT(bp->b_bufobj->bo_object == NULL,
sys/kern/vfs_bio.c
4286
bp, bp->b_bufobj->bo_object));
sys/kern/vfs_bio.c
4287
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
4290
allocbuf(bp, size);
sys/kern/vfs_bio.c
4291
bufspace_release(bufdomain(bp), maxsize);
sys/kern/vfs_bio.c
4292
bp->b_flags &= ~B_DONE;
sys/kern/vfs_bio.c
4294
CTR4(KTR_BUF, "getblk(%p, %ld, %d) = %p", vp, (long)blkno, size, bp);
sys/kern/vfs_bio.c
4296
buf_track(bp, __func__);
sys/kern/vfs_bio.c
4297
KASSERT(bp->b_bufobj == bo,
sys/kern/vfs_bio.c
4298
("bp %p wrong b_bufobj %p should be %p", bp, bp->b_bufobj, bo));
sys/kern/vfs_bio.c
4299
*bpp = bp;
sys/kern/vfs_bio.c
4310
struct buf *bp;
sys/kern/vfs_bio.c
4314
while ((bp = getnewbuf(NULL, 0, 0, maxsize, flags)) == NULL) {
sys/kern/vfs_bio.c
4319
allocbuf(bp, size);
sys/kern/vfs_bio.c
4320
bufspace_release(bufdomain(bp), maxsize);
sys/kern/vfs_bio.c
4321
bp->b_flags |= B_INVAL; /* b_dep cleared by getnewbuf() */
sys/kern/vfs_bio.c
4322
return (bp);
sys/kern/vfs_bio.c
4329
vfs_nonvmio_truncate(struct buf *bp, int newbsize)
sys/kern/vfs_bio.c
4332
if (bp->b_flags & B_MALLOC) {
sys/kern/vfs_bio.c
4337
bufmallocadjust(bp, 0);
sys/kern/vfs_bio.c
4338
free(bp->b_data, M_BIOBUF);
sys/kern/vfs_bio.c
4339
bp->b_data = bp->b_kvabase;
sys/kern/vfs_bio.c
4340
bp->b_flags &= ~B_MALLOC;
sys/kern/vfs_bio.c
4344
vm_hold_free_pages(bp, newbsize);
sys/kern/vfs_bio.c
4345
bufspace_adjust(bp, newbsize);
sys/kern/vfs_bio.c
4352
vfs_nonvmio_extend(struct buf *bp, int newbsize)
sys/kern/vfs_bio.c
4367
if (bp->b_bufsize == 0 && newbsize <= PAGE_SIZE/2 &&
sys/kern/vfs_bio.c
4369
bp->b_data = malloc(newbsize, M_BIOBUF, M_WAITOK);
sys/kern/vfs_bio.c
4370
bp->b_flags |= B_MALLOC;
sys/kern/vfs_bio.c
4371
bufmallocadjust(bp, newbsize);
sys/kern/vfs_bio.c
4382
if (bp->b_flags & B_MALLOC) {
sys/kern/vfs_bio.c
4383
origbuf = bp->b_data;
sys/kern/vfs_bio.c
4384
origbufsize = bp->b_bufsize;
sys/kern/vfs_bio.c
4385
bp->b_data = bp->b_kvabase;
sys/kern/vfs_bio.c
4386
bufmallocadjust(bp, 0);
sys/kern/vfs_bio.c
4387
bp->b_flags &= ~B_MALLOC;
sys/kern/vfs_bio.c
4390
vm_hold_load_pages(bp, (vm_offset_t) bp->b_data + bp->b_bufsize,
sys/kern/vfs_bio.c
4391
(vm_offset_t) bp->b_data + newbsize);
sys/kern/vfs_bio.c
4393
bcopy(origbuf, bp->b_data, origbufsize);
sys/kern/vfs_bio.c
4396
bufspace_adjust(bp, newbsize);
sys/kern/vfs_bio.c
4414
allocbuf(struct buf *bp, int size)
sys/kern/vfs_bio.c
4418
if (bp->b_bcount == size)
sys/kern/vfs_bio.c
4421
KASSERT(bp->b_kvasize == 0 || bp->b_kvasize >= size,
sys/kern/vfs_bio.c
4423
bp, bp->b_kvasize, size));
sys/kern/vfs_bio.c
4426
if ((bp->b_flags & B_VMIO) == 0) {
sys/kern/vfs_bio.c
4427
if ((bp->b_flags & B_MALLOC) == 0)
sys/kern/vfs_bio.c
4433
if (newbsize < bp->b_bufsize)
sys/kern/vfs_bio.c
4434
vfs_nonvmio_truncate(bp, newbsize);
sys/kern/vfs_bio.c
4435
else if (newbsize > bp->b_bufsize)
sys/kern/vfs_bio.c
4436
vfs_nonvmio_extend(bp, newbsize);
sys/kern/vfs_bio.c
4441
num_pages((bp->b_offset & PAGE_MASK) + newbsize);
sys/kern/vfs_bio.c
4443
KASSERT((bp->b_flags & B_MALLOC) == 0,
sys/kern/vfs_bio.c
4444
("allocbuf: VMIO buffer can't be malloced %p", bp));
sys/kern/vfs_bio.c
4450
if (size == 0 || bp->b_bufsize == 0)
sys/kern/vfs_bio.c
4451
bp->b_flags |= B_CACHE;
sys/kern/vfs_bio.c
4453
if (newbsize < bp->b_bufsize)
sys/kern/vfs_bio.c
4454
vfs_vmio_truncate(bp, desiredpages);
sys/kern/vfs_bio.c
4456
else if (size > bp->b_bcount)
sys/kern/vfs_bio.c
4457
vfs_vmio_extend(bp, desiredpages, size);
sys/kern/vfs_bio.c
4458
bufspace_adjust(bp, newbsize);
sys/kern/vfs_bio.c
4460
bp->b_bcount = size; /* requested buffer size. */
sys/kern/vfs_bio.c
4469
biodone(struct bio *bp)
sys/kern/vfs_bio.c
4475
biotrack(bp, __func__);
sys/kern/vfs_bio.c
4484
TAILQ_INSERT_HEAD(&nondump_bios, bp, bio_queue);
sys/kern/vfs_bio.c
4487
if ((bp->bio_flags & BIO_TRANSIENT_MAPPING) != 0) {
sys/kern/vfs_bio.c
4488
bp->bio_flags &= ~BIO_TRANSIENT_MAPPING;
sys/kern/vfs_bio.c
4489
bp->bio_flags |= BIO_UNMAPPED;
sys/kern/vfs_bio.c
4490
start = trunc_page((vm_offset_t)bp->bio_data);
sys/kern/vfs_bio.c
4491
end = round_page((vm_offset_t)bp->bio_data + bp->bio_length);
sys/kern/vfs_bio.c
4492
bp->bio_data = unmapped_buf;
sys/kern/vfs_bio.c
4497
done = bp->bio_done;
sys/kern/vfs_bio.c
4503
mtxp = mtx_pool_find(mtxpool_sleep, bp);
sys/kern/vfs_bio.c
4505
bp->bio_flags |= BIO_DONE;
sys/kern/vfs_bio.c
4506
wakeup(bp);
sys/kern/vfs_bio.c
4509
done(bp);
sys/kern/vfs_bio.c
4516
biowait(struct bio *bp, const char *wmesg)
sys/kern/vfs_bio.c
4520
mtxp = mtx_pool_find(mtxpool_sleep, bp);
sys/kern/vfs_bio.c
4522
while ((bp->bio_flags & BIO_DONE) == 0)
sys/kern/vfs_bio.c
4523
msleep(bp, mtxp, PRIBIO, wmesg, 0);
sys/kern/vfs_bio.c
4525
if (bp->bio_error != 0) {
sys/kern/vfs_bio.c
4526
if ((bp->bio_flags & BIO_EXTERR) != 0)
sys/kern/vfs_bio.c
4527
return (exterr_set_from(&bp->bio_exterr));
sys/kern/vfs_bio.c
4528
return (bp->bio_error);
sys/kern/vfs_bio.c
4530
if (!(bp->bio_flags & BIO_ERROR))
sys/kern/vfs_bio.c
4536
biofinish(struct bio *bp, struct devstat *stat, int error)
sys/kern/vfs_bio.c
4540
bp->bio_error = error;
sys/kern/vfs_bio.c
4541
bp->bio_flags |= BIO_ERROR;
sys/kern/vfs_bio.c
4544
devstat_end_transaction_bio(stat, bp);
sys/kern/vfs_bio.c
4545
biodone(bp);
sys/kern/vfs_bio.c
4550
biotrack_buf(struct bio *bp, const char *location)
sys/kern/vfs_bio.c
4553
buf_track(bp->bio_track_bp, location);
sys/kern/vfs_bio.c
4565
bufwait(struct buf *bp)
sys/kern/vfs_bio.c
4567
if (bp->b_iocmd == BIO_READ)
sys/kern/vfs_bio.c
4568
bwait(bp, PRIBIO, "biord");
sys/kern/vfs_bio.c
4570
bwait(bp, PRIBIO, "biowr");
sys/kern/vfs_bio.c
4571
if (bp->b_flags & B_EINTR) {
sys/kern/vfs_bio.c
4572
bp->b_flags &= ~B_EINTR;
sys/kern/vfs_bio.c
4575
if (bp->b_ioflags & BIO_ERROR) {
sys/kern/vfs_bio.c
4576
if ((bp->b_ioflags & BIO_EXTERR) != 0)
sys/kern/vfs_bio.c
4577
exterr_set_from(&bp->b_exterr);
sys/kern/vfs_bio.c
4578
return (bp->b_error ? bp->b_error : EIO);
sys/kern/vfs_bio.c
4604
bufdone(struct buf *bp)
sys/kern/vfs_bio.c
4609
buf_track(bp, __func__);
sys/kern/vfs_bio.c
4610
CTR3(KTR_BUF, "bufdone(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_bio.c
4613
KASSERT(!(bp->b_flags & B_DONE), ("biodone: bp %p already done", bp));
sys/kern/vfs_bio.c
4615
runningbufwakeup(bp);
sys/kern/vfs_bio.c
4616
if (bp->b_iocmd == BIO_WRITE)
sys/kern/vfs_bio.c
4617
dropobj = bp->b_bufobj;
sys/kern/vfs_bio.c
4619
if (bp->b_iodone != NULL) {
sys/kern/vfs_bio.c
4620
biodone = bp->b_iodone;
sys/kern/vfs_bio.c
4621
bp->b_iodone = NULL;
sys/kern/vfs_bio.c
4622
(*biodone) (bp);
sys/kern/vfs_bio.c
4627
if (bp->b_flags & B_VMIO) {
sys/kern/vfs_bio.c
4633
if (bp->b_iocmd == BIO_READ &&
sys/kern/vfs_bio.c
4634
!(bp->b_flags & (B_INVAL|B_NOCACHE)) &&
sys/kern/vfs_bio.c
4635
!(bp->b_ioflags & BIO_ERROR))
sys/kern/vfs_bio.c
4636
bp->b_flags |= B_CACHE;
sys/kern/vfs_bio.c
4637
vfs_vmio_iodone(bp);
sys/kern/vfs_bio.c
4639
if (!LIST_EMPTY(&bp->b_dep))
sys/kern/vfs_bio.c
4640
buf_complete(bp);
sys/kern/vfs_bio.c
4641
if ((bp->b_flags & B_CKHASH) != 0) {
sys/kern/vfs_bio.c
4642
KASSERT(bp->b_iocmd == BIO_READ,
sys/kern/vfs_bio.c
4643
("bufdone: b_iocmd %d not BIO_READ", bp->b_iocmd));
sys/kern/vfs_bio.c
4644
KASSERT(buf_mapped(bp), ("bufdone: bp %p not mapped", bp));
sys/kern/vfs_bio.c
4645
(*bp->b_ckhashcalc)(bp);
sys/kern/vfs_bio.c
4652
if (bp->b_flags & B_ASYNC) {
sys/kern/vfs_bio.c
4653
if ((bp->b_flags & (B_NOCACHE | B_INVAL | B_RELBUF)) ||
sys/kern/vfs_bio.c
4654
(bp->b_ioflags & BIO_ERROR))
sys/kern/vfs_bio.c
4655
brelse(bp);
sys/kern/vfs_bio.c
4657
bqrelse(bp);
sys/kern/vfs_bio.c
4659
bdone(bp);
sys/kern/vfs_bio.c
4670
vfs_unbusy_pages(struct buf *bp)
sys/kern/vfs_bio.c
4676
runningbufwakeup(bp);
sys/kern/vfs_bio.c
4677
if (!(bp->b_flags & B_VMIO))
sys/kern/vfs_bio.c
4680
obj = bp->b_bufobj->bo_object;
sys/kern/vfs_bio.c
4681
for (i = 0; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
4682
m = bp->b_pages[i];
sys/kern/vfs_bio.c
4684
m = vm_page_relookup(obj, OFF_TO_IDX(bp->b_offset) + i);
sys/kern/vfs_bio.c
4687
bp->b_pages[i] = m;
sys/kern/vfs_bio.c
4688
if (buf_mapped(bp)) {
sys/kern/vfs_bio.c
4689
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
4690
pmap_qenter(trunc_page((vm_offset_t)bp->b_data),
sys/kern/vfs_bio.c
4691
bp->b_pages, bp->b_npages);
sys/kern/vfs_bio.c
4693
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
4697
vm_object_pip_wakeupn(obj, bp->b_npages);
sys/kern/vfs_bio.c
4709
vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, vm_page_t m)
sys/kern/vfs_bio.c
4720
if (eoff > bp->b_offset + bp->b_bcount)
sys/kern/vfs_bio.c
4721
eoff = bp->b_offset + bp->b_bcount;
sys/kern/vfs_bio.c
4738
vfs_page_set_validclean(struct buf *bp, vm_ooffset_t off, vm_page_t m)
sys/kern/vfs_bio.c
4750
if (eoff > bp->b_offset + bp->b_bcount)
sys/kern/vfs_bio.c
4751
eoff = bp->b_offset + bp->b_bcount;
sys/kern/vfs_bio.c
4770
vfs_busy_pages_acquire(struct buf *bp)
sys/kern/vfs_bio.c
4774
for (i = 0; i < bp->b_npages; i++)
sys/kern/vfs_bio.c
4775
vm_page_busy_acquire(bp->b_pages[i], VM_ALLOC_SBUSY);
sys/kern/vfs_bio.c
4779
vfs_busy_pages_release(struct buf *bp)
sys/kern/vfs_bio.c
4783
for (i = 0; i < bp->b_npages; i++)
sys/kern/vfs_bio.c
4784
vm_page_sunbusy(bp->b_pages[i]);
sys/kern/vfs_bio.c
4800
vfs_busy_pages(struct buf *bp, int clear_modify)
sys/kern/vfs_bio.c
4808
if (!(bp->b_flags & B_VMIO))
sys/kern/vfs_bio.c
4811
obj = bp->b_bufobj->bo_object;
sys/kern/vfs_bio.c
4812
foff = bp->b_offset;
sys/kern/vfs_bio.c
4813
KASSERT(bp->b_offset != NOOFFSET,
sys/kern/vfs_bio.c
4815
if ((bp->b_flags & B_CLUSTER) == 0) {
sys/kern/vfs_bio.c
4816
vm_object_pip_add(obj, bp->b_npages);
sys/kern/vfs_bio.c
4817
vfs_busy_pages_acquire(bp);
sys/kern/vfs_bio.c
4819
if (bp->b_bufsize != 0)
sys/kern/vfs_bio.c
4820
vfs_setdirty_range(bp);
sys/kern/vfs_bio.c
4822
for (i = 0; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
4823
m = bp->b_pages[i];
sys/kern/vfs_bio.c
4843
vfs_page_set_validclean(bp, foff, m);
sys/kern/vfs_bio.c
4845
(bp->b_flags & B_CACHE) == 0) {
sys/kern/vfs_bio.c
4846
bp->b_pages[i] = bogus_page;
sys/kern/vfs_bio.c
4851
if (bogus && buf_mapped(bp)) {
sys/kern/vfs_bio.c
4852
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
4853
pmap_qenter(trunc_page((vm_offset_t)bp->b_data),
sys/kern/vfs_bio.c
4854
bp->b_pages, bp->b_npages);
sys/kern/vfs_bio.c
4867
vfs_bio_set_valid(struct buf *bp, int base, int size)
sys/kern/vfs_bio.c
4872
if (!(bp->b_flags & B_VMIO))
sys/kern/vfs_bio.c
4880
base += (bp->b_offset & PAGE_MASK);
sys/kern/vfs_bio.c
4889
vfs_busy_pages_acquire(bp);
sys/kern/vfs_bio.c
4890
for (i = base / PAGE_SIZE; size > 0 && i < bp->b_npages; ++i) {
sys/kern/vfs_bio.c
4891
m = bp->b_pages[i];
sys/kern/vfs_bio.c
4899
vfs_busy_pages_release(bp);
sys/kern/vfs_bio.c
4915
vfs_bio_clrbuf(struct buf *bp)
sys/kern/vfs_bio.c
4920
if ((bp->b_flags & (B_VMIO | B_MALLOC)) != B_VMIO) {
sys/kern/vfs_bio.c
4921
clrbuf(bp);
sys/kern/vfs_bio.c
4924
bp->b_flags &= ~B_INVAL;
sys/kern/vfs_bio.c
4925
bp->b_ioflags &= ~BIO_ERROR;
sys/kern/vfs_bio.c
4926
vfs_busy_pages_acquire(bp);
sys/kern/vfs_bio.c
4927
sa = bp->b_offset & PAGE_MASK;
sys/kern/vfs_bio.c
4929
for (i = 0; i < bp->b_npages; i++, sa = 0) {
sys/kern/vfs_bio.c
4930
slide = imin(slide + PAGE_SIZE, bp->b_offset + bp->b_bufsize);
sys/kern/vfs_bio.c
4934
if (bp->b_pages[i] == bogus_page)
sys/kern/vfs_bio.c
4940
if ((bp->b_pages[i]->valid & mask) == mask)
sys/kern/vfs_bio.c
4942
if ((bp->b_pages[i]->valid & mask) == 0)
sys/kern/vfs_bio.c
4943
pmap_zero_page_area(bp->b_pages[i], sa, ea - sa);
sys/kern/vfs_bio.c
4946
if ((bp->b_pages[i]->valid & (1 << j)) == 0) {
sys/kern/vfs_bio.c
4947
pmap_zero_page_area(bp->b_pages[i],
sys/kern/vfs_bio.c
4952
vm_page_set_valid_range(bp->b_pages[i], j * DEV_BSIZE,
sys/kern/vfs_bio.c
4955
vfs_busy_pages_release(bp);
sys/kern/vfs_bio.c
4956
bp->b_resid = 0;
sys/kern/vfs_bio.c
4960
vfs_bio_bzero_buf(struct buf *bp, int base, int size)
sys/kern/vfs_bio.c
4965
if (buf_mapped(bp)) {
sys/kern/vfs_bio.c
4966
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
4967
bzero(bp->b_data + base, size);
sys/kern/vfs_bio.c
4969
BUF_CHECK_UNMAPPED(bp);
sys/kern/vfs_bio.c
4971
for (i = base / PAGE_SIZE; size > 0 && i < bp->b_npages; ++i) {
sys/kern/vfs_bio.c
4972
m = bp->b_pages[i];
sys/kern/vfs_bio.c
4990
b_io_dismiss(struct buf *bp, int ioflag, bool release)
sys/kern/vfs_bio.c
4994
("buf %p non-VMIO noreuse", bp));
sys/kern/vfs_bio.c
4997
bp->b_flags |= B_DIRECT;
sys/kern/vfs_bio.c
4999
bp->b_xflags |= BX_ALTDATA;
sys/kern/vfs_bio.c
5000
if ((ioflag & (IO_VMIO | IO_DIRECT)) != 0 && LIST_EMPTY(&bp->b_dep)) {
sys/kern/vfs_bio.c
5001
bp->b_flags |= B_RELBUF;
sys/kern/vfs_bio.c
5003
bp->b_flags |= B_NOREUSE;
sys/kern/vfs_bio.c
5005
brelse(bp);
sys/kern/vfs_bio.c
5007
bqrelse(bp);
sys/kern/vfs_bio.c
5011
vfs_bio_brelse(struct buf *bp, int ioflag)
sys/kern/vfs_bio.c
5014
b_io_dismiss(bp, ioflag, true);
sys/kern/vfs_bio.c
5018
vfs_bio_set_flags(struct buf *bp, int ioflag)
sys/kern/vfs_bio.c
5021
b_io_dismiss(bp, ioflag, false);
sys/kern/vfs_bio.c
5030
vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to)
sys/kern/vfs_bio.c
5036
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
5040
index = (from - trunc_page((vm_offset_t)bp->b_data)) >> PAGE_SHIFT;
sys/kern/vfs_bio.c
5041
MPASS((bp->b_flags & B_MAXPHYS) == 0);
sys/kern/vfs_bio.c
5044
bp, (uintmax_t)from, (uintmax_t)to, maxbcachebuf));
sys/kern/vfs_bio.c
5055
bp->b_pages[index] = p;
sys/kern/vfs_bio.c
5057
bp->b_npages = index;
sys/kern/vfs_bio.c
5062
vm_hold_free_pages(struct buf *bp, int newbsize)
sys/kern/vfs_bio.c
5068
BUF_CHECK_MAPPED(bp);
sys/kern/vfs_bio.c
5070
from = round_page((vm_offset_t)bp->b_data + newbsize);
sys/kern/vfs_bio.c
5071
newnpages = (from - trunc_page((vm_offset_t)bp->b_data)) >> PAGE_SHIFT;
sys/kern/vfs_bio.c
5072
if (bp->b_npages > newnpages)
sys/kern/vfs_bio.c
5073
pmap_qremove(from, bp->b_npages - newnpages);
sys/kern/vfs_bio.c
5074
for (index = newnpages; index < bp->b_npages; index++) {
sys/kern/vfs_bio.c
5075
p = bp->b_pages[index];
sys/kern/vfs_bio.c
5076
bp->b_pages[index] = NULL;
sys/kern/vfs_bio.c
5080
bp->b_npages = newnpages;
sys/kern/vfs_bio.c
5098
vmapbuf(struct buf *bp, void *uaddr, size_t len, int mapbuf)
sys/kern/vfs_bio.c
5103
MPASS((bp->b_flags & B_MAXPHYS) != 0);
sys/kern/vfs_bio.c
5105
if (bp->b_iocmd == BIO_READ)
sys/kern/vfs_bio.c
5108
(vm_offset_t)uaddr, len, prot, bp->b_pages, PBUF_PAGES);
sys/kern/vfs_bio.c
5111
bp->b_bufsize = len;
sys/kern/vfs_bio.c
5112
bp->b_npages = pidx;
sys/kern/vfs_bio.c
5113
bp->b_offset = ((vm_offset_t)uaddr) & PAGE_MASK;
sys/kern/vfs_bio.c
5115
pmap_qenter((vm_offset_t)bp->b_kvabase, bp->b_pages, pidx);
sys/kern/vfs_bio.c
5116
bp->b_data = bp->b_kvabase + bp->b_offset;
sys/kern/vfs_bio.c
5118
bp->b_data = unmapped_buf;
sys/kern/vfs_bio.c
5129
vunmapbuf(struct buf *bp)
sys/kern/vfs_bio.c
5133
npages = bp->b_npages;
sys/kern/vfs_bio.c
5134
if (buf_mapped(bp))
sys/kern/vfs_bio.c
5135
pmap_qremove(trunc_page((vm_offset_t)bp->b_data), npages);
sys/kern/vfs_bio.c
5136
vm_page_unhold_pages(bp->b_pages, npages);
sys/kern/vfs_bio.c
5138
bp->b_data = unmapped_buf;
sys/kern/vfs_bio.c
5142
bdone(struct buf *bp)
sys/kern/vfs_bio.c
5146
mtxp = mtx_pool_find(mtxpool_sleep, bp);
sys/kern/vfs_bio.c
5148
bp->b_flags |= B_DONE;
sys/kern/vfs_bio.c
5149
wakeup(bp);
sys/kern/vfs_bio.c
5154
bwait(struct buf *bp, u_char pri, const char *wchan)
sys/kern/vfs_bio.c
5158
mtxp = mtx_pool_find(mtxpool_sleep, bp);
sys/kern/vfs_bio.c
5160
while ((bp->b_flags & B_DONE) == 0)
sys/kern/vfs_bio.c
5161
msleep(bp, mtxp, pri, wchan, 0);
sys/kern/vfs_bio.c
5173
bufstrategy(struct bufobj *bo, struct buf *bp)
sys/kern/vfs_bio.c
5178
vp = bp->b_vp;
sys/kern/vfs_bio.c
5181
("Wrong vnode in bufstrategy(bp=%p, vp=%p)", bp, vp));
sys/kern/vfs_bio.c
5182
i = VOP_STRATEGY(vp, bp);
sys/kern/vfs_bio.c
5183
KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
sys/kern/vfs_bio.c
5259
bdata2bio(struct buf *bp, struct bio *bip)
sys/kern/vfs_bio.c
5262
if (!buf_mapped(bp)) {
sys/kern/vfs_bio.c
5264
bip->bio_ma = bp->b_pages;
sys/kern/vfs_bio.c
5265
bip->bio_ma_n = bp->b_npages;
sys/kern/vfs_bio.c
5267
bip->bio_ma_offset = (vm_offset_t)bp->b_offset & PAGE_MASK;
sys/kern/vfs_bio.c
5270
PAGE_SIZE == bp->b_npages,
sys/kern/vfs_bio.c
5271
("Buffer %p too short: %d %lld %d", bp, bip->bio_ma_offset,
sys/kern/vfs_bio.c
5274
bip->bio_data = bp->b_data;
sys/kern/vfs_bio.c
5323
struct buf *bp;
sys/kern/vfs_bio.c
5407
curthread->td_ucred, br_flags, &bp);
sys/kern/vfs_bio.c
5410
if (bp->b_rcred == curthread->td_ucred) {
sys/kern/vfs_bio.c
5411
crfree(bp->b_rcred);
sys/kern/vfs_bio.c
5412
bp->b_rcred = NOCRED;
sys/kern/vfs_bio.c
5414
if (LIST_EMPTY(&bp->b_dep)) {
sys/kern/vfs_bio.c
5429
bp->b_flags |= B_RELBUF;
sys/kern/vfs_bio.c
5431
bp->b_flags &= ~B_NOCACHE;
sys/kern/vfs_bio.c
5432
brelse(bp);
sys/kern/vfs_bio.c
5434
bqrelse(bp);
sys/kern/vfs_bio.c
5488
struct buf *bp = (struct buf *)addr;
sys/kern/vfs_bio.c
5498
db_printf("buf at %p\n", bp);
sys/kern/vfs_bio.c
5500
(u_int)bp->b_flags, PRINT_BUF_FLAGS,
sys/kern/vfs_bio.c
5501
(u_int)bp->b_xflags, PRINT_BUF_XFLAGS);
sys/kern/vfs_bio.c
5503
(u_int)bp->b_vflags, PRINT_BUF_VFLAGS,
sys/kern/vfs_bio.c
5504
(u_int)bp->b_ioflags, PRINT_BIO_FLAGS);
sys/kern/vfs_bio.c
5509
bp->b_error, bp->b_bufsize, bp->b_bcount, bp->b_resid,
sys/kern/vfs_bio.c
5510
bp->b_bufobj, bp->b_data, (intmax_t)bp->b_blkno,
sys/kern/vfs_bio.c
5511
(intmax_t)bp->b_lblkno, bp->b_vp, bp->b_dep.lh_first);
sys/kern/vfs_bio.c
5513
bp->b_kvabase, bp->b_kvasize);
sys/kern/vfs_bio.c
5514
if (bp->b_npages) {
sys/kern/vfs_bio.c
5516
db_printf("b_npages = %d, pages(OBJ, IDX, PA): ", bp->b_npages);
sys/kern/vfs_bio.c
5517
for (i = 0; i < bp->b_npages; i++) {
sys/kern/vfs_bio.c
5519
m = bp->b_pages[i];
sys/kern/vfs_bio.c
5526
if ((i + 1) < bp->b_npages)
sys/kern/vfs_bio.c
5531
BUF_LOCKPRINTINFO(bp);
sys/kern/vfs_bio.c
5532
if ((bp->b_ioflags & BIO_EXTERR) != 0)
sys/kern/vfs_bio.c
5533
exterr_db_print(&bp->b_exterr);
sys/kern/vfs_bio.c
5535
db_printf("b_io_tracking: b_io_tcnt = %u\n", bp->b_io_tcnt);
sys/kern/vfs_bio.c
5537
i = bp->b_io_tcnt % BUF_TRACKING_SIZE;
sys/kern/vfs_bio.c
5539
if (bp->b_io_tracking[BUF_TRACKING_ENTRY(i - j)] == NULL)
sys/kern/vfs_bio.c
5542
bp->b_io_tracking[BUF_TRACKING_ENTRY(i - j)]);
sys/kern/vfs_bio.c
5545
db_printf("b_io_tracking: %s\n", bp->b_io_tracking);
sys/kern/vfs_bio.c
5552
struct buf *bp;
sys/kern/vfs_bio.c
5577
TAILQ_FOREACH(bp, &bd->bd_cleanq->bq_queue, b_freelist)
sys/kern/vfs_bio.c
5578
total += bp->b_bufsize;
sys/kern/vfs_bio.c
5582
TAILQ_FOREACH(bp, &bd->bd_dirtyq.bq_queue, b_freelist)
sys/kern/vfs_bio.c
5583
total += bp->b_bufsize;
sys/kern/vfs_bio.c
5595
bp = nbufp(j);
sys/kern/vfs_bio.c
5596
if (bp->b_domain == i && BUF_ISLOCKED(bp)) {
sys/kern/vfs_bio.c
5598
total += bp->b_bufsize;
sys/kern/vfs_bio.c
5605
bp = nbufp(j);
sys/kern/vfs_bio.c
5606
if (bp->b_domain == i) {
sys/kern/vfs_bio.c
5608
total += bp->b_bufsize;
sys/kern/vfs_bio.c
5617
struct buf *bp;
sys/kern/vfs_bio.c
5621
bp = nbufp(i);
sys/kern/vfs_bio.c
5622
if (BUF_ISLOCKED(bp)) {
sys/kern/vfs_bio.c
5623
db_show_buffer((uintptr_t)bp, 1, 0, NULL);
sys/kern/vfs_bio.c
5634
struct buf *bp;
sys/kern/vfs_bio.c
5642
TAILQ_FOREACH(bp, &vp->v_bufobj.bo_clean.bv_hd, b_bobufs) {
sys/kern/vfs_bio.c
5643
db_show_buffer((uintptr_t)bp, 1, 0, NULL);
sys/kern/vfs_bio.c
5647
TAILQ_FOREACH(bp, &vp->v_bufobj.bo_dirty.bv_hd, b_bobufs) {
sys/kern/vfs_bio.c
5648
db_show_buffer((uintptr_t)bp, 1, 0, NULL);
sys/kern/vfs_bio.c
5655
struct buf *bp;
sys/kern/vfs_bio.c
5664
bp = nbufp(i);
sys/kern/vfs_bio.c
5665
if (bp->b_qindex == QUEUE_EMPTY)
sys/kern/vfs_bio.c
581
bdirtysub(struct buf *bp)
sys/kern/vfs_bio.c
586
bd = bufdomain(bp);
sys/kern/vfs_bio.c
601
bdirtyadd(struct buf *bp)
sys/kern/vfs_bio.c
610
bd = bufdomain(bp);
sys/kern/vfs_bio.c
645
bufspace_adjust(struct buf *bp, int bufsize)
sys/kern/vfs_bio.c
651
KASSERT((bp->b_flags & B_MALLOC) == 0,
sys/kern/vfs_bio.c
652
("bufspace_adjust: malloc buf %p", bp));
sys/kern/vfs_bio.c
653
bd = bufdomain(bp);
sys/kern/vfs_bio.c
654
diff = bufsize - bp->b_bufsize;
sys/kern/vfs_bio.c
664
bp->b_bufsize = bufsize;
sys/kern/vfs_bio.c
886
bufmallocadjust(struct buf *bp, int bufsize)
sys/kern/vfs_bio.c
890
KASSERT((bp->b_flags & B_MALLOC) != 0,
sys/kern/vfs_bio.c
891
("bufmallocadjust: non-malloc buf %p", bp));
sys/kern/vfs_bio.c
892
diff = bufsize - bp->b_bufsize;
sys/kern/vfs_bio.c
897
bp->b_bufsize = bufsize;
sys/kern/vfs_bio.c
924
runningbufwakeup(struct buf *bp)
sys/kern/vfs_bio.c
928
bspace = bp->b_runningbufspace;
sys/kern/vfs_bio.c
934
bp->b_runningbufspace = 0;
sys/kern/vfs_bio.c
947
runningbufclaim(struct buf *bp, int space)
sys/kern/vfs_bio.c
952
bp->b_runningbufspace = space;
sys/kern/vfs_bio.c
988
vfs_buf_test_cache(struct buf *bp, vm_ooffset_t foff, vm_offset_t off,
sys/kern/vfs_bio.c
997
if (bp->b_flags & B_CACHE) {
sys/kern/vfs_cluster.c
1001
bp->b_bcount += size;
sys/kern/vfs_cluster.c
1002
bp->b_bufsize += size;
sys/kern/vfs_cluster.c
1008
bp->b_flags |= (tbp->b_flags & B_BARRIER);
sys/kern/vfs_cluster.c
1018
TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
sys/kern/vfs_cluster.c
1022
if (buf_mapped(bp)) {
sys/kern/vfs_cluster.c
1023
pmap_qenter(trunc_page((vm_offset_t) bp->b_data),
sys/kern/vfs_cluster.c
1024
(vm_page_t *)bp->b_pages, bp->b_npages);
sys/kern/vfs_cluster.c
1026
if (bp->b_bufsize > bp->b_kvasize)
sys/kern/vfs_cluster.c
1029
bp->b_bufsize, bp->b_kvasize);
sys/kern/vfs_cluster.c
1030
totalwritten += bp->b_bufsize;
sys/kern/vfs_cluster.c
1031
bp->b_dirtyoff = 0;
sys/kern/vfs_cluster.c
1032
bp->b_dirtyend = bp->b_bufsize;
sys/kern/vfs_cluster.c
1033
bawrite(bp);
sys/kern/vfs_cluster.c
1049
struct buf *bp;
sys/kern/vfs_cluster.c
1060
gbflags, &bp);
sys/kern/vfs_cluster.c
1071
buflist->bs_children[i] = bp;
sys/kern/vfs_cluster.c
1072
if (bp->b_blkno == bp->b_lblkno)
sys/kern/vfs_cluster.c
1073
VOP_BMAP(vp, bp->b_lblkno, NULL, &bp->b_blkno,
sys/kern/vfs_cluster.c
1076
buflist->bs_children[i] = bp = last_bp;
sys/kern/vfs_cluster.c
1077
if (bp->b_blkno == bp->b_lblkno)
sys/kern/vfs_cluster.c
1078
VOP_BMAP(vp, bp->b_lblkno, NULL, &bp->b_blkno, NULL, NULL);
sys/kern/vfs_cluster.c
121
error = getblkx(vp, lblkno, lblkno, size, 0, 0, gbflags, &bp);
sys/kern/vfs_cluster.c
128
*bpp = reqbp = bp;
sys/kern/vfs_cluster.c
135
if (bp->b_flags & B_CACHE) {
sys/kern/vfs_cluster.c
138
} else if ((bp->b_flags & B_RAM) == 0) {
sys/kern/vfs_cluster.c
141
bp->b_flags &= ~B_RAM;
sys/kern/vfs_cluster.c
171
reqbp = bp = NULL;
sys/kern/vfs_cluster.c
177
off_t firstread = bp->b_offset;
sys/kern/vfs_cluster.c
181
KASSERT(bp->b_offset != NOOFFSET,
sys/kern/vfs_cluster.c
225
bp = cluster_rbuild(vp, filesize, lblkno,
sys/kern/vfs_cluster.c
226
blkno, size, nblks, gbflags, bp);
sys/kern/vfs_cluster.c
227
lblkno += (bp->b_bufsize / size);
sys/kern/vfs_cluster.c
229
bp->b_flags |= B_RAM;
sys/kern/vfs_cluster.c
230
bp->b_iocmd = BIO_READ;
sys/kern/vfs_cluster.c
238
if (bp) {
sys/kern/vfs_cluster.c
239
if ((bp->b_flags & B_CLUSTER) == 0) {
sys/kern/vfs_cluster.c
240
vfs_busy_pages(bp, 0);
sys/kern/vfs_cluster.c
242
bp->b_flags &= ~B_INVAL;
sys/kern/vfs_cluster.c
243
bp->b_ioflags &= ~BIO_ERROR;
sys/kern/vfs_cluster.c
244
if ((bp->b_flags & B_ASYNC) || bp->b_iodone != NULL)
sys/kern/vfs_cluster.c
245
BUF_KERNPROC(bp);
sys/kern/vfs_cluster.c
246
bp->b_iooffset = dbtob(bp->b_blkno);
sys/kern/vfs_cluster.c
247
bstrategy(bp);
sys/kern/vfs_cluster.c
251
racct_add_buf(td->td_proc, bp, 0);
sys/kern/vfs_cluster.c
343
struct buf *bp, *tbp;
sys/kern/vfs_cluster.c
375
bp = uma_zalloc(cluster_pbuf_zone, M_NOWAIT);
sys/kern/vfs_cluster.c
376
if (bp == NULL)
sys/kern/vfs_cluster.c
378
MPASS((bp->b_flags & B_MAXPHYS) != 0);
sys/kern/vfs_cluster.c
386
bp->b_flags = B_ASYNC | B_CLUSTER | B_VMIO;
sys/kern/vfs_cluster.c
388
bp->b_data = unmapped_buf;
sys/kern/vfs_cluster.c
390
bp->b_data = (char *)((vm_offset_t)bp->b_data |
sys/kern/vfs_cluster.c
393
bp->b_iocmd = BIO_READ;
sys/kern/vfs_cluster.c
394
bp->b_iodone = cluster_callback;
sys/kern/vfs_cluster.c
395
bp->b_blkno = blkno;
sys/kern/vfs_cluster.c
396
bp->b_lblkno = lbn;
sys/kern/vfs_cluster.c
397
bp->b_offset = tbp->b_offset;
sys/kern/vfs_cluster.c
398
KASSERT(bp->b_offset != NOOFFSET, ("cluster_rbuild: no buffer offset"));
sys/kern/vfs_cluster.c
399
pbgetvp(vp, bp);
sys/kern/vfs_cluster.c
401
TAILQ_INIT(&bp->b_cluster.cluster_head);
sys/kern/vfs_cluster.c
403
bp->b_bcount = 0;
sys/kern/vfs_cluster.c
404
bp->b_bufsize = 0;
sys/kern/vfs_cluster.c
405
bp->b_npages = 0;
sys/kern/vfs_cluster.c
414
if ((bp->b_npages * PAGE_SIZE) +
sys/kern/vfs_cluster.c
501
TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
sys/kern/vfs_cluster.c
507
if ((bp->b_npages == 0) ||
sys/kern/vfs_cluster.c
508
(bp->b_pages[bp->b_npages-1] != m)) {
sys/kern/vfs_cluster.c
509
bp->b_pages[bp->b_npages] = m;
sys/kern/vfs_cluster.c
510
bp->b_npages++;
sys/kern/vfs_cluster.c
525
bp->b_bcount += size;
sys/kern/vfs_cluster.c
526
bp->b_bufsize += size;
sys/kern/vfs_cluster.c
533
for (j = 0; j < bp->b_npages; j++) {
sys/kern/vfs_cluster.c
534
if (vm_page_all_valid(bp->b_pages[j]))
sys/kern/vfs_cluster.c
535
bp->b_pages[j] = bogus_page;
sys/kern/vfs_cluster.c
537
if (bp->b_bufsize > bp->b_kvasize)
sys/kern/vfs_cluster.c
539
bp->b_bufsize, bp->b_kvasize);
sys/kern/vfs_cluster.c
541
if (buf_mapped(bp)) {
sys/kern/vfs_cluster.c
542
pmap_qenter(trunc_page((vm_offset_t) bp->b_data),
sys/kern/vfs_cluster.c
543
(vm_page_t *)bp->b_pages, bp->b_npages);
sys/kern/vfs_cluster.c
545
return (bp);
sys/kern/vfs_cluster.c
555
cluster_callback(struct buf *bp)
sys/kern/vfs_cluster.c
563
if (bp->b_ioflags & BIO_ERROR)
sys/kern/vfs_cluster.c
564
error = bp->b_error;
sys/kern/vfs_cluster.c
566
if (buf_mapped(bp)) {
sys/kern/vfs_cluster.c
567
pmap_qremove(trunc_page((vm_offset_t) bp->b_data),
sys/kern/vfs_cluster.c
568
bp->b_npages);
sys/kern/vfs_cluster.c
574
for (tbp = TAILQ_FIRST(&bp->b_cluster.cluster_head);
sys/kern/vfs_cluster.c
596
pbrelvp(bp);
sys/kern/vfs_cluster.c
597
uma_zfree(cluster_pbuf_zone, bp);
sys/kern/vfs_cluster.c
643
cluster_write(struct vnode *vp, struct vn_clusterw *vnc, struct buf *bp,
sys/kern/vfs_cluster.c
659
lblocksize = bp->b_bufsize;
sys/kern/vfs_cluster.c
661
lbn = bp->b_lblkno;
sys/kern/vfs_cluster.c
662
KASSERT(bp->b_offset != NOOFFSET, ("cluster_write: no buffer offset"));
sys/kern/vfs_cluster.c
669
(bp->b_blkno != vnc->v_lasta + btodb(lblocksize))) {
sys/kern/vfs_cluster.c
689
if ((u_quad_t)bp->b_offset + lblocksize != filesize ||
sys/kern/vfs_cluster.c
699
buflist = cluster_collectbufs(vp, vnc, bp,
sys/kern/vfs_cluster.c
706
bawrite(bp);
sys/kern/vfs_cluster.c
738
vnc->v_lasta = bp->b_blkno;
sys/kern/vfs_cluster.c
749
(u_quad_t) bp->b_offset + lblocksize != filesize &&
sys/kern/vfs_cluster.c
750
bp->b_blkno == bp->b_lblkno &&
sys/kern/vfs_cluster.c
751
(VOP_BMAP(vp, lbn, NULL, &bp->b_blkno, &maxclen,
sys/kern/vfs_cluster.c
752
NULL) != 0 || bp->b_blkno == -1)) {
sys/kern/vfs_cluster.c
753
pbn = bp->b_blkno;
sys/kern/vfs_cluster.c
754
bawrite(bp);
sys/kern/vfs_cluster.c
762
pbn = bp->b_blkno;
sys/kern/vfs_cluster.c
765
bawrite(bp);
sys/kern/vfs_cluster.c
768
bdwrite(bp);
sys/kern/vfs_cluster.c
776
pbn = bp->b_blkno;
sys/kern/vfs_cluster.c
777
bdwrite(bp);
sys/kern/vfs_cluster.c
788
pbn = bp->b_blkno;
sys/kern/vfs_cluster.c
789
bawrite(bp);
sys/kern/vfs_cluster.c
794
pbn = bp->b_blkno;
sys/kern/vfs_cluster.c
795
bdwrite(bp);
sys/kern/vfs_cluster.c
811
struct buf *bp, *tbp;
sys/kern/vfs_cluster.c
863
((bp = uma_zalloc(cluster_pbuf_zone, M_NOWAIT)) == NULL)) {
sys/kern/vfs_cluster.c
870
MPASS((bp->b_flags & B_MAXPHYS) != 0);
sys/kern/vfs_cluster.c
876
TAILQ_INIT(&bp->b_cluster.cluster_head);
sys/kern/vfs_cluster.c
877
bp->b_bcount = 0;
sys/kern/vfs_cluster.c
878
bp->b_bufsize = 0;
sys/kern/vfs_cluster.c
879
bp->b_npages = 0;
sys/kern/vfs_cluster.c
881
bp->b_wcred = crhold(tbp->b_wcred);
sys/kern/vfs_cluster.c
883
bp->b_blkno = tbp->b_blkno;
sys/kern/vfs_cluster.c
884
bp->b_lblkno = tbp->b_lblkno;
sys/kern/vfs_cluster.c
885
bp->b_offset = tbp->b_offset;
sys/kern/vfs_cluster.c
895
bp->b_data = (char *)((vm_offset_t)bp->b_data |
sys/kern/vfs_cluster.c
898
bp->b_data = unmapped_buf;
sys/kern/vfs_cluster.c
900
bp->b_flags |= B_CLUSTER | (tbp->b_flags & (B_VMIO |
sys/kern/vfs_cluster.c
902
bp->b_iodone = cluster_callback;
sys/kern/vfs_cluster.c
903
pbgetvp(vp, bp);
sys/kern/vfs_cluster.c
93
struct buf *bp, *rbp, *reqbp;
sys/kern/vfs_cluster.c
937
(bp->b_flags & (B_VMIO | B_NEEDCOMMIT))) ||
sys/kern/vfs_cluster.c
938
tbp->b_wcred != bp->b_wcred) {
sys/kern/vfs_cluster.c
949
((bp->b_blkno + (dbsize * i)) !=
sys/kern/vfs_cluster.c
951
((tbp->b_npages + bp->b_npages) >
sys/kern/vfs_cluster.c
994
if ((bp->b_npages == 0) ||
sys/kern/vfs_cluster.c
995
(bp->b_pages[bp->b_npages - 1] != m)) {
sys/kern/vfs_cluster.c
996
bp->b_pages[bp->b_npages] = m;
sys/kern/vfs_cluster.c
997
bp->b_npages++;
sys/kern/vfs_default.c
1495
vop_bypass_t *bp;
sys/kern/vfs_default.c
1498
bp = bp_by_off(vop, a);
sys/kern/vfs_default.c
1499
MPASS(bp != NULL);
sys/kern/vfs_default.c
1502
rc = bp(a);
sys/kern/vfs_subr.c
2455
struct buf *bp, *nbp;
sys/kern/vfs_subr.c
2463
TAILQ_FOREACH_SAFE(bp, &bufv->bv_hd, b_bobufs, nbp) {
sys/kern/vfs_subr.c
2472
(((flags & V_NORMAL) && (bp->b_xflags & BX_ALTDATA) != 0) ||
sys/kern/vfs_subr.c
2473
((flags & V_ALT) && (bp->b_xflags & BX_ALTDATA) == 0))) {
sys/kern/vfs_subr.c
2481
error = BUF_TIMELOCK(bp,
sys/kern/vfs_subr.c
2488
KASSERT(bp->b_bufobj == bo,
sys/kern/vfs_subr.c
2490
bp, bp->b_bufobj, bo));
sys/kern/vfs_subr.c
2497
if (((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI) &&
sys/kern/vfs_subr.c
2499
bremfree(bp);
sys/kern/vfs_subr.c
2500
bp->b_flags |= B_ASYNC;
sys/kern/vfs_subr.c
2501
bwrite(bp);
sys/kern/vfs_subr.c
2505
bremfree(bp);
sys/kern/vfs_subr.c
2506
bp->b_flags |= (B_INVAL | B_RELBUF);
sys/kern/vfs_subr.c
2507
bp->b_flags &= ~B_ASYNC;
sys/kern/vfs_subr.c
2508
brelse(bp);
sys/kern/vfs_subr.c
2523
struct buf *bp;
sys/kern/vfs_subr.c
2531
bp = buf_lookup_ge(bufv, lblkno);
sys/kern/vfs_subr.c
2532
if (bp == NULL || bp->b_lblkno >= endn)
sys/kern/vfs_subr.c
2534
error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL |
sys/kern/vfs_subr.c
2542
KASSERT(bp->b_bufobj == bo,
sys/kern/vfs_subr.c
2544
bp, bp->b_bufobj, bo));
sys/kern/vfs_subr.c
2545
lblkno = bp->b_lblkno + 1;
sys/kern/vfs_subr.c
2546
if ((bp->b_flags & B_MANAGED) == 0)
sys/kern/vfs_subr.c
2547
bremfree(bp);
sys/kern/vfs_subr.c
2548
bp->b_flags |= B_RELBUF;
sys/kern/vfs_subr.c
2555
if ((bp->b_flags & B_VMIO) != 0)
sys/kern/vfs_subr.c
2556
bp->b_flags |= B_NOREUSE;
sys/kern/vfs_subr.c
2557
brelse(bp);
sys/kern/vfs_subr.c
2571
struct buf *bp, *nbp;
sys/kern/vfs_subr.c
2597
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/kern/vfs_subr.c
2598
if (bp->b_lblkno >= 0)
sys/kern/vfs_subr.c
2604
if (BUF_LOCK(bp,
sys/kern/vfs_subr.c
2609
VNASSERT((bp->b_flags & B_DELWRI), vp,
sys/kern/vfs_subr.c
2610
("buf(%p) on dirty queue without DELWRI", bp));
sys/kern/vfs_subr.c
2612
bremfree(bp);
sys/kern/vfs_subr.c
2613
bawrite(bp);
sys/kern/vfs_subr.c
2658
struct buf *bp, *nbp;
sys/kern/vfs_subr.c
2669
bp = buf_lookup_ge(bv, startlbn);
sys/kern/vfs_subr.c
2670
if (bp == NULL)
sys/kern/vfs_subr.c
2672
TAILQ_FOREACH_FROM_SAFE(bp, &bv->bv_hd, b_bobufs, nbp) {
sys/kern/vfs_subr.c
2673
if (bp->b_lblkno >= endlbn)
sys/kern/vfs_subr.c
2675
if (BUF_LOCK(bp,
sys/kern/vfs_subr.c
2682
bremfree(bp);
sys/kern/vfs_subr.c
2683
bp->b_flags |= B_INVAL | B_RELBUF;
sys/kern/vfs_subr.c
2684
bp->b_flags &= ~B_ASYNC;
sys/kern/vfs_subr.c
2685
brelse(bp);
sys/kern/vfs_subr.c
2701
buf_vlist_remove(struct buf *bp)
sys/kern/vfs_subr.c
2706
flags = bp->b_xflags;
sys/kern/vfs_subr.c
2708
KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
sys/kern/vfs_subr.c
2709
ASSERT_BO_WLOCKED(bp->b_bufobj);
sys/kern/vfs_subr.c
2712
("%s: buffer %p has invalid queue state", __func__, bp));
sys/kern/vfs_subr.c
2715
bv = &bp->b_bufobj->bo_dirty;
sys/kern/vfs_subr.c
2717
bv = &bp->b_bufobj->bo_clean;
sys/kern/vfs_subr.c
2718
BUF_PCTRIE_REMOVE(&bv->bv_root, bp->b_lblkno);
sys/kern/vfs_subr.c
2719
TAILQ_REMOVE(&bv->bv_hd, bp, b_bobufs);
sys/kern/vfs_subr.c
2721
bp->b_xflags &= ~(BX_VNDIRTY | BX_VNCLEAN);
sys/kern/vfs_subr.c
2730
buf_vlist_find_or_add(struct buf *bp, struct bufobj *bo, b_xflags_t xflags)
sys/kern/vfs_subr.c
2741
KASSERT((bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) == xflags,
sys/kern/vfs_subr.c
2742
("buf_vlist_add: b_xflags %#x not set on bp %p", xflags, bp));
sys/kern/vfs_subr.c
2749
error = buf_insert_lookup_le(bv, bp, &n);
sys/kern/vfs_subr.c
2753
bp));
sys/kern/vfs_subr.c
2755
KASSERT(n->b_lblkno <= bp->b_lblkno,
sys/kern/vfs_subr.c
2757
bp, n));
sys/kern/vfs_subr.c
2758
KASSERT((n->b_lblkno == bp->b_lblkno) == (error == EEXIST),
sys/kern/vfs_subr.c
2760
"error %d bp %p n %p", error, bp, n));
sys/kern/vfs_subr.c
2768
bp->b_lblkno < TAILQ_FIRST(&bv->bv_hd)->b_lblkno,
sys/kern/vfs_subr.c
2771
bp, TAILQ_FIRST(&bv->bv_hd)));
sys/kern/vfs_subr.c
2772
TAILQ_INSERT_HEAD(&bv->bv_hd, bp, b_bobufs);
sys/kern/vfs_subr.c
2775
bp->b_lblkno < TAILQ_NEXT(n, b_bobufs)->b_lblkno,
sys/kern/vfs_subr.c
2778
bp, TAILQ_NEXT(n, b_bobufs)));
sys/kern/vfs_subr.c
2779
TAILQ_INSERT_AFTER(&bv->bv_hd, n, bp, b_bobufs);
sys/kern/vfs_subr.c
2792
buf_vlist_add(struct buf *bp, struct bufobj *bo, b_xflags_t xflags)
sys/kern/vfs_subr.c
2796
KASSERT((bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) == 0,
sys/kern/vfs_subr.c
2797
("buf_vlist_add: Buf %p has existing xflags %d", bp, bp->b_xflags));
sys/kern/vfs_subr.c
2798
bp->b_xflags |= xflags;
sys/kern/vfs_subr.c
2799
error = buf_vlist_find_or_add(bp, bo, xflags);
sys/kern/vfs_subr.c
2810
struct buf *bp;
sys/kern/vfs_subr.c
2813
bp = BUF_PCTRIE_LOOKUP(&bo->bo_clean.bv_root, lblkno);
sys/kern/vfs_subr.c
2814
if (bp != NULL)
sys/kern/vfs_subr.c
2815
return (bp);
sys/kern/vfs_subr.c
2828
struct buf *bp;
sys/kern/vfs_subr.c
2831
bp = BUF_PCTRIE_LOOKUP_UNLOCKED(&bo->bo_clean.bv_root, lblkno);
sys/kern/vfs_subr.c
2832
if (bp != NULL)
sys/kern/vfs_subr.c
2833
return (bp);
sys/kern/vfs_subr.c
2841
bgetvp(struct vnode *vp, struct buf *bp)
sys/kern/vfs_subr.c
2848
VNASSERT(bp->b_vp == NULL, bp->b_vp, ("bgetvp: not free"));
sys/kern/vfs_subr.c
2850
CTR3(KTR_BUF, "bgetvp(%p) vp %p flags %X", bp, vp, bp->b_flags);
sys/kern/vfs_subr.c
2851
VNASSERT((bp->b_xflags & (BX_VNDIRTY|BX_VNCLEAN)) == 0, vp,
sys/kern/vfs_subr.c
2852
("bgetvp: bp already attached! %p", bp));
sys/kern/vfs_subr.c
2858
bp->b_vp = vp;
sys/kern/vfs_subr.c
2859
bp->b_bufobj = bo;
sys/kern/vfs_subr.c
2860
bp->b_xflags |= BX_VNCLEAN;
sys/kern/vfs_subr.c
2863
if (BUF_PCTRIE_LOOKUP(&bo->bo_dirty.bv_root, bp->b_lblkno) == NULL)
sys/kern/vfs_subr.c
2864
error = buf_vlist_find_or_add(bp, bo, BX_VNCLEAN);
sys/kern/vfs_subr.c
2872
bp->b_vp = NULL;
sys/kern/vfs_subr.c
2873
bp->b_bufobj = NULL;
sys/kern/vfs_subr.c
2874
bp->b_xflags &= ~BX_VNCLEAN;
sys/kern/vfs_subr.c
2882
brelvp(struct buf *bp)
sys/kern/vfs_subr.c
2887
CTR3(KTR_BUF, "brelvp(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_subr.c
2888
KASSERT(bp->b_vp != NULL, ("brelvp: NULL"));
sys/kern/vfs_subr.c
2893
vp = bp->b_vp; /* XXX */
sys/kern/vfs_subr.c
2894
bo = bp->b_bufobj;
sys/kern/vfs_subr.c
2896
buf_vlist_remove(bp);
sys/kern/vfs_subr.c
2904
bp->b_vp = NULL;
sys/kern/vfs_subr.c
2905
bp->b_bufobj = NULL;
sys/kern/vfs_subr.c
3214
reassignbuf(struct buf *bp)
sys/kern/vfs_subr.c
3223
vp = bp->b_vp;
sys/kern/vfs_subr.c
3224
bo = bp->b_bufobj;
sys/kern/vfs_subr.c
3226
KASSERT((bp->b_flags & B_PAGING) == 0,
sys/kern/vfs_subr.c
3227
("%s: cannot reassign paging buffer %p", __func__, bp));
sys/kern/vfs_subr.c
3230
bp, bp->b_vp, bp->b_flags);
sys/kern/vfs_subr.c
3243
buf_vlist_remove(bp);
sys/kern/vfs_subr.c
3249
if (bp->b_flags & B_DELWRI) {
sys/kern/vfs_subr.c
3263
buf_vlist_add(bp, bo, BX_VNDIRTY);
sys/kern/vfs_subr.c
3265
buf_vlist_add(bp, bo, BX_VNCLEAN);
sys/kern/vfs_subr.c
3277
bp = TAILQ_FIRST(&bv->bv_hd);
sys/kern/vfs_subr.c
3278
KASSERT(bp == NULL || bp->b_bufobj == bo,
sys/kern/vfs_subr.c
3279
("bp %p wrong b_bufobj %p should be %p", bp, bp->b_bufobj, bo));
sys/kern/vfs_subr.c
3280
bp = TAILQ_LAST(&bv->bv_hd, buflists);
sys/kern/vfs_subr.c
3281
KASSERT(bp == NULL || bp->b_bufobj == bo,
sys/kern/vfs_subr.c
3282
("bp %p wrong b_bufobj %p should be %p", bp, bp->b_bufobj, bo));
sys/kern/vfs_subr.c
3284
bp = TAILQ_FIRST(&bv->bv_hd);
sys/kern/vfs_subr.c
3285
KASSERT(bp == NULL || bp->b_bufobj == bo,
sys/kern/vfs_subr.c
3286
("bp %p wrong b_bufobj %p should be %p", bp, bp->b_bufobj, bo));
sys/kern/vfs_subr.c
3287
bp = TAILQ_LAST(&bv->bv_hd, buflists);
sys/kern/vfs_subr.c
3288
KASSERT(bp == NULL || bp->b_bufobj == bo,
sys/kern/vfs_subr.c
3289
("bp %p wrong b_bufobj %p should be %p", bp, bp->b_bufobj, bo));
sys/kern/vfs_subr.c
544
struct buf *bp;
sys/kern/vfs_subr.c
546
bp = BUF_PCTRIE_LOOKUP_GE(&bv->bv_root, lblkno);
sys/kern/vfs_subr.c
547
if (bp == NULL && lblkno < 0)
sys/kern/vfs_subr.c
548
bp = BUF_PCTRIE_LOOKUP_GE(&bv->bv_root, 0);
sys/kern/vfs_subr.c
549
if (bp != NULL && bp->b_lblkno < lblkno)
sys/kern/vfs_subr.c
550
bp = NULL;
sys/kern/vfs_subr.c
551
return (bp);
sys/kern/vfs_subr.c
559
buf_insert_lookup_le(struct bufv *bv, struct buf *bp, struct buf **n)
sys/kern/vfs_subr.c
563
error = BUF_PCTRIE_INSERT_LOOKUP_LE(&bv->bv_root, bp, n);
sys/kern/vfs_subr.c
565
if (*n == NULL && bp->b_lblkno >= 0)
sys/kern/vfs_subr.c
567
if (*n != NULL && (*n)->b_lblkno >= bp->b_lblkno)
sys/kern/vfs_subr.c
5992
struct buf *bp;
sys/kern/vfs_subr.c
5995
bp = a->a_bp;
sys/kern/vfs_subr.c
6000
if ((bp->b_flags & B_CLUSTER) != 0)
sys/kern/vfs_subr.c
6003
BUF_ASSERT_LOCKED(bp);
sys/kern/vfs_vnops.c
3193
struct buf *bp, *nbp;
sys/kern/vfs_vnops.c
3212
TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) {
sys/kern/vfs_vnops.c
3213
bp->b_vflags &= ~BV_SCANNED;
sys/kern/vfs_vnops.c
3214
bp->b_error = 0;
sys/kern/vfs_vnops.c
3221
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/kern/vfs_vnops.c
3222
if ((bp->b_vflags & BV_SCANNED) != 0)
sys/kern/vfs_vnops.c
3224
bp->b_vflags |= BV_SCANNED;
sys/kern/vfs_vnops.c
3225
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL)) {
sys/kern/vfs_vnops.c
3228
if (BUF_LOCK(bp,
sys/kern/vfs_vnops.c
3237
KASSERT(bp->b_bufobj == bo,
sys/kern/vfs_vnops.c
3239
bp, bp->b_bufobj, bo));
sys/kern/vfs_vnops.c
3240
if ((bp->b_flags & B_DELWRI) == 0)
sys/kern/vfs_vnops.c
3242
if ((vp->v_object != NULL) && (bp->b_flags & B_CLUSTEROK)) {
sys/kern/vfs_vnops.c
3243
vfs_bio_awrite(bp);
sys/kern/vfs_vnops.c
3245
bremfree(bp);
sys/kern/vfs_vnops.c
3246
bawrite(bp);
sys/kern/vfs_vnops.c
3268
TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs)
sys/kern/vfs_vnops.c
3269
if ((error = bp->b_error) != 0)
sys/net/altq/altq_rmclass.c
817
rm_class_t *p, *bp;
sys/net/altq/altq_rmclass.c
820
if ((bp = ifd->active_[i]) != NULL) {
sys/net/altq/altq_rmclass.c
821
p = bp;
sys/net/altq/altq_rmclass.c
828
} while (p != bp);
sys/net/bpf.c
1043
if (__predict_false(d->bd_bif != bp)) {
sys/net/bpf.c
1052
error = bp->bif_methods->bif_write(bp->bif_softc, m, mc, d->bd_flags);
sys/net/bpf.c
106
bif_attachd(struct bpf_if *bp)
sys/net/bpf.c
108
if (bp->bif_methods->bif_attachd != NULL)
sys/net/bpf.c
109
bp->bif_methods->bif_attachd(bp->bif_softc);
sys/net/bpf.c
113
bif_detachd(struct bpf_if *bp)
sys/net/bpf.c
115
if (bp->bif_methods->bif_detachd != NULL)
sys/net/bpf.c
116
bp->bif_methods->bif_detachd(bp->bif_softc);
sys/net/bpf.c
120
bif_wrsize(struct bpf_if *bp)
sys/net/bpf.c
122
if (bp->bif_methods->bif_wrsize != NULL)
sys/net/bpf.c
123
return (bp->bif_methods->bif_wrsize(bp->bif_softc));
sys/net/bpf.c
129
bif_promisc(struct bpf_if *bp, bool on)
sys/net/bpf.c
1294
struct bpf_if *bp = d->bd_bif;
sys/net/bpf.c
1296
if ((error = bif_promisc(bp, true)) == 0)
sys/net/bpf.c
131
if (bp->bif_methods->bif_promisc != NULL)
sys/net/bpf.c
132
return (bp->bif_methods->bif_promisc(bp->bif_softc, on));
sys/net/bpf.c
1368
struct bpf_if *const bp = d->bd_bif;
sys/net/bpf.c
1371
strlcpy(ifr->ifr_name, bp->bif_name,
sys/net/bpf.c
1382
struct bpf_if *bp;
sys/net/bpf.c
139
bif_mac_check_receive(struct bpf_if *bp, struct bpf_d *d)
sys/net/bpf.c
1406
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
1407
if (strncmp(ifr->ifr_name, bp->bif_name,
sys/net/bpf.c
141
if (bp->bif_methods->bif_mac_check_receive != NULL)
sys/net/bpf.c
1411
if (bp != NULL)
sys/net/bpf.c
1412
error = bpf_attachd(d, bp);
sys/net/bpf.c
142
return (bp->bif_methods->bif_mac_check_receive(bp->bif_softc,
sys/net/bpf.c
1726
struct bpf_if *bp;
sys/net/bpf.c
1733
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
1734
allsize += strlen(bp->bif_name) + 1;
sys/net/bpf.c
1753
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
1757
len = strlen(bp->bif_name) + 1;
sys/net/bpf.c
1758
if ((error = copyout(bp->bif_name, uaddr, len)) != 0) {
sys/net/bpf.c
1919
bpf_attachd(struct bpf_d *d, struct bpf_if *bp)
sys/net/bpf.c
1940
if (bp == d->bd_bif) {
sys/net/bpf.c
1964
bpfif_ref(bp);
sys/net/bpf.c
1965
d->bd_bif = bp;
sys/net/bpf.c
1968
CK_LIST_INSERT_HEAD(&bp->bif_wlist, d, bd_next);
sys/net/bpf.c
1977
CK_LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next);
sys/net/bpf.c
1990
bif_attachd(bp);
sys/net/bpf.c
2174
bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen)
sys/net/bpf.c
2187
CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
sys/net/bpf.c
2212
if (bif_mac_check_receive(bp, d) == 0)
sys/net/bpf.c
2234
bpf_mtap(struct bpf_if *bp, struct mbuf *m)
sys/net/bpf.c
2255
CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
sys/net/bpf.c
2275
if (bif_mac_check_receive(bp, d) == 0)
sys/net/bpf.c
2299
bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m)
sys/net/bpf.c
2329
CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
sys/net/bpf.c
2341
if (bif_mac_check_receive(bp, d) == 0)
sys/net/bpf.c
2646
struct bpf_if *bp;
sys/net/bpf.c
2648
bp = malloc(sizeof(*bp), M_BPF, M_WAITOK | M_ZERO);
sys/net/bpf.c
2650
CK_LIST_INIT(&bp->bif_dlist);
sys/net/bpf.c
2651
CK_LIST_INIT(&bp->bif_wlist);
sys/net/bpf.c
2652
bp->bif_dlt = dlt;
sys/net/bpf.c
2653
bp->bif_hdrlen = hdrlen;
sys/net/bpf.c
2654
bp->bif_softc = sc;
sys/net/bpf.c
2655
bp->bif_name = name;
sys/net/bpf.c
2656
bp->bif_methods = methods;
sys/net/bpf.c
2657
refcount_init(&bp->bif_refcnt, 1);
sys/net/bpf.c
2659
LIST_INSERT_HEAD(&V_bpf_iflist, bp, bif_next);
sys/net/bpf.c
2662
return (bp);
sys/net/bpf.c
2673
struct bpf_if *bp;
sys/net/bpf.c
2677
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
2679
if (bp->bif_softc != ifp)
sys/net/bpf.c
2683
while ((d = CK_LIST_FIRST(&bp->bif_dlist)) != NULL) {
sys/net/bpf.c
2688
while ((d = CK_LIST_FIRST(&bp->bif_wlist)) != NULL) {
sys/net/bpf.c
2702
bpf_detach(struct bpf_if *bp)
sys/net/bpf.c
2707
LIST_REMOVE(bp, bif_next);
sys/net/bpf.c
2710
__func__, bp->bif_dlt, bp);
sys/net/bpf.c
2713
while ((d = CK_LIST_FIRST(&bp->bif_dlist)) != NULL) {
sys/net/bpf.c
2718
while ((d = CK_LIST_FIRST(&bp->bif_wlist)) != NULL) {
sys/net/bpf.c
2721
bpfif_rele(bp);
sys/net/bpf.c
2731
bpf_vmove(struct bpf_if *bp)
sys/net/bpf.c
2735
LIST_REMOVE(bp, bif_next);
sys/net/bpf.c
2736
LIST_INSERT_HEAD(&V_bpf_iflist, bp, bif_next);
sys/net/bpf.c
2756
struct bpf_if *bp;
sys/net/bpf.c
2764
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
2765
if (bp->bif_name == name)
sys/net/bpf.c
2777
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
2778
if (bp->bif_name != name)
sys/net/bpf.c
2780
lst[n++] = bp->bif_dlt;
sys/net/bpf.c
2803
struct bpf_if *bp;
sys/net/bpf.c
2816
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
2817
if (bp->bif_name == name && bp->bif_dlt == dlt)
sys/net/bpf.c
2820
if (bp == NULL)
sys/net/bpf.c
2824
bpf_attachd(d, bp);
sys/net/bpf.c
2826
error = bp->bif_methods->bif_promisc(bp->bif_softc, true);
sys/net/bpf.c
2829
__func__, bp->bif_name, error);
sys/net/bpf.c
2855
struct bpf_if *bp;
sys/net/bpf.c
2863
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
2864
CK_LIST_FOREACH(bd, &bp->bif_dlist, bd_next) {
sys/net/bpf.c
2919
struct bpf_if *bp;
sys/net/bpf.c
2950
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
2951
CK_LIST_FOREACH(bd, &bp->bif_wlist, bd_next)
sys/net/bpf.c
2953
CK_LIST_FOREACH(bd, &bp->bif_dlist, bd_next)
sys/net/bpf.c
2966
LIST_FOREACH(bp, &V_bpf_iflist, bif_next) {
sys/net/bpf.c
2968
CK_LIST_FOREACH(bd, &bp->bif_wlist, bd_next) {
sys/net/bpf.c
2973
CK_LIST_FOREACH(bd, &bp->bif_dlist, bd_next) {
sys/net/bpf.c
2997
bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen)
sys/net/bpf.c
3007
bpf_mtap(struct bpf_if *bp, struct mbuf *m)
sys/net/bpf.c
3017
bpf_mtap2(struct bpf_if *bp, void *d, u_int l, struct mbuf *m)
sys/net/bpf.c
343
struct bpf_if *bp;
sys/net/bpf.c
345
bp = __containerof(ctx, struct bpf_if, epoch_ctx);
sys/net/bpf.c
346
free(bp, M_BPF);
sys/net/bpf.c
350
bpfif_ref(struct bpf_if *bp)
sys/net/bpf.c
353
refcount_acquire(&bp->bif_refcnt);
sys/net/bpf.c
357
bpfif_rele(struct bpf_if *bp)
sys/net/bpf.c
360
if (!refcount_release(&bp->bif_refcnt))
sys/net/bpf.c
362
NET_EPOCH_CALL(bpfif_free, &bp->epoch_ctx);
sys/net/bpf.c
668
struct bpf_if *bp;
sys/net/bpf.c
675
if ((bp = d->bd_bif) == NULL)
sys/net/bpf.c
692
bif_detachd(bp);
sys/net/bpf.c
696
(void)bif_promisc(bp, false);
sys/net/bpf.c
699
bpfif_rele(bp);
sys/net/bpf.c
977
struct bpf_if *bp;
sys/net/bpf.c
991
if ((bp = d->bd_bif) == NULL)
sys/net/bpf.c
993
else if (bp->bif_methods->bif_write == NULL)
sys/net/bpf.h
428
void bpf_vmove(struct bpf_if *bp);
sys/net/bridgestp.c
1001
bp->bp_proposed = 0;
sys/net/bridgestp.c
1002
DPRINTF("%s -> ROOT_PROPOSED\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1005
if (bp->bp_state != BSTP_IFSTATE_FORWARDING &&
sys/net/bridgestp.c
1006
(bp->bp_forward_delay_timer.active == 0 ||
sys/net/bridgestp.c
1007
(bstp_rerooted(bs, bp) &&
sys/net/bridgestp.c
1008
bp->bp_recent_backup_timer.active == 0 &&
sys/net/bridgestp.c
1009
bp->bp_protover == BSTP_PROTO_RSTP))) {
sys/net/bridgestp.c
1010
switch (bp->bp_state) {
sys/net/bridgestp.c
1012
bstp_set_port_state(bp, BSTP_IFSTATE_LEARNING);
sys/net/bridgestp.c
1015
bstp_set_port_state(bp,
sys/net/bridgestp.c
1021
if (bp->bp_state == BSTP_IFSTATE_FORWARDING && bp->bp_reroot) {
sys/net/bridgestp.c
1022
bp->bp_reroot = 0;
sys/net/bridgestp.c
1023
DPRINTF("%s -> ROOT_REROOTED\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1028
if (bp->bp_recent_root_timer.active == 0 && bp->bp_reroot) {
sys/net/bridgestp.c
1029
bp->bp_reroot = 0;
sys/net/bridgestp.c
1031
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1034
if ((bp->bp_state == BSTP_IFSTATE_DISCARDING &&
sys/net/bridgestp.c
1035
!bp->bp_synced) || (bp->bp_agreed && !bp->bp_synced) ||
sys/net/bridgestp.c
1036
(bp->bp_operedge && !bp->bp_synced) ||
sys/net/bridgestp.c
1037
(bp->bp_sync && bp->bp_synced)) {
sys/net/bridgestp.c
1038
bstp_timer_stop(&bp->bp_recent_root_timer);
sys/net/bridgestp.c
1039
bp->bp_synced = 1;
sys/net/bridgestp.c
1040
bp->bp_sync = 0;
sys/net/bridgestp.c
1042
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1045
if (bp->bp_state != BSTP_IFSTATE_FORWARDING &&
sys/net/bridgestp.c
1046
!bp->bp_agreed && !bp->bp_proposing &&
sys/net/bridgestp.c
1047
!bp->bp_operedge) {
sys/net/bridgestp.c
1048
bp->bp_proposing = 1;
sys/net/bridgestp.c
1049
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
1050
bstp_timer_start(&bp->bp_edge_delay_timer,
sys/net/bridgestp.c
1051
(bp->bp_ptp_link ? BSTP_DEFAULT_MIGRATE_DELAY :
sys/net/bridgestp.c
1052
bp->bp_desg_max_age));
sys/net/bridgestp.c
1054
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1057
if (bp->bp_state != BSTP_IFSTATE_FORWARDING &&
sys/net/bridgestp.c
1058
(bp->bp_forward_delay_timer.active == 0 || bp->bp_agreed ||
sys/net/bridgestp.c
1059
bp->bp_operedge) &&
sys/net/bridgestp.c
1060
(bp->bp_recent_root_timer.active == 0 || !bp->bp_reroot) &&
sys/net/bridgestp.c
1061
!bp->bp_sync) {
sys/net/bridgestp.c
1062
if (bp->bp_agreed)
sys/net/bridgestp.c
1063
DPRINTF("%s -> AGREED\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1068
if (bp->bp_agreed || bp->bp_operedge ||
sys/net/bridgestp.c
1069
bp->bp_state == BSTP_IFSTATE_LEARNING) {
sys/net/bridgestp.c
1070
bstp_set_port_state(bp,
sys/net/bridgestp.c
1072
bp->bp_agreed = bp->bp_protover;
sys/net/bridgestp.c
1073
} else if (bp->bp_state == BSTP_IFSTATE_DISCARDING)
sys/net/bridgestp.c
1074
bstp_set_port_state(bp, BSTP_IFSTATE_LEARNING);
sys/net/bridgestp.c
1077
if (((bp->bp_sync && !bp->bp_synced) ||
sys/net/bridgestp.c
1078
(bp->bp_reroot && bp->bp_recent_root_timer.active) ||
sys/net/bridgestp.c
1079
(bp->bp_flags & BSTP_PORT_DISPUTED)) && !bp->bp_operedge &&
sys/net/bridgestp.c
1080
bp->bp_state != BSTP_IFSTATE_DISCARDING) {
sys/net/bridgestp.c
1081
bstp_set_port_state(bp, BSTP_IFSTATE_DISCARDING);
sys/net/bridgestp.c
1082
bp->bp_flags &= ~BSTP_PORT_DISPUTED;
sys/net/bridgestp.c
1083
bstp_timer_start(&bp->bp_forward_delay_timer,
sys/net/bridgestp.c
1084
bp->bp_protover == BSTP_PROTO_RSTP ?
sys/net/bridgestp.c
1085
bp->bp_desg_htime : bp->bp_desg_fdelay);
sys/net/bridgestp.c
1087
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1092
if (bp->bp_flags & BSTP_PORT_NEWINFO)
sys/net/bridgestp.c
1093
bstp_transmit(bs, bp);
sys/net/bridgestp.c
1097
bstp_update_tc(struct bstp_port *bp)
sys/net/bridgestp.c
1099
switch (bp->bp_tcstate) {
sys/net/bridgestp.c
1101
if ((bp->bp_role != BSTP_ROLE_DESIGNATED &&
sys/net/bridgestp.c
1102
bp->bp_role != BSTP_ROLE_ROOT) || bp->bp_operedge)
sys/net/bridgestp.c
1103
bstp_set_port_tc(bp, BSTP_TCSTATE_LEARNING);
sys/net/bridgestp.c
1105
if (bp->bp_rcvdtcn)
sys/net/bridgestp.c
1106
bstp_set_port_tc(bp, BSTP_TCSTATE_TCN);
sys/net/bridgestp.c
1107
if (bp->bp_rcvdtc)
sys/net/bridgestp.c
1108
bstp_set_port_tc(bp, BSTP_TCSTATE_TC);
sys/net/bridgestp.c
1110
if (bp->bp_tc_prop && !bp->bp_operedge)
sys/net/bridgestp.c
1111
bstp_set_port_tc(bp, BSTP_TCSTATE_PROPAG);
sys/net/bridgestp.c
1113
if (bp->bp_rcvdtca)
sys/net/bridgestp.c
1114
bstp_set_port_tc(bp, BSTP_TCSTATE_ACK);
sys/net/bridgestp.c
1118
if ((bp->bp_state == BSTP_IFSTATE_LEARNING ||
sys/net/bridgestp.c
1119
bp->bp_state == BSTP_IFSTATE_FORWARDING) &&
sys/net/bridgestp.c
1120
bp->bp_fdbflush == 0)
sys/net/bridgestp.c
1121
bstp_set_port_tc(bp, BSTP_TCSTATE_LEARNING);
sys/net/bridgestp.c
1125
if (bp->bp_rcvdtc || bp->bp_rcvdtcn || bp->bp_rcvdtca ||
sys/net/bridgestp.c
1126
bp->bp_tc_prop)
sys/net/bridgestp.c
1127
bstp_set_port_tc(bp, BSTP_TCSTATE_LEARNING);
sys/net/bridgestp.c
1128
else if (bp->bp_role != BSTP_ROLE_DESIGNATED &&
sys/net/bridgestp.c
1129
bp->bp_role != BSTP_ROLE_ROOT &&
sys/net/bridgestp.c
1130
bp->bp_state == BSTP_IFSTATE_DISCARDING)
sys/net/bridgestp.c
1131
bstp_set_port_tc(bp, BSTP_TCSTATE_INACTIVE);
sys/net/bridgestp.c
1133
if ((bp->bp_role == BSTP_ROLE_DESIGNATED ||
sys/net/bridgestp.c
1134
bp->bp_role == BSTP_ROLE_ROOT) &&
sys/net/bridgestp.c
1135
bp->bp_state == BSTP_IFSTATE_FORWARDING &&
sys/net/bridgestp.c
1136
!bp->bp_operedge)
sys/net/bridgestp.c
1137
bstp_set_port_tc(bp, BSTP_TCSTATE_DETECTED);
sys/net/bridgestp.c
1147
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1154
bstp_update_info(struct bstp_port *bp)
sys/net/bridgestp.c
1156
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1158
bp->bp_proposing = 0;
sys/net/bridgestp.c
1159
bp->bp_proposed = 0;
sys/net/bridgestp.c
1161
if (bp->bp_agreed && !bstp_pdu_bettersame(bp, BSTP_INFO_MINE))
sys/net/bridgestp.c
1162
bp->bp_agreed = 0;
sys/net/bridgestp.c
1164
if (bp->bp_synced && !bp->bp_agreed) {
sys/net/bridgestp.c
1165
bp->bp_synced = 0;
sys/net/bridgestp.c
1170
bp->bp_port_pv = bp->bp_desg_pv;
sys/net/bridgestp.c
1171
bp->bp_port_msg_age = bp->bp_desg_msg_age;
sys/net/bridgestp.c
1172
bp->bp_port_max_age = bp->bp_desg_max_age;
sys/net/bridgestp.c
1173
bp->bp_port_fdelay = bp->bp_desg_fdelay;
sys/net/bridgestp.c
1174
bp->bp_port_htime = bp->bp_desg_htime;
sys/net/bridgestp.c
1175
bp->bp_infois = BSTP_INFO_MINE;
sys/net/bridgestp.c
1178
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
1183
bstp_set_other_tcprop(struct bstp_port *bp)
sys/net/bridgestp.c
1185
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1191
if (bp2 == bp)
sys/net/bridgestp.c
1200
struct bstp_port *bp;
sys/net/bridgestp.c
1204
LIST_FOREACH(bp, &bs->bs_bplist, bp_next)
sys/net/bridgestp.c
1205
bp->bp_reroot = 1;
sys/net/bridgestp.c
1211
struct bstp_port *bp;
sys/net/bridgestp.c
1215
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
1216
bp->bp_sync = 1;
sys/net/bridgestp.c
1217
bp->bp_synced = 0; /* Not explicit in spec */
sys/net/bridgestp.c
1224
bstp_set_port_state(struct bstp_port *bp, int state)
sys/net/bridgestp.c
1226
if (bp->bp_state == state)
sys/net/bridgestp.c
1229
bp->bp_state = state;
sys/net/bridgestp.c
1231
switch (bp->bp_state) {
sys/net/bridgestp.c
1234
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1239
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1241
bstp_timer_start(&bp->bp_forward_delay_timer,
sys/net/bridgestp.c
1242
bp->bp_protover == BSTP_PROTO_RSTP ?
sys/net/bridgestp.c
1243
bp->bp_desg_htime : bp->bp_desg_fdelay);
sys/net/bridgestp.c
1248
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1250
bstp_timer_stop(&bp->bp_forward_delay_timer);
sys/net/bridgestp.c
1252
bp->bp_forward_transitions++;
sys/net/bridgestp.c
1257
taskqueue_enqueue(taskqueue_swi, &bp->bp_statetask);
sys/net/bridgestp.c
1261
bstp_set_port_role(struct bstp_port *bp, int role)
sys/net/bridgestp.c
1263
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1265
if (bp->bp_role == role)
sys/net/bridgestp.c
1269
switch (bp->bp_role) {
sys/net/bridgestp.c
1271
bstp_timer_start(&bp->bp_forward_delay_timer,
sys/net/bridgestp.c
1272
bp->bp_desg_max_age);
sys/net/bridgestp.c
1276
bstp_timer_start(&bp->bp_recent_backup_timer,
sys/net/bridgestp.c
1277
bp->bp_desg_htime * 2);
sys/net/bridgestp.c
1280
bstp_timer_start(&bp->bp_forward_delay_timer,
sys/net/bridgestp.c
1281
bp->bp_desg_fdelay);
sys/net/bridgestp.c
1282
bp->bp_sync = 0;
sys/net/bridgestp.c
1283
bp->bp_synced = 1;
sys/net/bridgestp.c
1284
bp->bp_reroot = 0;
sys/net/bridgestp.c
1288
bstp_timer_start(&bp->bp_recent_root_timer,
sys/net/bridgestp.c
1293
bp->bp_role = role;
sys/net/bridgestp.c
1295
bp->bp_proposing = 0;
sys/net/bridgestp.c
1299
switch (bp->bp_role) {
sys/net/bridgestp.c
1304
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1305
bstp_set_port_state(bp, BSTP_IFSTATE_DISCARDING);
sys/net/bridgestp.c
1306
bstp_timer_stop(&bp->bp_recent_root_timer);
sys/net/bridgestp.c
1307
bstp_timer_latch(&bp->bp_forward_delay_timer);
sys/net/bridgestp.c
1308
bp->bp_sync = 0;
sys/net/bridgestp.c
1309
bp->bp_synced = 1;
sys/net/bridgestp.c
1310
bp->bp_reroot = 0;
sys/net/bridgestp.c
1315
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1316
bstp_set_port_state(bp, BSTP_IFSTATE_DISCARDING);
sys/net/bridgestp.c
1317
bstp_timer_latch(&bp->bp_recent_root_timer);
sys/net/bridgestp.c
1318
bp->bp_proposing = 0;
sys/net/bridgestp.c
1323
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1324
bstp_timer_start(&bp->bp_hello_timer,
sys/net/bridgestp.c
1325
bp->bp_desg_htime);
sys/net/bridgestp.c
1326
bp->bp_agree = 0;
sys/net/bridgestp.c
1331
bstp_update_tc(bp);
sys/net/bridgestp.c
1335
bstp_set_port_proto(struct bstp_port *bp, int proto)
sys/net/bridgestp.c
1337
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1343
bstp_timer_stop(&bp->bp_migrate_delay_timer);
sys/net/bridgestp.c
1345
bp->bp_operedge = 0;
sys/net/bridgestp.c
1347
if (bp->bp_path_cost > 65535)
sys/net/bridgestp.c
1348
bp->bp_path_cost = 65535;
sys/net/bridgestp.c
1352
bstp_timer_start(&bp->bp_migrate_delay_timer,
sys/net/bridgestp.c
1361
bp->bp_protover = proto;
sys/net/bridgestp.c
1362
bp->bp_flags &= ~BSTP_PORT_CANMIGRATE;
sys/net/bridgestp.c
1366
bstp_set_port_tc(struct bstp_port *bp, int state)
sys/net/bridgestp.c
1368
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1370
bp->bp_tcstate = state;
sys/net/bridgestp.c
1373
switch (bp->bp_tcstate) {
sys/net/bridgestp.c
1375
DPRINTF("%s -> TC_ACTIVE\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1380
bstp_timer_stop(&bp->bp_tc_timer);
sys/net/bridgestp.c
1382
bp->bp_fdbflush = 1;
sys/net/bridgestp.c
1383
taskqueue_enqueue(taskqueue_swi, &bp->bp_rtagetask);
sys/net/bridgestp.c
1384
bp->bp_tc_ack = 0;
sys/net/bridgestp.c
1385
DPRINTF("%s -> TC_INACTIVE\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1389
bp->bp_rcvdtc = 0;
sys/net/bridgestp.c
1390
bp->bp_rcvdtcn = 0;
sys/net/bridgestp.c
1391
bp->bp_rcvdtca = 0;
sys/net/bridgestp.c
1392
bp->bp_tc_prop = 0;
sys/net/bridgestp.c
1393
DPRINTF("%s -> TC_LEARNING\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1397
bstp_set_timer_tc(bp);
sys/net/bridgestp.c
1398
bstp_set_other_tcprop(bp);
sys/net/bridgestp.c
1400
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
1401
bstp_transmit(bs, bp);
sys/net/bridgestp.c
1403
DPRINTF("%s -> TC_DETECTED\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1404
bp->bp_tcstate = BSTP_TCSTATE_ACTIVE; /* UCT */
sys/net/bridgestp.c
1408
bstp_set_timer_tc(bp);
sys/net/bridgestp.c
1409
DPRINTF("%s -> TC_TCN\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1412
bp->bp_rcvdtc = 0;
sys/net/bridgestp.c
1413
bp->bp_rcvdtcn = 0;
sys/net/bridgestp.c
1414
if (bp->bp_role == BSTP_ROLE_DESIGNATED)
sys/net/bridgestp.c
1415
bp->bp_tc_ack = 1;
sys/net/bridgestp.c
1417
bstp_set_other_tcprop(bp);
sys/net/bridgestp.c
1418
DPRINTF("%s -> TC_TC\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1419
bp->bp_tcstate = BSTP_TCSTATE_ACTIVE; /* UCT */
sys/net/bridgestp.c
1424
bp->bp_fdbflush = 1;
sys/net/bridgestp.c
1425
taskqueue_enqueue(taskqueue_swi, &bp->bp_rtagetask);
sys/net/bridgestp.c
1426
bp->bp_tc_prop = 0;
sys/net/bridgestp.c
1427
bstp_set_timer_tc(bp);
sys/net/bridgestp.c
1428
DPRINTF("%s -> TC_PROPAG\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1429
bp->bp_tcstate = BSTP_TCSTATE_ACTIVE; /* UCT */
sys/net/bridgestp.c
1433
bstp_timer_stop(&bp->bp_tc_timer);
sys/net/bridgestp.c
1434
bp->bp_rcvdtca = 0;
sys/net/bridgestp.c
1435
DPRINTF("%s -> TC_ACK\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1436
bp->bp_tcstate = BSTP_TCSTATE_ACTIVE; /* UCT */
sys/net/bridgestp.c
1442
bstp_set_timer_tc(struct bstp_port *bp)
sys/net/bridgestp.c
1444
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1446
if (bp->bp_tc_timer.active)
sys/net/bridgestp.c
1449
switch (bp->bp_protover) {
sys/net/bridgestp.c
1451
bstp_timer_start(&bp->bp_tc_timer,
sys/net/bridgestp.c
1452
bp->bp_desg_htime + BSTP_TICK_VAL);
sys/net/bridgestp.c
1453
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
1457
bstp_timer_start(&bp->bp_tc_timer,
sys/net/bridgestp.c
1464
bstp_set_timer_msgage(struct bstp_port *bp)
sys/net/bridgestp.c
1466
if (bp->bp_port_msg_age + BSTP_MESSAGE_AGE_INCR <=
sys/net/bridgestp.c
1467
bp->bp_port_max_age) {
sys/net/bridgestp.c
1468
bstp_timer_start(&bp->bp_message_age_timer,
sys/net/bridgestp.c
1469
bp->bp_port_htime * 3);
sys/net/bridgestp.c
1472
bstp_timer_start(&bp->bp_message_age_timer, 0);
sys/net/bridgestp.c
1476
bstp_rerooted(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
1482
if (bp2 == bp)
sys/net/bridgestp.c
154
bstp_transmit(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
1547
struct bstp_port *bp;
sys/net/bridgestp.c
1555
LIST_FOREACH(bp, &bs->bs_bplist, bp_next)
sys/net/bridgestp.c
1556
bp->bp_txcount = 0;
sys/net/bridgestp.c
1564
struct bstp_port *bp;
sys/net/bridgestp.c
1579
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
1581
bp->bp_infois = BSTP_INFO_DISABLED;
sys/net/bridgestp.c
1582
bp->bp_txcount = 0;
sys/net/bridgestp.c
1583
bstp_set_port_proto(bp, bs->bs_protover);
sys/net/bridgestp.c
1584
bstp_set_port_role(bp, BSTP_ROLE_DISABLED);
sys/net/bridgestp.c
1585
bstp_set_port_tc(bp, BSTP_TCSTATE_INACTIVE);
sys/net/bridgestp.c
1586
bstp_timer_stop(&bp->bp_recent_backup_timer);
sys/net/bridgestp.c
1610
bstp_set_port_priority(struct bstp_port *bp, int pri)
sys/net/bridgestp.c
1612
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1621
bp->bp_priority = pri;
sys/net/bridgestp.c
1628
bstp_set_path_cost(struct bstp_port *bp, uint32_t path_cost)
sys/net/bridgestp.c
1630
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1636
if (bp->bp_protover == BSTP_PROTO_STP && path_cost > 65535)
sys/net/bridgestp.c
1642
bp->bp_flags &= ~BSTP_PORT_ADMCOST;
sys/net/bridgestp.c
1643
bp->bp_path_cost = bstp_calc_path_cost(bp);
sys/net/bridgestp.c
1645
bp->bp_path_cost = path_cost;
sys/net/bridgestp.c
1646
bp->bp_flags |= BSTP_PORT_ADMCOST;
sys/net/bridgestp.c
165
if (bp->bp_hello_timer.active == 0) {
sys/net/bridgestp.c
1654
bstp_set_edge(struct bstp_port *bp, int set)
sys/net/bridgestp.c
1656
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1659
if ((bp->bp_operedge = set) == 0)
sys/net/bridgestp.c
1660
bp->bp_flags &= ~BSTP_PORT_ADMEDGE;
sys/net/bridgestp.c
1662
bp->bp_flags |= BSTP_PORT_ADMEDGE;
sys/net/bridgestp.c
1668
bstp_set_autoedge(struct bstp_port *bp, int set)
sys/net/bridgestp.c
167
bstp_hello_timer_expiry(bs, bp);
sys/net/bridgestp.c
1670
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1674
bp->bp_flags |= BSTP_PORT_AUTOEDGE;
sys/net/bridgestp.c
1676
if (bp->bp_edge_delay_timer.active == 0)
sys/net/bridgestp.c
1677
bstp_edge_delay_expiry(bs, bp);
sys/net/bridgestp.c
1679
bp->bp_flags &= ~BSTP_PORT_AUTOEDGE;
sys/net/bridgestp.c
1685
bstp_set_ptp(struct bstp_port *bp, int set)
sys/net/bridgestp.c
1687
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1690
bp->bp_ptp_link = set;
sys/net/bridgestp.c
1696
bstp_set_autoptp(struct bstp_port *bp, int set)
sys/net/bridgestp.c
1698
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
170
if (bp->bp_txcount > bs->bs_txholdcount)
sys/net/bridgestp.c
1702
bp->bp_flags |= BSTP_PORT_AUTOPTP;
sys/net/bridgestp.c
1703
if (bp->bp_role != BSTP_ROLE_DISABLED)
sys/net/bridgestp.c
1704
taskqueue_enqueue(taskqueue_swi, &bp->bp_mediatask);
sys/net/bridgestp.c
1706
bp->bp_flags &= ~BSTP_PORT_AUTOPTP;
sys/net/bridgestp.c
1715
bstp_calc_path_cost(struct bstp_port *bp)
sys/net/bridgestp.c
1717
struct ifnet *ifp = bp->bp_ifp;
sys/net/bridgestp.c
1721
if (bp->bp_flags & BSTP_PORT_ADMCOST)
sys/net/bridgestp.c
1722
return bp->bp_path_cost;
sys/net/bridgestp.c
1726
bp->bp_flags |= BSTP_PORT_PNDCOST;
sys/net/bridgestp.c
174
if (bp->bp_protover == BSTP_PROTO_RSTP) {
sys/net/bridgestp.c
1740
if (bp->bp_protover == BSTP_PROTO_STP && path_cost > 65535)
sys/net/bridgestp.c
175
bstp_transmit_bpdu(bs, bp);
sys/net/bridgestp.c
1753
struct bstp_port *bp = (struct bstp_port *)arg;
sys/net/bridgestp.c
1754
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1756
if (bp->bp_active == 1 && bs->bs_state_cb != NULL)
sys/net/bridgestp.c
1757
(*bs->bs_state_cb)(bp->bp_ifp, bp->bp_state);
sys/net/bridgestp.c
176
bp->bp_tc_ack = 0;
sys/net/bridgestp.c
1767
struct bstp_port *bp = (struct bstp_port *)arg;
sys/net/bridgestp.c
1768
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1772
switch (bp->bp_protover) {
sys/net/bridgestp.c
1775
age = bp->bp_desg_fdelay / BSTP_TICK_VAL;
sys/net/bridgestp.c
178
switch (bp->bp_role) {
sys/net/bridgestp.c
1784
if (bp->bp_active == 1 && bs->bs_rtage_cb != NULL)
sys/net/bridgestp.c
1785
(*bs->bs_rtage_cb)(bp->bp_ifp, age);
sys/net/bridgestp.c
1789
bp->bp_fdbflush = 0;
sys/net/bridgestp.c
1794
bstp_linkstate(struct bstp_port *bp)
sys/net/bridgestp.c
1796
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1798
if (!bp->bp_active)
sys/net/bridgestp.c
180
bstp_transmit_bpdu(bs, bp);
sys/net/bridgestp.c
1801
bstp_ifupdstatus(bp, 0);
sys/net/bridgestp.c
1803
bstp_update_state(bs, bp);
sys/net/bridgestp.c
181
bp->bp_tc_ack = 0;
sys/net/bridgestp.c
1810
struct bstp_port *bp = (struct bstp_port *)arg;
sys/net/bridgestp.c
1811
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
1812
struct ifnet *ifp = bp->bp_ifp;
sys/net/bridgestp.c
1816
if (!bp->bp_active)
sys/net/bridgestp.c
1827
if (bp->bp_flags & BSTP_PORT_AUTOPTP) {
sys/net/bridgestp.c
1831
if (bp->bp_ptp_link ^ fdx) {
sys/net/bridgestp.c
1832
bp->bp_ptp_link = fdx;
sys/net/bridgestp.c
1838
if (bp->bp_flags & BSTP_PORT_PNDCOST) {
sys/net/bridgestp.c
1841
cost = bstp_calc_path_cost(bp);
sys/net/bridgestp.c
1842
if (bp->bp_path_cost != cost) {
sys/net/bridgestp.c
1843
bp->bp_path_cost = cost;
sys/net/bridgestp.c
1846
bp->bp_flags &= ~BSTP_PORT_PNDCOST;
sys/net/bridgestp.c
1849
if (bp->bp_role == BSTP_ROLE_DISABLED) {
sys/net/bridgestp.c
185
bstp_transmit_tcn(bs, bp);
sys/net/bridgestp.c
1850
bstp_enable_port(bs, bp);
sys/net/bridgestp.c
1854
if (bp->bp_role != BSTP_ROLE_DISABLED) {
sys/net/bridgestp.c
1855
bstp_disable_port(bs, bp);
sys/net/bridgestp.c
1857
if ((bp->bp_flags & BSTP_PORT_ADMEDGE) &&
sys/net/bridgestp.c
1858
bp->bp_protover == BSTP_PROTO_RSTP)
sys/net/bridgestp.c
1859
bp->bp_operedge = 1;
sys/net/bridgestp.c
1862
} else if (bp->bp_infois != BSTP_INFO_DISABLED) {
sys/net/bridgestp.c
1863
bstp_disable_port(bs, bp);
sys/net/bridgestp.c
1872
bstp_enable_port(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
1874
bp->bp_infois = BSTP_INFO_AGED;
sys/net/bridgestp.c
1878
bstp_disable_port(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
1880
bp->bp_infois = BSTP_INFO_DISABLED;
sys/net/bridgestp.c
1888
struct bstp_port *bp;
sys/net/bridgestp.c
189
bstp_timer_start(&bp->bp_hello_timer, bp->bp_desg_htime);
sys/net/bridgestp.c
190
bp->bp_flags &= ~BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
1900
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
1901
if (!(bp->bp_ifp->if_capabilities & IFCAP_LINKSTATE))
sys/net/bridgestp.c
1902
taskqueue_enqueue(taskqueue_swi, &bp->bp_mediatask);
sys/net/bridgestp.c
1907
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
1909
bstp_timer_dectest(&bp->bp_tc_timer);
sys/net/bridgestp.c
1910
bstp_timer_dectest(&bp->bp_recent_root_timer);
sys/net/bridgestp.c
1911
bstp_timer_dectest(&bp->bp_forward_delay_timer);
sys/net/bridgestp.c
1912
bstp_timer_dectest(&bp->bp_recent_backup_timer);
sys/net/bridgestp.c
1914
if (bstp_timer_dectest(&bp->bp_hello_timer))
sys/net/bridgestp.c
1915
bstp_hello_timer_expiry(bs, bp);
sys/net/bridgestp.c
1917
if (bstp_timer_dectest(&bp->bp_message_age_timer))
sys/net/bridgestp.c
1918
bstp_message_age_expiry(bs, bp);
sys/net/bridgestp.c
1920
if (bstp_timer_dectest(&bp->bp_migrate_delay_timer))
sys/net/bridgestp.c
1921
bstp_migrate_delay_expiry(bs, bp);
sys/net/bridgestp.c
1923
if (bstp_timer_dectest(&bp->bp_edge_delay_timer))
sys/net/bridgestp.c
1924
bstp_edge_delay_expiry(bs, bp);
sys/net/bridgestp.c
1927
bstp_update_state(bs, bp);
sys/net/bridgestp.c
1929
if (bp->bp_txcount > 0)
sys/net/bridgestp.c
1930
bp->bp_txcount--;
sys/net/bridgestp.c
194
bstp_transmit_bpdu(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
1976
bstp_hello_timer_expiry(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
1978
if ((bp->bp_flags & BSTP_PORT_NEWINFO) ||
sys/net/bridgestp.c
1979
bp->bp_role == BSTP_ROLE_DESIGNATED ||
sys/net/bridgestp.c
1980
(bp->bp_role == BSTP_ROLE_ROOT &&
sys/net/bridgestp.c
1981
bp->bp_tc_timer.active == 1)) {
sys/net/bridgestp.c
1982
bstp_timer_start(&bp->bp_hello_timer, bp->bp_desg_htime);
sys/net/bridgestp.c
1983
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
1984
bstp_transmit(bs, bp);
sys/net/bridgestp.c
1989
bstp_message_age_expiry(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
1991
if (bp->bp_infois == BSTP_INFO_RECEIVED) {
sys/net/bridgestp.c
1992
bp->bp_infois = BSTP_INFO_AGED;
sys/net/bridgestp.c
1994
DPRINTF("aged info on %s\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
1999
bstp_migrate_delay_expiry(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
200
bpdu.cbu_rootpri = htons(bp->bp_desg_pv.pv_root_id >> 48);
sys/net/bridgestp.c
2001
bp->bp_flags |= BSTP_PORT_CANMIGRATE;
sys/net/bridgestp.c
2005
bstp_edge_delay_expiry(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
2007
if ((bp->bp_flags & BSTP_PORT_AUTOEDGE) &&
sys/net/bridgestp.c
2008
bp->bp_protover == BSTP_PROTO_RSTP && bp->bp_proposing &&
sys/net/bridgestp.c
2009
bp->bp_role == BSTP_ROLE_DESIGNATED) {
sys/net/bridgestp.c
201
PV2ADDR(bp->bp_desg_pv.pv_root_id, bpdu.cbu_rootaddr);
sys/net/bridgestp.c
2010
bp->bp_operedge = 1;
sys/net/bridgestp.c
2011
DPRINTF("%s -> edge port\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
203
bpdu.cbu_rootpathcost = htonl(bp->bp_desg_pv.pv_cost);
sys/net/bridgestp.c
2049
struct bstp_port *bp;
sys/net/bridgestp.c
205
bpdu.cbu_bridgepri = htons(bp->bp_desg_pv.pv_dbridge_id >> 48);
sys/net/bridgestp.c
206
PV2ADDR(bp->bp_desg_pv.pv_dbridge_id, bpdu.cbu_bridgeaddr);
sys/net/bridgestp.c
208
bpdu.cbu_portid = htons(bp->bp_port_id);
sys/net/bridgestp.c
209
bpdu.cbu_messageage = htons(bp->bp_desg_msg_age);
sys/net/bridgestp.c
210
bpdu.cbu_maxage = htons(bp->bp_desg_max_age);
sys/net/bridgestp.c
211
bpdu.cbu_hellotime = htons(bp->bp_desg_htime);
sys/net/bridgestp.c
2112
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
2113
bp->bp_port_id = (bp->bp_priority << 8) |
sys/net/bridgestp.c
2114
(bp->bp_ifp->if_index & 0xfff);
sys/net/bridgestp.c
2115
taskqueue_enqueue(taskqueue_swi, &bp->bp_mediatask);
sys/net/bridgestp.c
212
bpdu.cbu_forwarddelay = htons(bp->bp_desg_fdelay);
sys/net/bridgestp.c
2129
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
2130
bp->bp_infois = BSTP_INFO_DISABLED;
sys/net/bridgestp.c
2131
bstp_set_port_role(bp, BSTP_ROLE_DISABLED);
sys/net/bridgestp.c
214
bpdu.cbu_flags = bstp_pdu_flags(bp);
sys/net/bridgestp.c
216
switch (bp->bp_protover) {
sys/net/bridgestp.c
2212
struct bstp_port *bp;
sys/net/bridgestp.c
2216
LIST_FOREACH(bp, &bs->bs_bplist, bp_next)
sys/net/bridgestp.c
2217
bstp_set_port_state(bp, BSTP_IFSTATE_DISCARDING);
sys/net/bridgestp.c
2225
bstp_create(struct bstp_state *bs, struct bstp_port *bp, struct ifnet *ifp)
sys/net/bridgestp.c
2227
bzero(bp, sizeof(struct bstp_port));
sys/net/bridgestp.c
2230
bp->bp_ifp = ifp;
sys/net/bridgestp.c
2231
bp->bp_bs = bs;
sys/net/bridgestp.c
2232
bp->bp_priority = BSTP_DEFAULT_PORT_PRIORITY;
sys/net/bridgestp.c
2233
TASK_INIT(&bp->bp_statetask, 0, bstp_notify_state, bp);
sys/net/bridgestp.c
2234
TASK_INIT(&bp->bp_rtagetask, 0, bstp_notify_rtage, bp);
sys/net/bridgestp.c
2235
TASK_INIT(&bp->bp_mediatask, 0, bstp_ifupdstatus, bp);
sys/net/bridgestp.c
2238
bp->bp_infois = BSTP_INFO_DISABLED;
sys/net/bridgestp.c
2239
bp->bp_flags = BSTP_PORT_AUTOEDGE|BSTP_PORT_AUTOPTP;
sys/net/bridgestp.c
2240
bstp_set_port_state(bp, BSTP_IFSTATE_DISCARDING);
sys/net/bridgestp.c
2241
bstp_set_port_proto(bp, bs->bs_protover);
sys/net/bridgestp.c
2242
bstp_set_port_role(bp, BSTP_ROLE_DISABLED);
sys/net/bridgestp.c
2243
bstp_set_port_tc(bp, BSTP_TCSTATE_INACTIVE);
sys/net/bridgestp.c
2244
bp->bp_path_cost = bstp_calc_path_cost(bp);
sys/net/bridgestp.c
2250
bstp_enable(struct bstp_port *bp)
sys/net/bridgestp.c
2252
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
2253
struct ifnet *ifp = bp->bp_ifp;
sys/net/bridgestp.c
2255
KASSERT(bp->bp_active == 0, ("already a bstp member"));
sys/net/bridgestp.c
226
bstp_send_bpdu(bs, bp, &bpdu);
sys/net/bridgestp.c
2268
LIST_INSERT_HEAD(&bs->bs_bplist, bp, bp_next);
sys/net/bridgestp.c
2269
bp->bp_active = 1;
sys/net/bridgestp.c
2270
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
2272
bstp_update_roles(bs, bp);
sys/net/bridgestp.c
2278
bstp_disable(struct bstp_port *bp)
sys/net/bridgestp.c
2280
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
2282
KASSERT(bp->bp_active == 1, ("not a bstp member"));
sys/net/bridgestp.c
2285
bstp_disable_port(bs, bp);
sys/net/bridgestp.c
2286
LIST_REMOVE(bp, bp_next);
sys/net/bridgestp.c
2287
bp->bp_active = 0;
sys/net/bridgestp.c
2296
bstp_destroy(struct bstp_port *bp)
sys/net/bridgestp.c
2298
KASSERT(bp->bp_active == 0, ("port is still attached"));
sys/net/bridgestp.c
2299
taskqueue_drain(taskqueue_swi, &bp->bp_statetask);
sys/net/bridgestp.c
230
bstp_transmit_tcn(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
2300
taskqueue_drain(taskqueue_swi, &bp->bp_rtagetask);
sys/net/bridgestp.c
2301
taskqueue_drain(taskqueue_swi, &bp->bp_mediatask);
sys/net/bridgestp.c
2303
if (bp->bp_bs->bs_root_port == bp)
sys/net/bridgestp.c
2304
bstp_assign_roles(bp->bp_bs);
sys/net/bridgestp.c
233
struct ifnet *ifp = bp->bp_ifp;
sys/net/bridgestp.c
237
KASSERT(bp == bs->bs_root_port, ("%s: bad root port\n", __func__));
sys/net/bridgestp.c
264
bp->bp_txcount++;
sys/net/bridgestp.c
269
bstp_decode_bpdu(struct bstp_port *bp, struct bstp_cbpdu *cpdu,
sys/net/bridgestp.c
298
cu->cu_pv.pv_port_id = bp->bp_port_id;
sys/net/bridgestp.c
342
bstp_send_bpdu(struct bstp_state *bs, struct bstp_port *bp,
sys/net/bridgestp.c
352
ifp = bp->bp_ifp;
sys/net/bridgestp.c
394
bp->bp_txcount++;
sys/net/bridgestp.c
399
bstp_pdu_flags(struct bstp_port *bp)
sys/net/bridgestp.c
403
if (bp->bp_proposing && bp->bp_state != BSTP_IFSTATE_FORWARDING)
sys/net/bridgestp.c
406
if (bp->bp_agree)
sys/net/bridgestp.c
409
if (bp->bp_tc_timer.active)
sys/net/bridgestp.c
412
if (bp->bp_tc_ack)
sys/net/bridgestp.c
415
switch (bp->bp_state) {
sys/net/bridgestp.c
425
switch (bp->bp_role) {
sys/net/bridgestp.c
444
switch (bp->bp_protover) {
sys/net/bridgestp.c
456
bstp_input(struct bstp_port *bp, struct ifnet *ifp, struct mbuf *m)
sys/net/bridgestp.c
458
struct bstp_state *bs = bp->bp_bs;
sys/net/bridgestp.c
463
if (bp->bp_active == 0) {
sys/net/bridgestp.c
501
if (tpdu.tbu_protover != bp->bp_protover) {
sys/net/bridgestp.c
506
if (bp->bp_flags & BSTP_PORT_CANMIGRATE)
sys/net/bridgestp.c
507
bstp_set_port_proto(bp, tpdu.tbu_protover);
sys/net/bridgestp.c
513
bp->bp_operedge = 0;
sys/net/bridgestp.c
514
bstp_timer_start(&bp->bp_edge_delay_timer,
sys/net/bridgestp.c
519
bstp_received_stp(bs, bp, &m, &tpdu);
sys/net/bridgestp.c
523
bstp_received_rstp(bs, bp, &m, &tpdu);
sys/net/bridgestp.c
533
bstp_received_stp(struct bstp_state *bs, struct bstp_port *bp,
sys/net/bridgestp.c
537
struct bstp_config_unit *cu = &bp->bp_msg_cu;
sys/net/bridgestp.c
543
bstp_received_tcn(bs, bp, &tu);
sys/net/bridgestp.c
551
bstp_decode_bpdu(bp, &cpdu, cu);
sys/net/bridgestp.c
552
bstp_received_bpdu(bs, bp, cu);
sys/net/bridgestp.c
558
bstp_received_rstp(struct bstp_state *bs, struct bstp_port *bp,
sys/net/bridgestp.c
562
struct bstp_config_unit *cu = &bp->bp_msg_cu;
sys/net/bridgestp.c
572
bstp_decode_bpdu(bp, &cpdu, cu);
sys/net/bridgestp.c
573
bstp_received_bpdu(bs, bp, cu);
sys/net/bridgestp.c
577
bstp_received_tcn(struct bstp_state *bs, struct bstp_port *bp,
sys/net/bridgestp.c
580
bp->bp_rcvdtcn = 1;
sys/net/bridgestp.c
581
bstp_update_tc(bp);
sys/net/bridgestp.c
585
bstp_received_bpdu(struct bstp_state *bs, struct bstp_port *bp,
sys/net/bridgestp.c
593
switch (bp->bp_infois) {
sys/net/bridgestp.c
616
type = bstp_pdu_rcvtype(bp, cu);
sys/net/bridgestp.c
621
bp->bp_agreed = 0;
sys/net/bridgestp.c
622
bp->bp_proposing = 0;
sys/net/bridgestp.c
625
bp->bp_proposed = 1;
sys/net/bridgestp.c
627
bp->bp_rcvdtc = 1;
sys/net/bridgestp.c
629
bp->bp_rcvdtca = 1;
sys/net/bridgestp.c
631
if (bp->bp_agree &&
sys/net/bridgestp.c
632
!bstp_pdu_bettersame(bp, BSTP_INFO_RECEIVED))
sys/net/bridgestp.c
633
bp->bp_agree = 0;
sys/net/bridgestp.c
636
bp->bp_port_pv = cu->cu_pv;
sys/net/bridgestp.c
637
bp->bp_port_msg_age = cu->cu_message_age;
sys/net/bridgestp.c
638
bp->bp_port_max_age = cu->cu_max_age;
sys/net/bridgestp.c
639
bp->bp_port_fdelay = cu->cu_forward_delay;
sys/net/bridgestp.c
640
bp->bp_port_htime =
sys/net/bridgestp.c
645
bstp_set_timer_msgage(bp);
sys/net/bridgestp.c
647
bp->bp_infois = BSTP_INFO_RECEIVED;
sys/net/bridgestp.c
653
bp->bp_proposed = 1;
sys/net/bridgestp.c
655
bp->bp_rcvdtc = 1;
sys/net/bridgestp.c
657
bp->bp_rcvdtca = 1;
sys/net/bridgestp.c
660
bstp_set_timer_msgage(bp);
sys/net/bridgestp.c
665
bp->bp_agreed = 1;
sys/net/bridgestp.c
666
bp->bp_proposing = 0;
sys/net/bridgestp.c
675
if (cu->cu_agree && bp->bp_ptp_link) {
sys/net/bridgestp.c
676
bp->bp_agreed = 1;
sys/net/bridgestp.c
677
bp->bp_proposing = 0;
sys/net/bridgestp.c
679
bp->bp_agreed = 0;
sys/net/bridgestp.c
682
bp->bp_rcvdtc = 1;
sys/net/bridgestp.c
684
bp->bp_rcvdtca = 1;
sys/net/bridgestp.c
691
bstp_update_state(bs, bp);
sys/net/bridgestp.c
695
bstp_pdu_rcvtype(struct bstp_port *bp, struct bstp_config_unit *cu)
sys/net/bridgestp.c
704
if (bstp_info_superior(&bp->bp_port_pv, &cu->cu_pv))
sys/net/bridgestp.c
707
else if (bstp_info_cmp(&bp->bp_port_pv, &cu->cu_pv) ==
sys/net/bridgestp.c
709
if (bp->bp_port_msg_age != cu->cu_message_age ||
sys/net/bridgestp.c
710
bp->bp_port_max_age != cu->cu_max_age ||
sys/net/bridgestp.c
711
bp->bp_port_fdelay != cu->cu_forward_delay ||
sys/net/bridgestp.c
712
bp->bp_port_htime != cu->cu_hello_time)
sys/net/bridgestp.c
727
if (bstp_info_cmp(&bp->bp_port_pv, &cu->cu_pv) <= INFO_SAME)
sys/net/bridgestp.c
740
bstp_pdu_bettersame(struct bstp_port *bp, int newinfo)
sys/net/bridgestp.c
743
bp->bp_infois == BSTP_INFO_RECEIVED &&
sys/net/bridgestp.c
744
bstp_info_cmp(&bp->bp_port_pv, &bp->bp_msg_cu.cu_pv) >= INFO_SAME)
sys/net/bridgestp.c
748
bp->bp_infois == BSTP_INFO_MINE &&
sys/net/bridgestp.c
749
bstp_info_cmp(&bp->bp_port_pv, &bp->bp_desg_pv) >= INFO_SAME)
sys/net/bridgestp.c
802
struct bstp_port *bp, *rbp = NULL;
sys/net/bridgestp.c
814
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
815
if (bp->bp_infois != BSTP_INFO_RECEIVED)
sys/net/bridgestp.c
818
pv = bp->bp_port_pv;
sys/net/bridgestp.c
819
pv.pv_cost += bp->bp_path_cost;
sys/net/bridgestp.c
831
bs->bs_root_msg_age = bp->bp_port_msg_age +
sys/net/bridgestp.c
833
bs->bs_root_max_age = bp->bp_port_max_age;
sys/net/bridgestp.c
834
bs->bs_root_fdelay = bp->bp_port_fdelay;
sys/net/bridgestp.c
835
bs->bs_root_htime = bp->bp_port_htime;
sys/net/bridgestp.c
836
rbp = bp;
sys/net/bridgestp.c
840
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
sys/net/bridgestp.c
842
bp->bp_desg_pv.pv_root_id = bs->bs_root_pv.pv_root_id;
sys/net/bridgestp.c
843
bp->bp_desg_pv.pv_cost = bs->bs_root_pv.pv_cost;
sys/net/bridgestp.c
844
bp->bp_desg_pv.pv_dbridge_id = bs->bs_bridge_pv.pv_dbridge_id;
sys/net/bridgestp.c
845
bp->bp_desg_pv.pv_dport_id = bp->bp_port_id;
sys/net/bridgestp.c
846
bp->bp_desg_pv.pv_port_id = bp->bp_port_id;
sys/net/bridgestp.c
849
bp->bp_desg_msg_age = bs->bs_root_msg_age;
sys/net/bridgestp.c
850
bp->bp_desg_max_age = bs->bs_root_max_age;
sys/net/bridgestp.c
851
bp->bp_desg_fdelay = bs->bs_root_fdelay;
sys/net/bridgestp.c
852
bp->bp_desg_htime = bs->bs_bridge_htime;
sys/net/bridgestp.c
854
switch (bp->bp_infois) {
sys/net/bridgestp.c
856
bstp_set_port_role(bp, BSTP_ROLE_DISABLED);
sys/net/bridgestp.c
860
bstp_set_port_role(bp, BSTP_ROLE_DESIGNATED);
sys/net/bridgestp.c
861
bstp_update_info(bp);
sys/net/bridgestp.c
865
bstp_set_port_role(bp, BSTP_ROLE_DESIGNATED);
sys/net/bridgestp.c
867
if (bstp_info_cmp(&bp->bp_port_pv,
sys/net/bridgestp.c
868
&bp->bp_desg_pv) != INFO_SAME ||
sys/net/bridgestp.c
870
(bp->bp_port_msg_age != rbp->bp_port_msg_age ||
sys/net/bridgestp.c
871
bp->bp_port_max_age != rbp->bp_port_max_age ||
sys/net/bridgestp.c
872
bp->bp_port_fdelay != rbp->bp_port_fdelay ||
sys/net/bridgestp.c
873
bp->bp_port_htime != rbp->bp_port_htime)))
sys/net/bridgestp.c
874
bstp_update_info(bp);
sys/net/bridgestp.c
878
if (bp == rbp) {
sys/net/bridgestp.c
883
bstp_set_port_role(bp, BSTP_ROLE_ROOT);
sys/net/bridgestp.c
884
bs->bs_root_port = bp;
sys/net/bridgestp.c
885
} else if (bstp_info_cmp(&bp->bp_port_pv,
sys/net/bridgestp.c
886
&bp->bp_desg_pv) == INFO_BETTER) {
sys/net/bridgestp.c
891
bstp_set_port_role(bp, BSTP_ROLE_DESIGNATED);
sys/net/bridgestp.c
892
bstp_update_info(bp);
sys/net/bridgestp.c
895
bp->bp_port_pv.pv_dbridge_id,
sys/net/bridgestp.c
901
bstp_set_port_role(bp,
sys/net/bridgestp.c
908
bstp_set_port_role(bp,
sys/net/bridgestp.c
918
bstp_update_state(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
938
bstp_update_roles(bs, bp);
sys/net/bridgestp.c
939
bstp_update_tc(bp);
sys/net/bridgestp.c
943
bstp_update_roles(struct bstp_state *bs, struct bstp_port *bp)
sys/net/bridgestp.c
947
switch (bp->bp_role) {
sys/net/bridgestp.c
950
if (bp->bp_sync || !bp->bp_synced || bp->bp_reroot) {
sys/net/bridgestp.c
951
bp->bp_sync = 0;
sys/net/bridgestp.c
952
bp->bp_synced = 1;
sys/net/bridgestp.c
953
bp->bp_reroot = 0;
sys/net/bridgestp.c
959
if ((bs->bs_allsynced && !bp->bp_agree) ||
sys/net/bridgestp.c
960
(bp->bp_proposed && bp->bp_agree)) {
sys/net/bridgestp.c
961
bp->bp_proposed = 0;
sys/net/bridgestp.c
962
bp->bp_agree = 1;
sys/net/bridgestp.c
963
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
965
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
968
if (bp->bp_proposed && !bp->bp_agree) {
sys/net/bridgestp.c
970
bp->bp_proposed = 0;
sys/net/bridgestp.c
972
bp->bp_ifp->if_xname);
sys/net/bridgestp.c
976
if (bp->bp_sync || !bp->bp_synced || bp->bp_reroot) {
sys/net/bridgestp.c
977
bp->bp_sync = 0;
sys/net/bridgestp.c
978
bp->bp_synced = 1;
sys/net/bridgestp.c
979
bp->bp_reroot = 0;
sys/net/bridgestp.c
980
DPRINTF("%s -> ALTERNATE_PORT\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
985
if (bp->bp_state != BSTP_IFSTATE_FORWARDING && !bp->bp_reroot) {
sys/net/bridgestp.c
987
DPRINTF("%s -> ROOT_REROOT\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
990
if ((bs->bs_allsynced && !bp->bp_agree) ||
sys/net/bridgestp.c
991
(bp->bp_proposed && bp->bp_agree)) {
sys/net/bridgestp.c
992
bp->bp_proposed = 0;
sys/net/bridgestp.c
993
bp->bp_sync = 0;
sys/net/bridgestp.c
994
bp->bp_agree = 1;
sys/net/bridgestp.c
995
bp->bp_flags |= BSTP_PORT_NEWINFO;
sys/net/bridgestp.c
996
DPRINTF("%s -> ROOT_AGREED\n", bp->bp_ifp->if_xname);
sys/net/bridgestp.c
999
if (bp->bp_proposed && !bp->bp_agree) {
sys/net/if_bridge.c
1567
struct bstp_port *bp;
sys/net/if_bridge.c
1573
bp = &bif->bif_stp;
sys/net/if_bridge.c
1575
req->ifbr_state = bp->bp_state;
sys/net/if_bridge.c
1576
req->ifbr_priority = bp->bp_priority;
sys/net/if_bridge.c
1577
req->ifbr_path_cost = bp->bp_path_cost;
sys/net/if_bridge.c
1579
req->ifbr_proto = bp->bp_protover;
sys/net/if_bridge.c
1580
req->ifbr_role = bp->bp_role;
sys/net/if_bridge.c
1581
req->ifbr_stpflags = bp->bp_flags;
sys/net/if_bridge.c
1589
if (bp->bp_operedge)
sys/net/if_bridge.c
1591
if (bp->bp_flags & BSTP_PORT_AUTOEDGE)
sys/net/if_bridge.c
1593
if (bp->bp_ptp_link)
sys/net/if_bridge.c
1595
if (bp->bp_flags & BSTP_PORT_AUTOPTP)
sys/net/if_bridge.c
1597
if (bp->bp_flags & BSTP_PORT_ADMEDGE)
sys/net/if_bridge.c
1599
if (bp->bp_flags & BSTP_PORT_ADMCOST)
sys/net/if_bridge.c
1610
struct bstp_port *bp;
sys/net/if_bridge.c
1616
bp = &bif->bif_stp;
sys/net/if_bridge.c
1639
bstp_set_edge(bp, req->ifbr_ifsflags & IFBIF_BSTP_EDGE ? 1 : 0);
sys/net/if_bridge.c
1640
bstp_set_autoedge(bp, req->ifbr_ifsflags & IFBIF_BSTP_AUTOEDGE ? 1 : 0);
sys/net/if_bridge.c
1641
bstp_set_ptp(bp, req->ifbr_ifsflags & IFBIF_BSTP_PTP ? 1 : 0);
sys/net/if_bridge.c
1642
bstp_set_autoptp(bp, req->ifbr_ifsflags & IFBIF_BSTP_AUTOPTP ? 1 : 0);
sys/net/if_bridge.c
2144
struct bstp_port *bp;
sys/net/if_bridge.c
2176
bp = &bif->bif_stp;
sys/net/if_bridge.c
2178
bpreq.ifbp_fwd_trans = bp->bp_forward_transitions;
sys/net/if_bridge.c
2179
bpreq.ifbp_design_cost = bp->bp_desg_pv.pv_cost;
sys/net/if_bridge.c
2180
bpreq.ifbp_design_port = bp->bp_desg_pv.pv_port_id;
sys/net/if_bridge.c
2181
bpreq.ifbp_design_bridge = bp->bp_desg_pv.pv_dbridge_id;
sys/net/if_bridge.c
2182
bpreq.ifbp_design_root = bp->bp_desg_pv.pv_root_id;
sys/net/if_ethersubr.c
1252
ether_vlan_mtap(struct bpf_if *bp, struct mbuf *m, void *data, u_int dlen)
sys/net/if_ethersubr.c
1284
bpf_mtap(bp, &mb);
sys/net/if_ethersubr.c
1286
bpf_mtap2(bp, &vlan, sizeof(vlan), m);
sys/net/slcompress.c
458
u_int16_t *bp;
sys/net/slcompress.c
572
bp = (u_int16_t *) &cs->cs_ip;
sys/net/slcompress.c
575
changes += *bp++;
sys/netgraph/ng_lmi.c
1004
bp[k]);
sys/netgraph/ng_lmi.c
1020
const u_char *bp = mtod(m, const u_char *);
sys/netgraph/ng_lmi.c
1031
bp[k]);
sys/netgraph/ng_lmi.c
993
const u_char *bp = mtod(m, const u_char *);
sys/netpfil/ipfw/ip_fw_private.h
222
void ipfw_get_dynamic(struct ip_fw_chain *chain, char **bp, const char *ep);
sys/nfs/bootp_subr.c
1244
bootpc_hascookie(struct bootp_packet *bp)
sys/nfs/bootp_subr.c
1247
return (bp->vend[0] == 99 && bp->vend[1] == 130 &&
sys/nfs/bootp_subr.c
1248
bp->vend[2] == 83 && bp->vend[3] == 99);
sys/nfs/bootp_subr.c
1296
struct bootp_packet *bp, int len, int tag)
sys/nfs/bootp_subr.c
1304
if (bootpc_hascookie(bp) == 0)
sys/nfs/bootp_subr.c
1307
bootpc_tag_helper(tctx, &bp->vend[4],
sys/nfs/bootp_subr.c
1308
(unsigned char *) bp + len - &bp->vend[4], tag);
sys/nfs/bootp_subr.c
1312
(unsigned char *) bp->file,
sys/nfs/bootp_subr.c
1313
sizeof(bp->file),
sys/nfs/bootp_subr.c
1317
(unsigned char *) bp->sname,
sys/nfs/bootp_subr.c
1318
sizeof(bp->sname),
sys/nfs/bootp_subr.c
259
struct bootp_packet *bp, int len, int tag);
sys/nfsclient/nfs.h
161
int (*nr_writebp)(struct buf *bp, int force, struct thread *td);
sys/opencrypto/cryptosoft.c
624
uint8_t *bp;
sys/opencrypto/cryptosoft.c
648
bp = b0 + 1 + nonce_length;
sys/opencrypto/cryptosoft.c
651
for (uint8_t *dst = b0 + CCM_CBC_BLOCK_LEN - 1; dst >= bp; dst--) {
sys/powerpc/mambo/mambo_disk.c
181
mambodisk_strategy(struct bio *bp)
sys/powerpc/mambo/mambo_disk.c
185
sc = (struct mambodisk_softc *)bp->bio_disk->d_drv1;
sys/powerpc/mambo/mambo_disk.c
187
bioq_disksort(&sc->bio_queue, bp);
sys/powerpc/mambo/mambo_disk.c
196
struct bio *bp;
sys/powerpc/mambo/mambo_disk.c
209
bp = bioq_first(&sc->bio_queue);
sys/powerpc/mambo/mambo_disk.c
210
if (bp == NULL)
sys/powerpc/mambo/mambo_disk.c
212
} while (bp == NULL && sc->running);
sys/powerpc/mambo/mambo_disk.c
213
if (bp)
sys/powerpc/mambo/mambo_disk.c
214
bioq_remove(&sc->bio_queue, bp);
sys/powerpc/mambo/mambo_disk.c
219
end = bp->bio_pblkno + (bp->bio_bcount / sz);
sys/powerpc/mambo/mambo_disk.c
220
for (block = bp->bio_pblkno; block < end;) {
sys/powerpc/mambo/mambo_disk.c
222
char *vaddr = bp->bio_data +
sys/powerpc/mambo/mambo_disk.c
223
(block - bp->bio_pblkno) * sz;
sys/powerpc/mambo/mambo_disk.c
229
if (bp->bio_cmd == BIO_READ) {
sys/powerpc/mambo/mambo_disk.c
232
} else if (bp->bio_cmd == BIO_WRITE) {
sys/powerpc/mambo/mambo_disk.c
245
bp->bio_error = EIO;
sys/powerpc/mambo/mambo_disk.c
246
bp->bio_resid = (end - block) * sz;
sys/powerpc/mambo/mambo_disk.c
247
bp->bio_flags |= BIO_ERROR;
sys/powerpc/mambo/mambo_disk.c
249
biodone(bp);
sys/powerpc/mambo/mambo_disk.c
69
static void mambodisk_strategy(struct bio *bp);
sys/powerpc/powernv/opal_flash.c
125
opalflash_getattr(struct bio *bp)
sys/powerpc/powernv/opal_flash.c
130
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL)
sys/powerpc/powernv/opal_flash.c
133
sc = bp->bio_disk->d_drv1;
sys/powerpc/powernv/opal_flash.c
136
if (strcmp(bp->bio_attribute, "NAND::device") == 0) {
sys/powerpc/powernv/opal_flash.c
137
if (bp->bio_length != sizeof(dev))
sys/powerpc/powernv/opal_flash.c
139
bcopy(&dev, bp->bio_data, sizeof(dev));
sys/powerpc/powernv/opal_flash.c
146
opalflash_strategy(struct bio *bp)
sys/powerpc/powernv/opal_flash.c
150
sc = (struct opalflash_softc *)bp->bio_disk->d_drv1;
sys/powerpc/powernv/opal_flash.c
152
bioq_disksort(&sc->sc_bio_queue, bp);
sys/powerpc/powernv/opal_flash.c
286
struct bio *bp;
sys/powerpc/powernv/opal_flash.c
293
bp = bioq_first(&sc->sc_bio_queue);
sys/powerpc/powernv/opal_flash.c
294
if (bp == NULL)
sys/powerpc/powernv/opal_flash.c
296
} while (bp == NULL);
sys/powerpc/powernv/opal_flash.c
297
bioq_remove(&sc->sc_bio_queue, bp);
sys/powerpc/powernv/opal_flash.c
300
switch (bp->bio_cmd) {
sys/powerpc/powernv/opal_flash.c
302
bp->bio_error = opalflash_erase(sc, bp->bio_offset,
sys/powerpc/powernv/opal_flash.c
303
bp->bio_bcount);
sys/powerpc/powernv/opal_flash.c
306
bp->bio_error = opalflash_read(sc, bp->bio_offset,
sys/powerpc/powernv/opal_flash.c
307
bp->bio_data, bp->bio_bcount);
sys/powerpc/powernv/opal_flash.c
310
bp->bio_error = opalflash_write(sc, bp->bio_offset,
sys/powerpc/powernv/opal_flash.c
311
bp->bio_data, bp->bio_bcount);
sys/powerpc/powernv/opal_flash.c
314
bp->bio_error = EINVAL;
sys/powerpc/powernv/opal_flash.c
316
biodone(bp);
sys/powerpc/ps3/ps3disk.c
129
static void ps3disk_strategy(struct bio *bp);
sys/powerpc/ps3/ps3disk.c
325
struct bio *bp;
sys/powerpc/ps3/ps3disk.c
332
bp = bioq_takefirst(&sc->sc_deferredq);
sys/powerpc/ps3/ps3disk.c
335
if (bp == NULL)
sys/powerpc/ps3/ps3disk.c
338
if (bp->bio_driver1 != NULL) {
sys/powerpc/ps3/ps3disk.c
340
bp->bio_driver1);
sys/powerpc/ps3/ps3disk.c
342
bp->bio_driver1);
sys/powerpc/ps3/ps3disk.c
345
ps3disk_strategy(bp);
sys/powerpc/ps3/ps3disk.c
352
ps3disk_strategy(struct bio *bp)
sys/powerpc/ps3/ps3disk.c
354
struct ps3disk_softc *sc = (struct ps3disk_softc *)bp->bio_disk->d_drv1;
sys/powerpc/ps3/ps3disk.c
358
bp->bio_flags |= BIO_ERROR;
sys/powerpc/ps3/ps3disk.c
359
bp->bio_error = EINVAL;
sys/powerpc/ps3/ps3disk.c
360
biodone(bp);
sys/powerpc/ps3/ps3disk.c
365
bp->bio_resid = bp->bio_bcount;
sys/powerpc/ps3/ps3disk.c
366
bioq_insert_tail(&sc->sc_bioq, bp);
sys/powerpc/ps3/ps3disk.c
369
__func__, bp->bio_cmd);
sys/powerpc/ps3/ps3disk.c
372
if (bp->bio_cmd == BIO_FLUSH) {
sys/powerpc/ps3/ps3disk.c
373
bp->bio_driver1 = 0;
sys/powerpc/ps3/ps3disk.c
376
0, 0, 0, 0, (uint64_t *)&bp->bio_driver2);
sys/powerpc/ps3/ps3disk.c
379
} else if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
sys/powerpc/ps3/ps3disk.c
380
if (bp->bio_bcount % sc->sc_blksize != 0) {
sys/powerpc/ps3/ps3disk.c
384
(bus_dmamap_t *)(&bp->bio_driver1));
sys/powerpc/ps3/ps3disk.c
386
(bus_dmamap_t)(bp->bio_driver1), bp->bio_data,
sys/powerpc/ps3/ps3disk.c
387
bp->bio_bcount, ps3disk_transfer, bp, 0);
sys/powerpc/ps3/ps3disk.c
396
bioq_remove(&sc->sc_bioq, bp);
sys/powerpc/ps3/ps3disk.c
397
bioq_insert_tail(&sc->sc_deferredq, bp);
sys/powerpc/ps3/ps3disk.c
399
bp->bio_error = err;
sys/powerpc/ps3/ps3disk.c
400
bp->bio_flags |= BIO_ERROR;
sys/powerpc/ps3/ps3disk.c
401
bioq_remove(&sc->sc_bioq, bp);
sys/powerpc/ps3/ps3disk.c
402
disk_err(bp, "hard error", -1, 1);
sys/powerpc/ps3/ps3disk.c
403
biodone(bp);
sys/powerpc/ps3/ps3disk.c
415
struct bio *bp;
sys/powerpc/ps3/ps3disk.c
427
TAILQ_FOREACH(bp, &sc->sc_bioq.queue, bio_queue) {
sys/powerpc/ps3/ps3disk.c
428
if ((uint64_t)bp->bio_driver2 != tag)
sys/powerpc/ps3/ps3disk.c
433
(bp->bio_cmd == BIO_READ) ? "Read" : "Write",
sys/powerpc/ps3/ps3disk.c
435
bp->bio_error = EIO;
sys/powerpc/ps3/ps3disk.c
436
bp->bio_flags |= BIO_ERROR;
sys/powerpc/ps3/ps3disk.c
438
bp->bio_error = 0;
sys/powerpc/ps3/ps3disk.c
439
bp->bio_resid = 0;
sys/powerpc/ps3/ps3disk.c
440
bp->bio_flags |= BIO_DONE;
sys/powerpc/ps3/ps3disk.c
443
if (bp->bio_driver1 != NULL) {
sys/powerpc/ps3/ps3disk.c
444
if (bp->bio_cmd == BIO_READ)
sys/powerpc/ps3/ps3disk.c
446
bp->bio_driver1, BUS_DMASYNC_POSTREAD);
sys/powerpc/ps3/ps3disk.c
448
bp->bio_driver1);
sys/powerpc/ps3/ps3disk.c
450
bp->bio_driver1);
sys/powerpc/ps3/ps3disk.c
453
bioq_remove(&sc->sc_bioq, bp);
sys/powerpc/ps3/ps3disk.c
454
biodone(bp);
sys/powerpc/ps3/ps3disk.c
588
struct bio *bp = (struct bio *)(arg);
sys/powerpc/ps3/ps3disk.c
589
struct ps3disk_softc *sc = (struct ps3disk_softc *)bp->bio_disk->d_drv1;
sys/powerpc/ps3/ps3disk.c
590
struct ps3disk_region *rp = &sc->sc_reg[bp->bio_disk->d_unit];
sys/powerpc/ps3/ps3disk.c
600
bp->bio_error = error;
sys/powerpc/ps3/ps3disk.c
601
bp->bio_flags |= BIO_ERROR;
sys/powerpc/ps3/ps3disk.c
602
bioq_remove(&sc->sc_bioq, bp);
sys/powerpc/ps3/ps3disk.c
603
biodone(bp);
sys/powerpc/ps3/ps3disk.c
612
block = bp->bio_pblkno;
sys/powerpc/ps3/ps3disk.c
613
bio_length = bp->bio_length;
sys/powerpc/ps3/ps3disk.c
627
if (bp->bio_cmd == BIO_READ) {
sys/powerpc/ps3/ps3disk.c
631
(uint64_t *)&bp->bio_driver2);
sys/powerpc/ps3/ps3disk.c
634
(bus_dmamap_t)bp->bio_driver1,
sys/powerpc/ps3/ps3disk.c
640
(uint64_t *)&bp->bio_driver2);
sys/powerpc/ps3/ps3disk.c
645
bioq_remove(&sc->sc_bioq, bp);
sys/powerpc/ps3/ps3disk.c
646
bioq_insert_tail(&sc->sc_deferredq, bp);
sys/powerpc/ps3/ps3disk.c
649
bp->bio_driver1);
sys/powerpc/ps3/ps3disk.c
651
bp->bio_driver1);
sys/powerpc/ps3/ps3disk.c
654
bp->bio_error = EINVAL;
sys/powerpc/ps3/ps3disk.c
655
bp->bio_flags |= BIO_ERROR;
sys/powerpc/ps3/ps3disk.c
656
bioq_remove(&sc->sc_bioq, bp);
sys/powerpc/ps3/ps3disk.c
657
biodone(bp);
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
805
char *bp;
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
840
if ((bp = malloc(string_length, M_GSSAPI, M_WAITOK | M_ZERO))) {
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
841
strcpy(bp, "{ ");
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
844
strcat(bp, numstr);
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
846
strcat(bp, numstr);
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
853
strcat(bp, numstr);
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
857
strcat(bp, "}");
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
858
oid_str->length = strlen(bp)+1;
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
859
oid_str->value = (void *) bp;
sys/sys/bio.h
154
void biodone(struct bio *bp);
sys/sys/bio.h
155
void biofinish(struct bio *bp, struct devstat *stat, int error);
sys/sys/bio.h
156
int biowait(struct bio *bp, const char *wmesg);
sys/sys/bio.h
159
void biotrack_buf(struct bio *bp, const char *location);
sys/sys/bio.h
162
biotrack(struct bio *bp, const char *location)
sys/sys/bio.h
165
if (bp->bio_track_bp != NULL)
sys/sys/bio.h
166
biotrack_buf(bp, location);
sys/sys/bio.h
170
biotrack(struct bio *bp __unused, const char *location __unused)
sys/sys/bio.h
175
void bioq_disksort(struct bio_queue_head *ap, struct bio *bp);
sys/sys/bio.h
180
void bioq_insert_head(struct bio_queue_head *head, struct bio *bp);
sys/sys/bio.h
181
void bioq_insert_tail(struct bio_queue_head *head, struct bio *bp);
sys/sys/bio.h
182
void bioq_remove(struct bio_queue_head *head, struct bio *bp);
sys/sys/buf.h
300
#define BUF_LOCKINIT(bp, wmesg) \
sys/sys/buf.h
301
lockinit(&(bp)->b_lock, PVFS, wmesg, 0, LK_NEW)
sys/sys/buf.h
306
#define BUF_LOCK(bp, locktype, interlock) \
sys/sys/buf.h
307
_lockmgr_args_rw(&(bp)->b_lock, (locktype), (interlock), \
sys/sys/buf.h
314
#define BUF_TIMELOCK(bp, locktype, interlock, wmesg, catch, timo) \
sys/sys/buf.h
315
_lockmgr_args_rw(&(bp)->b_lock, (locktype) | LK_TIMELOCK, \
sys/sys/buf.h
323
#define BUF_UNLOCK(bp) do { \
sys/sys/buf.h
324
KASSERT(((bp)->b_flags & B_REMFREE) == 0 || BUF_LOCKRECURSED(bp), \
sys/sys/buf.h
325
("BUF_UNLOCK %p while B_REMFREE is still set.", (bp))); \
sys/sys/buf.h
327
BUF_UNLOCK_RAW((bp)); \
sys/sys/buf.h
329
#define BUF_UNLOCK_RAW(bp) do { \
sys/sys/buf.h
330
(void)_lockmgr_args(&(bp)->b_lock, LK_RELEASE, NULL, \
sys/sys/buf.h
338
#define BUF_LOCKRECURSED(bp) \
sys/sys/buf.h
339
lockmgr_recursed(&(bp)->b_lock)
sys/sys/buf.h
344
#define BUF_ISLOCKED(bp) \
sys/sys/buf.h
345
lockstatus(&(bp)->b_lock)
sys/sys/buf.h
350
#define BUF_DISOWNED(bp) \
sys/sys/buf.h
351
lockmgr_disowned(&(bp)->b_lock)
sys/sys/buf.h
356
#define BUF_LOCKFREE(bp) \
sys/sys/buf.h
357
lockdestroy(&(bp)->b_lock)
sys/sys/buf.h
362
#define BUF_LOCKPRINTINFO(bp) \
sys/sys/buf.h
363
lockmgr_printinfo(&(bp)->b_lock)
sys/sys/buf.h
369
#define BUF_ASSERT_LOCKED(bp) \
sys/sys/buf.h
370
_lockmgr_assert(&(bp)->b_lock, KA_LOCKED, LOCK_FILE, LOCK_LINE)
sys/sys/buf.h
371
#define BUF_ASSERT_SLOCKED(bp) \
sys/sys/buf.h
372
_lockmgr_assert(&(bp)->b_lock, KA_SLOCKED, LOCK_FILE, LOCK_LINE)
sys/sys/buf.h
373
#define BUF_ASSERT_XLOCKED(bp) \
sys/sys/buf.h
374
_lockmgr_assert(&(bp)->b_lock, KA_XLOCKED, LOCK_FILE, LOCK_LINE)
sys/sys/buf.h
375
#define BUF_ASSERT_UNLOCKED(bp) \
sys/sys/buf.h
376
_lockmgr_assert(&(bp)->b_lock, KA_UNLOCKED, LOCK_FILE, LOCK_LINE)
sys/sys/buf.h
378
#define BUF_ASSERT_LOCKED(bp)
sys/sys/buf.h
379
#define BUF_ASSERT_SLOCKED(bp)
sys/sys/buf.h
380
#define BUF_ASSERT_XLOCKED(bp)
sys/sys/buf.h
381
#define BUF_ASSERT_UNLOCKED(bp)
sys/sys/buf.h
391
#define BUF_KERNPROC(bp) \
sys/sys/buf.h
392
_lockmgr_disown(&(bp)->b_lock, LOCK_FILE, LOCK_LINE)
sys/sys/buf.h
395
#define BUF_EXTERR_FROM_CURTHR(bp) \
sys/sys/buf.h
396
bp->b_exterr = curthread->td_kexterr
sys/sys/buf.h
398
#define BUF_EXTERR_TO_CURTHR(bp) \
sys/sys/buf.h
399
curthread->td_kexterr = bp->b_exterr
sys/sys/buf.h
433
bwrite(struct buf *bp)
sys/sys/buf.h
436
KASSERT(bp->b_bufobj != NULL, ("bwrite: no bufobj bp=%p", bp));
sys/sys/buf.h
437
KASSERT(bp->b_bufobj->bo_ops != NULL, ("bwrite: no bo_ops bp=%p", bp));
sys/sys/buf.h
438
KASSERT(bp->b_bufobj->bo_ops->bop_write != NULL,
sys/sys/buf.h
439
("bwrite: no bop_write bp=%p", bp));
sys/sys/buf.h
440
return (BO_WRITE(bp->b_bufobj, bp));
sys/sys/buf.h
444
bstrategy(struct buf *bp)
sys/sys/buf.h
447
KASSERT(bp->b_bufobj != NULL, ("bstrategy: no bufobj bp=%p", bp));
sys/sys/buf.h
448
KASSERT(bp->b_bufobj->bo_ops != NULL,
sys/sys/buf.h
449
("bstrategy: no bo_ops bp=%p", bp));
sys/sys/buf.h
450
KASSERT(bp->b_bufobj->bo_ops->bop_strategy != NULL,
sys/sys/buf.h
451
("bstrategy: no bop_strategy bp=%p", bp));
sys/sys/buf.h
452
BO_STRATEGY(bp->b_bufobj, bp);
sys/sys/buf.h
456
buf_start(struct buf *bp)
sys/sys/buf.h
458
KASSERT((bp->b_flags & B_IOSTARTED) == 0,
sys/sys/buf.h
459
("recursed buf_start %p", bp));
sys/sys/buf.h
460
bp->b_flags |= B_IOSTARTED;
sys/sys/buf.h
462
(*bioops.io_start)(bp);
sys/sys/buf.h
466
buf_complete(struct buf *bp)
sys/sys/buf.h
468
if ((bp->b_flags & B_IOSTARTED) != 0) {
sys/sys/buf.h
469
bp->b_flags &= ~B_IOSTARTED;
sys/sys/buf.h
471
(*bioops.io_complete)(bp);
sys/sys/buf.h
476
buf_deallocate(struct buf *bp)
sys/sys/buf.h
479
(*bioops.io_deallocate)(bp);
sys/sys/buf.h
483
buf_countdeps(struct buf *bp, int i)
sys/sys/buf.h
486
return ((*bioops.io_countdeps)(bp, i));
sys/sys/buf.h
492
buf_track(struct buf *bp __unused, const char *location __unused)
sys/sys/buf.h
496
bp->b_io_tracking[BUF_TRACKING_ENTRY(bp->b_io_tcnt++)] = location;
sys/sys/buf.h
498
bp->b_io_tracking = location;
sys/sys/buf.h
507
#define clrbuf(bp) { \
sys/sys/buf.h
508
bzero((bp)->b_data, (u_int)(bp)->b_bcount); \
sys/sys/buf.h
509
(bp)->b_resid = 0; \
sys/sys/buf.h
540
buf_mapped(struct buf *bp)
sys/sys/buf.h
543
return (bp->b_data != unmapped_buf);
sys/sys/buf.h
552
void bdata2bio(struct buf *bp, struct bio *bip);
sys/sys/buf.h
578
void vfs_busy_pages_acquire(struct buf *bp);
sys/sys/buf.h
579
void vfs_busy_pages_release(struct buf *bp);
sys/sys/buf.h
604
void vfs_bio_brelse(struct buf *bp, int ioflags);
sys/sys/buf.h
605
void vfs_bio_bzero_buf(struct buf *bp, int base, int size);
sys/sys/buf.h
607
void vfs_bio_set_flags(struct buf *bp, int ioflags);
sys/sys/buf.h
615
void pbgetbo(struct bufobj *bo, struct buf *bp);
sys/sys/buf.h
619
int allocbuf(struct buf *bp, int size);
sys/sys/bufobj.h
137
void bufbdflush(struct bufobj *bo, struct buf *bp);
sys/sys/bufobj.h
86
#define BO_STRATEGY(bo, bp) ((bo)->bo_ops->bop_strategy((bo), (bp)))
sys/sys/bufobj.h
88
#define BO_WRITE(bo, bp) ((bo)->bo_ops->bop_write((bp)))
sys/sys/bufobj.h
89
#define BO_BDFLUSH(bo, bp) ((bo)->bo_ops->bop_bdflush((bo), (bp)))
sys/sys/conf.h
114
typedef void d_strategy_t(struct bio *bp);
sys/sys/devicestat.h
197
void devstat_start_transaction_bio(struct devstat *ds, struct bio *bp);
sys/sys/devicestat.h
198
void devstat_start_transaction_bio_t0(struct devstat *ds, struct bio *bp);
sys/sys/devicestat.h
204
void devstat_end_transaction_bio(struct devstat *ds, const struct bio *bp);
sys/sys/devicestat.h
205
void devstat_end_transaction_bio_bt(struct devstat *ds, const struct bio *bp,
sys/sys/disk.h
24
void disk_err(struct bio *bp, const char *what, int blkdone, int nl);
sys/sys/sglist.h
88
int sglist_append_bio(struct sglist *sg, struct bio *bp);
sys/ufs/ffs/ffs_alloc.c
1047
bp = buflist->bs_children[i];
sys/ufs/ffs/ffs_alloc.c
1064
dbtofsb(fs, bp->b_blkno),
sys/ufs/ffs/ffs_alloc.c
1066
(bp->b_flags & B_DELWRI) != 0 ?
sys/ufs/ffs/ffs_alloc.c
1068
bp->b_blkno = fsbtodb(fs, blkno);
sys/ufs/ffs/ffs_alloc.c
1070
if (!ffs_checkfreeblk(ip, dbtofsb(fs, bp->b_blkno),
sys/ufs/ffs/ffs_alloc.c
1720
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
1739
if ((error = ffs_getcg(fs, ump->um_devvp, cg, 0, &bp, &cgp)) != 0) {
sys/ufs/ffs/ffs_alloc.c
1772
softdep_setup_blkmapdep(bp, UFSTOVFS(ump), bprev,
sys/ufs/ffs/ffs_alloc.c
1774
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
1778
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
1799
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
1811
if ((error = ffs_getcg(fs, ump->um_devvp, cg, 0, &bp, &cgp)) != 0 ||
sys/ufs/ffs/ffs_alloc.c
1818
blkno = ffs_alloccgblk(ip, bp, bpref, rsize);
sys/ufs/ffs/ffs_alloc.c
1821
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
1842
blkno = ffs_alloccgblk(ip, bp, bpref, rsize);
sys/ufs/ffs/ffs_alloc.c
1845
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
1867
softdep_setup_blkmapdep(bp, UFSTOVFS(ump), blkno, frags, 0);
sys/ufs/ffs/ffs_alloc.c
1868
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
1872
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
1890
struct buf *bp,
sys/ufs/ffs/ffs_alloc.c
1905
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_alloc.c
1958
softdep_setup_blkmapdep(bp, UFSTOVFS(ump), blkno, size, 0);
sys/ufs/ffs/ffs_alloc.c
1978
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
1992
if ((error = ffs_getcg(fs, ump->um_devvp, cg, 0, &bp, &cgp)) != 0) {
sys/ufs/ffs/ffs_alloc.c
2019
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
2058
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
2074
if (ffs_alloccgblk(ip, bp, bno + i, fs->fs_bsize) != bno + i)
sys/ufs/ffs/ffs_alloc.c
2078
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
2124
struct buf *bp, *ibp;
sys/ufs/ffs/ffs_alloc.c
2137
if ((error = ffs_getcg(fs, ump->um_devvp, cg, 0, &bp, &cgp)) != 0) {
sys/ufs/ffs/ffs_alloc.c
2144
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
2193
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
2235
error = ffs_getcg(fs, ump->um_devvp, cg, 0, &bp, &cgp);
sys/ufs/ffs/ffs_alloc.c
2260
softdep_setup_inomapdep(bp, ip, cg * fs->fs_ipg + ipref, mode);
sys/ufs/ffs/ffs_alloc.c
2261
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
2283
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
2320
if ((error = ffs_getcg(fs, devvp, cg, GB_CVTENXIO, &bp, &cgp)) != 0) {
sys/ufs/ffs/ffs_alloc.c
2333
error = getblkx(devvp, dbn, dbn, fs->fs_cgsize, 0, 0, 0, &bp);
sys/ufs/ffs/ffs_alloc.c
2335
softdep_setup_blkfree(UFSTOVFS(ump), bp, bno,
sys/ufs/ffs/ffs_alloc.c
2337
bp->b_flags |= B_RELBUF | B_NOCACHE;
sys/ufs/ffs/ffs_alloc.c
2338
bp->b_flags &= ~B_CACHE;
sys/ufs/ffs/ffs_alloc.c
2339
bawrite(bp);
sys/ufs/ffs/ffs_alloc.c
2351
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
2410
softdep_setup_blkfree(UFSTOVFS(ump), bp, bno,
sys/ufs/ffs/ffs_alloc.c
2412
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
2469
ffs_blkfree_trim_completed(struct buf *bp)
sys/ufs/ffs/ffs_alloc.c
2473
tp = bp->b_fsprivate1;
sys/ufs/ffs/ffs_alloc.c
2474
free(bp, M_TRIM);
sys/ufs/ffs/ffs_alloc.c
2574
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
2583
bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO);
sys/ufs/ffs/ffs_alloc.c
2584
bp->b_iocmd = BIO_DELETE;
sys/ufs/ffs/ffs_alloc.c
2585
bp->b_iooffset = dbtob(fsbtodb(ump->um_fs, tp->bno));
sys/ufs/ffs/ffs_alloc.c
2586
bp->b_iodone = ffs_blkfree_trim_completed;
sys/ufs/ffs/ffs_alloc.c
2587
bp->b_bcount = tp->size;
sys/ufs/ffs/ffs_alloc.c
2588
bp->b_fsprivate1 = tp;
sys/ufs/ffs/ffs_alloc.c
2598
g_vfs_strategy(ump->um_bo, bp);
sys/ufs/ffs/ffs_alloc.c
263
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
273
bp = NULL;
sys/ufs/ffs/ffs_alloc.c
2784
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
2797
if (ffs_getcg(fs, ITODEVVP(ip), dtog(fs, bno), 0, &bp, &cgp) != 0)
sys/ufs/ffs/ffs_alloc.c
2811
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
2847
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
2864
bp = NULL;
sys/ufs/ffs/ffs_alloc.c
2870
if ((error = ffs_getcg(fs, devvp, cg, GB_CVTENXIO, &bp, &cgp)) != 0) {
sys/ufs/ffs/ffs_alloc.c
2883
error = getblkx(devvp, dbn, dbn, fs->fs_cgsize, 0, 0, 0, &bp);
sys/ufs/ffs/ffs_alloc.c
2885
softdep_setup_inofree(UFSTOVFS(ump), bp, ino, wkhd, true);
sys/ufs/ffs/ffs_alloc.c
2886
bp->b_flags |= B_RELBUF | B_NOCACHE;
sys/ufs/ffs/ffs_alloc.c
2887
bp->b_flags &= ~B_CACHE;
sys/ufs/ffs/ffs_alloc.c
2888
bawrite(bp);
sys/ufs/ffs/ffs_alloc.c
2915
softdep_setup_inofree(UFSTOVFS(ump), bp, ino, wkhd, false);
sys/ufs/ffs/ffs_alloc.c
2916
bdwrite(bp);
sys/ufs/ffs/ffs_alloc.c
2931
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
2941
if ((error = ffs_getcg(fs, devvp, cg, 0, &bp, &cgp)) != 0)
sys/ufs/ffs/ffs_alloc.c
2946
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
3027
struct buf *bp;
sys/ufs/ffs/ffs_alloc.c
3046
NULL, 0, NOCRED, flags, ffs_ckhash_cg, &bp);
sys/ufs/ffs/ffs_alloc.c
3049
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_alloc.c
3051
(bp->b_flags & B_CKHASH) != 0 &&
sys/ufs/ffs/ffs_alloc.c
3052
cgp->cg_ckhash != bp->b_ckhash) {
sys/ufs/ffs/ffs_alloc.c
3060
cgp->cg_ckhash, (uintmax_t)bp->b_ckhash);
sys/ufs/ffs/ffs_alloc.c
3062
bp->b_flags &= ~B_CKHASH;
sys/ufs/ffs/ffs_alloc.c
3063
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_alloc.c
3064
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
3082
bp->b_flags &= ~B_CKHASH;
sys/ufs/ffs/ffs_alloc.c
3083
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_alloc.c
3084
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
3087
bp->b_flags &= ~B_CKHASH;
sys/ufs/ffs/ffs_alloc.c
3088
bp->b_xflags |= BX_BKGRDWRITE;
sys/ufs/ffs/ffs_alloc.c
3098
bp->b_xflags |= BX_CYLGRP;
sys/ufs/ffs/ffs_alloc.c
310
error = bread_gb(vp, lbprev, osize, NOCRED, gbflags, &bp);
sys/ufs/ffs/ffs_alloc.c
3101
*bpp = bp;
sys/ufs/ffs/ffs_alloc.c
3107
ffs_ckhash_cg(struct buf *bp)
sys/ufs/ffs/ffs_alloc.c
3112
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_alloc.c
3115
bp->b_ckhash = calculate_crc32c(~0L, bp->b_data, bp->b_bcount);
sys/ufs/ffs/ffs_alloc.c
315
if (bp->b_blkno == bp->b_lblkno) {
sys/ufs/ffs/ffs_alloc.c
318
bp->b_blkno = fsbtodb(fs, bprev);
sys/ufs/ffs/ffs_alloc.c
324
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
336
if (bp->b_blkno != fsbtodb(fs, bno))
sys/ufs/ffs/ffs_alloc.c
344
allocbuf(bp, nsize);
sys/ufs/ffs/ffs_alloc.c
345
bp->b_flags |= B_DONE;
sys/ufs/ffs/ffs_alloc.c
346
vfs_bio_bzero_buf(bp, osize, nsize - osize);
sys/ufs/ffs/ffs_alloc.c
347
if ((bp->b_flags & (B_MALLOC | B_VMIO)) == B_VMIO)
sys/ufs/ffs/ffs_alloc.c
348
vfs_bio_set_valid(bp, osize, nsize - osize);
sys/ufs/ffs/ffs_alloc.c
349
*bpp = bp;
sys/ufs/ffs/ffs_alloc.c
402
bp->b_blkno = fsbtodb(fs, bno);
sys/ufs/ffs/ffs_alloc.c
420
(bp->b_flags & B_DELWRI) != 0 ?
sys/ufs/ffs/ffs_alloc.c
428
allocbuf(bp, nsize);
sys/ufs/ffs/ffs_alloc.c
429
bp->b_flags |= B_DONE;
sys/ufs/ffs/ffs_alloc.c
430
vfs_bio_bzero_buf(bp, osize, nsize - osize);
sys/ufs/ffs/ffs_alloc.c
431
if ((bp->b_flags & (B_MALLOC | B_VMIO)) == B_VMIO)
sys/ufs/ffs/ffs_alloc.c
432
vfs_bio_set_valid(bp, osize, nsize - osize);
sys/ufs/ffs/ffs_alloc.c
433
*bpp = bp;
sys/ufs/ffs/ffs_alloc.c
451
if (bp) {
sys/ufs/ffs/ffs_alloc.c
452
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
453
bp = NULL;
sys/ufs/ffs/ffs_alloc.c
459
if (bp)
sys/ufs/ffs/ffs_alloc.c
460
brelse(bp);
sys/ufs/ffs/ffs_alloc.c
571
struct buf *sbp, *ebp, *bp;
sys/ufs/ffs/ffs_alloc.c
781
bp = buflist->bs_children[i];
sys/ufs/ffs/ffs_alloc.c
798
dbtofsb(fs, bp->b_blkno),
sys/ufs/ffs/ffs_alloc.c
800
(bp->b_flags & B_DELWRI) != 0 ?
sys/ufs/ffs/ffs_alloc.c
802
bp->b_blkno = fsbtodb(fs, blkno);
sys/ufs/ffs/ffs_alloc.c
804
if (!ffs_checkfreeblk(ip, dbtofsb(fs, bp->b_blkno),
sys/ufs/ffs/ffs_alloc.c
839
struct buf *sbp, *ebp, *bp;
sys/ufs/ffs/ffs_balloc.c
1000
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
1002
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
1003
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
1004
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
1012
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
1034
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
1064
softdep_setup_allocindir_page(ip, lbn, bp,
sys/ufs/ffs/ffs_balloc.c
1072
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
1074
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
1075
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
1076
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
1083
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
1142
bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0,
sys/ufs/ffs/ffs_balloc.c
1144
if (bp != NULL) {
sys/ufs/ffs/ffs_balloc.c
1145
KASSERT(bp->b_blkno == fsbtodb(fs, *blkp),
sys/ufs/ffs/ffs_balloc.c
1147
(intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree,
sys/ufs/ffs/ffs_balloc.c
1148
(uintmax_t)bp->b_blkno,
sys/ufs/ffs/ffs_balloc.c
1150
bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE;
sys/ufs/ffs/ffs_balloc.c
1151
bp->b_flags &= ~(B_ASYNC | B_CACHE);
sys/ufs/ffs/ffs_balloc.c
1152
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
1162
(int)fs->fs_bsize, NOCRED, gbwflag, &bp);
sys/ufs/ffs/ffs_balloc.c
1165
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
1167
bap = (ufs2_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_balloc.c
1170
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
1172
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
1173
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
1174
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
1197
bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0,
sys/ufs/ffs/ffs_balloc.c
1199
if (bp != NULL) {
sys/ufs/ffs/ffs_balloc.c
1201
(intmax_t)bp->b_lblkno, (uintmax_t)bp->b_blkno,
sys/ufs/ffs/ffs_balloc.c
143
cred, &bp);
sys/ufs/ffs/ffs_balloc.c
148
dbtofsb(fs, bp->b_blkno), dp->di_db[nb],
sys/ufs/ffs/ffs_balloc.c
149
fs->fs_bsize, osize, bp);
sys/ufs/ffs/ffs_balloc.c
152
dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
sys/ufs/ffs/ffs_balloc.c
156
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
158
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
160
bawrite(bp);
sys/ufs/ffs/ffs_balloc.c
173
&bp);
sys/ufs/ffs/ffs_balloc.c
177
bp = getblk(vp, lbn, fs->fs_bsize, 0, 0,
sys/ufs/ffs/ffs_balloc.c
179
if (bp == NULL) {
sys/ufs/ffs/ffs_balloc.c
183
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_balloc.c
185
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
186
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
197
error = bread(vp, lbn, osize, NOCRED, &bp);
sys/ufs/ffs/ffs_balloc.c
200
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
206
cred, &bp);
sys/ufs/ffs/ffs_balloc.c
211
dbtofsb(fs, bp->b_blkno), nb,
sys/ufs/ffs/ffs_balloc.c
212
nsize, osize, bp);
sys/ufs/ffs/ffs_balloc.c
225
bp = getblk(vp, lbn, nsize, 0, 0, gbflags);
sys/ufs/ffs/ffs_balloc.c
226
bp->b_blkno = fsbtodb(fs, newb);
sys/ufs/ffs/ffs_balloc.c
228
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_balloc.c
231
nsize, 0, bp);
sys/ufs/ffs/ffs_balloc.c
233
dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno);
sys/ufs/ffs/ffs_balloc.c
235
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
273
bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, gbflags);
sys/ufs/ffs/ffs_balloc.c
274
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
275
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_balloc.c
279
fs->fs_bsize, 0, bp);
sys/ufs/ffs/ffs_balloc.c
280
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
282
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
283
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
284
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
286
if ((error = bwrite(bp)) != 0)
sys/ufs/ffs/ffs_balloc.c
299
indirs[i].in_lbn, (int)fs->fs_bsize, NOCRED, &bp);
sys/ufs/ffs/ffs_balloc.c
303
bap = (ufs1_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_balloc.c
307
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
314
bqrelse(bp);
sys/ufs/ffs/ffs_balloc.c
327
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
357
softdep_setup_allocindir_meta(nbp, ip, bp,
sys/ufs/ffs/ffs_balloc.c
366
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
378
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
380
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
381
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
382
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
390
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
412
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
442
softdep_setup_allocindir_page(ip, lbn, bp,
sys/ufs/ffs/ffs_balloc.c
450
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
452
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
453
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
454
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
461
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
514
bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0,
sys/ufs/ffs/ffs_balloc.c
516
if (bp != NULL) {
sys/ufs/ffs/ffs_balloc.c
517
KASSERT(bp->b_blkno == fsbtodb(fs, *blkp),
sys/ufs/ffs/ffs_balloc.c
519
(intmax_t)bp->b_lblkno, (uintmax_t)*lbns_remfree,
sys/ufs/ffs/ffs_balloc.c
520
(uintmax_t)bp->b_blkno,
sys/ufs/ffs/ffs_balloc.c
522
bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE;
sys/ufs/ffs/ffs_balloc.c
523
bp->b_flags &= ~(B_ASYNC | B_CACHE);
sys/ufs/ffs/ffs_balloc.c
524
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
534
(int)fs->fs_bsize, NOCRED, &bp);
sys/ufs/ffs/ffs_balloc.c
537
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
539
bap = (ufs1_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_balloc.c
542
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
544
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
545
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
546
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
569
bp = getblk(vp, *lbns_remfree, fs->fs_bsize, 0, 0,
sys/ufs/ffs/ffs_balloc.c
571
if (bp != NULL) {
sys/ufs/ffs/ffs_balloc.c
573
(intmax_t)bp->b_lblkno, (uintmax_t)bp->b_blkno,
sys/ufs/ffs/ffs_balloc.c
601
struct buf *bp, *nbp;
sys/ufs/ffs/ffs_balloc.c
660
(int)fs->fs_bsize, flags, cred, &bp);
sys/ufs/ffs/ffs_balloc.c
665
dbtofsb(fs, bp->b_blkno),
sys/ufs/ffs/ffs_balloc.c
667
fs->fs_bsize, osize, bp);
sys/ufs/ffs/ffs_balloc.c
669
dp->di_extb[nb] = dbtofsb(fs, bp->b_blkno);
sys/ufs/ffs/ffs_balloc.c
670
bp->b_xflags |= BX_ALTDATA;
sys/ufs/ffs/ffs_balloc.c
674
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
676
bawrite(bp);
sys/ufs/ffs/ffs_balloc.c
687
gbflags, &bp);
sys/ufs/ffs/ffs_balloc.c
690
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
691
bp->b_xflags |= BX_ALTDATA;
sys/ufs/ffs/ffs_balloc.c
692
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
703
gbflags, &bp);
sys/ufs/ffs/ffs_balloc.c
706
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
707
bp->b_xflags |= BX_ALTDATA;
sys/ufs/ffs/ffs_balloc.c
714
cred, &bp);
sys/ufs/ffs/ffs_balloc.c
717
bp->b_xflags |= BX_ALTDATA;
sys/ufs/ffs/ffs_balloc.c
720
dbtofsb(fs, bp->b_blkno), nb,
sys/ufs/ffs/ffs_balloc.c
721
nsize, osize, bp);
sys/ufs/ffs/ffs_balloc.c
734
bp = getblk(vp, -1 - lbn, nsize, 0, 0, gbflags);
sys/ufs/ffs/ffs_balloc.c
735
bp->b_blkno = fsbtodb(fs, newb);
sys/ufs/ffs/ffs_balloc.c
736
bp->b_xflags |= BX_ALTDATA;
sys/ufs/ffs/ffs_balloc.c
738
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_balloc.c
741
nsize, 0, bp);
sys/ufs/ffs/ffs_balloc.c
743
dp->di_extb[lbn] = dbtofsb(fs, bp->b_blkno);
sys/ufs/ffs/ffs_balloc.c
745
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
763
flags, cred, &bp);
sys/ufs/ffs/ffs_balloc.c
768
dbtofsb(fs, bp->b_blkno),
sys/ufs/ffs/ffs_balloc.c
770
fs->fs_bsize, osize, bp);
sys/ufs/ffs/ffs_balloc.c
773
dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
sys/ufs/ffs/ffs_balloc.c
777
bwrite(bp);
sys/ufs/ffs/ffs_balloc.c
779
bawrite(bp);
sys/ufs/ffs/ffs_balloc.c
792
gbflags, &bp);
sys/ufs/ffs/ffs_balloc.c
796
bp = getblk(vp, lbn, fs->fs_bsize, 0, 0,
sys/ufs/ffs/ffs_balloc.c
798
if (bp == NULL) {
sys/ufs/ffs/ffs_balloc.c
802
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_balloc.c
804
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
805
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
817
gbflags, &bp);
sys/ufs/ffs/ffs_balloc.c
820
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
826
cred, &bp);
sys/ufs/ffs/ffs_balloc.c
831
dbtofsb(fs, bp->b_blkno), nb,
sys/ufs/ffs/ffs_balloc.c
832
nsize, osize, bp);
sys/ufs/ffs/ffs_balloc.c
845
bp = getblk(vp, lbn, nsize, 0, 0, gbflags);
sys/ufs/ffs/ffs_balloc.c
846
bp->b_blkno = fsbtodb(fs, newb);
sys/ufs/ffs/ffs_balloc.c
848
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_balloc.c
851
nsize, 0, bp);
sys/ufs/ffs/ffs_balloc.c
853
dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno);
sys/ufs/ffs/ffs_balloc.c
855
*bpp = bp;
sys/ufs/ffs/ffs_balloc.c
893
bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, 0,
sys/ufs/ffs/ffs_balloc.c
895
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
896
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_balloc.c
900
fs->fs_bsize, 0, bp);
sys/ufs/ffs/ffs_balloc.c
901
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
903
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
904
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_balloc.c
905
bdwrite(bp);
sys/ufs/ffs/ffs_balloc.c
907
if ((error = bwrite(bp)) != 0)
sys/ufs/ffs/ffs_balloc.c
920
NOCRED, gbwflag, &bp);
sys/ufs/ffs/ffs_balloc.c
924
bap = (ufs2_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_balloc.c
928
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
935
bqrelse(bp);
sys/ufs/ffs/ffs_balloc.c
948
brelse(bp);
sys/ufs/ffs/ffs_balloc.c
97
struct buf *bp, *nbp;
sys/ufs/ffs/ffs_balloc.c
979
softdep_setup_allocindir_meta(nbp, ip, bp,
sys/ufs/ffs/ffs_balloc.c
988
brelse(bp);
sys/ufs/ffs/ffs_inode.c
148
(int) fs->fs_bsize, NULL, NULL, 0, NOCRED, flags, NULL, &bp);
sys/ufs/ffs/ffs_inode.c
186
softdep_update_inodeblock(ip, bp, waitfor);
sys/ufs/ffs/ffs_inode.c
190
*((struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_inode.c
199
*((struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_inode.c
208
error = bwrite(bp);
sys/ufs/ffs/ffs_inode.c
212
bawrite(bp);
sys/ufs/ffs/ffs_inode.c
215
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_inode.c
216
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_inode.c
217
bdwrite(bp);
sys/ufs/ffs/ffs_inode.c
245
struct buf *bp;
sys/ufs/ffs/ffs_inode.c
368
error = UFS_BALLOC(vp, length - 1, 1, cred, flags, &bp);
sys/ufs/ffs/ffs_inode.c
375
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_inode.c
376
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_inode.c
377
ffs_inode_bwrite(vp, bp, flags);
sys/ufs/ffs/ffs_inode.c
392
cred, BA_METAONLY, &bp);
sys/ufs/ffs/ffs_inode.c
397
blkno = ((ufs1_daddr_t *)(bp->b_data))[indiroff];
sys/ufs/ffs/ffs_inode.c
399
blkno = ((ufs2_daddr_t *)(bp->b_data))[indiroff];
sys/ufs/ffs/ffs_inode.c
407
brelse(bp);
sys/ufs/ffs/ffs_inode.c
409
bwrite(bp);
sys/ufs/ffs/ffs_inode.c
411
bdwrite(bp);
sys/ufs/ffs/ffs_inode.c
472
error = UFS_BALLOC(vp, length - 1, 1, cred, flags, &bp);
sys/ufs/ffs/ffs_inode.c
475
ffs_inode_bwrite(vp, bp, flags);
sys/ufs/ffs/ffs_inode.c
490
error = UFS_BALLOC(vp, length - 1, 1, cred, flags, &bp);
sys/ufs/ffs/ffs_inode.c
501
bzero((char *)bp->b_data + offset,
sys/ufs/ffs/ffs_inode.c
504
allocbuf(bp, size);
sys/ufs/ffs/ffs_inode.c
505
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_inode.c
506
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_inode.c
507
ffs_inode_bwrite(vp, bp, flags);
sys/ufs/ffs/ffs_inode.c
704
struct buf *bp;
sys/ufs/ffs/ffs_inode.c
72
ffs_inode_bwrite(struct vnode *vp, struct buf *bp, int flags)
sys/ufs/ffs/ffs_inode.c
740
NOCRED, 0, NULL, &bp);
sys/ufs/ffs/ffs_inode.c
747
bap1 = (ufs1_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_inode.c
749
bap2 = (ufs2_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_inode.c
75
bwrite(bp);
sys/ufs/ffs/ffs_inode.c
752
bcopy((caddr_t)bp->b_data, copy, (uint64_t)fs->fs_bsize);
sys/ufs/ffs/ffs_inode.c
759
bdwrite(bp);
sys/ufs/ffs/ffs_inode.c
761
error = bwrite(bp);
sys/ufs/ffs/ffs_inode.c
77
bdwrite(bp);
sys/ufs/ffs/ffs_inode.c
79
bawrite(bp);
sys/ufs/ffs/ffs_inode.c
809
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_inode.c
810
brelse(bp);
sys/ufs/ffs/ffs_inode.c
97
struct buf *bp;
sys/ufs/ffs/ffs_rawread.c
182
struct buf *bp)
sys/ufs/ffs/ffs_rawread.c
200
bp->b_bcount = len;
sys/ufs/ffs/ffs_rawread.c
201
if (bp->b_bcount + iolen > bp->b_kvasize) {
sys/ufs/ffs/ffs_rawread.c
202
bp->b_bcount = bp->b_kvasize;
sys/ufs/ffs/ffs_rawread.c
204
bp->b_bcount -= PAGE_SIZE;
sys/ufs/ffs/ffs_rawread.c
206
bp->b_flags = 0; /* XXX necessary ? */
sys/ufs/ffs/ffs_rawread.c
207
bp->b_iocmd = BIO_READ;
sys/ufs/ffs/ffs_rawread.c
208
bp->b_iodone = bdone;
sys/ufs/ffs/ffs_rawread.c
215
bp->b_lblkno = bp->b_blkno = blockno;
sys/ufs/ffs/ffs_rawread.c
217
error = ufs_bmaparray(vp, bp->b_lblkno, &blkno, NULL, &bforwards, NULL);
sys/ufs/ffs/ffs_rawread.c
223
if (bp->b_bcount + blockoff * DEV_BSIZE > bsize)
sys/ufs/ffs/ffs_rawread.c
224
bp->b_bcount = bsize - blockoff * DEV_BSIZE;
sys/ufs/ffs/ffs_rawread.c
226
if (vmapbuf(bp, udata, bp->b_bcount, 1) < 0)
sys/ufs/ffs/ffs_rawread.c
230
bzero(bp->b_data, bp->b_bufsize);
sys/ufs/ffs/ffs_rawread.c
234
bp->b_resid = 0;
sys/ufs/ffs/ffs_rawread.c
235
bp->b_flags |= B_DONE;
sys/ufs/ffs/ffs_rawread.c
238
bp->b_blkno = blkno + blockoff;
sys/ufs/ffs/ffs_rawread.c
239
bp->b_offset = bp->b_iooffset = (blkno + blockoff) * DEV_BSIZE;
sys/ufs/ffs/ffs_rawread.c
241
if (bp->b_bcount + blockoff * DEV_BSIZE > bsize * (1 + bforwards))
sys/ufs/ffs/ffs_rawread.c
242
bp->b_bcount = bsize * (1 + bforwards) - blockoff * DEV_BSIZE;
sys/ufs/ffs/ffs_rawread.c
244
if (vmapbuf(bp, udata, bp->b_bcount, 1) < 0)
sys/ufs/ffs/ffs_rawread.c
247
BO_STRATEGY(&dp->v_bufobj, bp);
sys/ufs/ffs/ffs_rawread.c
256
struct buf *bp, *nbp, *tbp;
sys/ufs/ffs/ffs_rawread.c
271
bp = NULL;
sys/ufs/ffs/ffs_rawread.c
276
if (bp == NULL) { /* Setup first read */
sys/ufs/ffs/ffs_rawread.c
277
bp = uma_zalloc(ffsraw_pbuf_zone, M_WAITOK);
sys/ufs/ffs/ffs_rawread.c
278
pbgetvp(vp, bp);
sys/ufs/ffs/ffs_rawread.c
280
resid, td, bp);
sys/ufs/ffs/ffs_rawread.c
284
if (resid > bp->b_bufsize) { /* Setup first readahead */
sys/ufs/ffs/ffs_rawread.c
295
bp->b_bufsize,
sys/ufs/ffs/ffs_rawread.c
297
bp->b_bufsize,
sys/ufs/ffs/ffs_rawread.c
299
bp->b_bufsize,
sys/ufs/ffs/ffs_rawread.c
312
bwait(bp, PRIBIO, "rawrd");
sys/ufs/ffs/ffs_rawread.c
313
vunmapbuf(bp);
sys/ufs/ffs/ffs_rawread.c
315
iolen = bp->b_bcount - bp->b_resid;
sys/ufs/ffs/ffs_rawread.c
316
if (iolen == 0 && (bp->b_ioflags & BIO_ERROR) == 0) {
sys/ufs/ffs/ffs_rawread.c
321
if ((bp->b_ioflags & BIO_ERROR) != 0) {
sys/ufs/ffs/ffs_rawread.c
322
error = bp->b_error;
sys/ufs/ffs/ffs_rawread.c
328
if (iolen < bp->b_bufsize) {
sys/ufs/ffs/ffs_rawread.c
333
bp->b_bufsize - iolen,
sys/ufs/ffs/ffs_rawread.c
335
bp);
sys/ufs/ffs/ffs_rawread.c
340
tbp = bp;
sys/ufs/ffs/ffs_rawread.c
341
bp = nbp;
sys/ufs/ffs/ffs_rawread.c
344
if (resid <= bp->b_bufsize) { /* No more readaheads */
sys/ufs/ffs/ffs_rawread.c
351
bp->b_bufsize,
sys/ufs/ffs/ffs_rawread.c
353
bp->b_bufsize,
sys/ufs/ffs/ffs_rawread.c
355
bp->b_bufsize,
sys/ufs/ffs/ffs_rawread.c
368
resid, td, bp);
sys/ufs/ffs/ffs_rawread.c
374
if (bp != NULL) {
sys/ufs/ffs/ffs_rawread.c
375
pbrelvp(bp);
sys/ufs/ffs/ffs_rawread.c
376
uma_zfree(ffsraw_pbuf_zone, bp);
sys/ufs/ffs/ffs_rawread.c
62
struct buf *bp);
sys/ufs/ffs/ffs_snapshot.c
1049
struct buf *bp;
sys/ufs/ffs/ffs_snapshot.c
1064
fs->fs_bsize, KERNCRED, BA_METAONLY, &bp);
sys/ufs/ffs/ffs_snapshot.c
1069
blkno = ((ufs1_daddr_t *)(bp->b_data))[indiroff];
sys/ufs/ffs/ffs_snapshot.c
1070
bqrelse(bp);
sys/ufs/ffs/ffs_snapshot.c
1073
if ((error = bread(snapvp, lbn, fs->fs_bsize, KERNCRED, &bp)))
sys/ufs/ffs/ffs_snapshot.c
1077
fs->fs_bsize, KERNCRED, 0, &bp);
sys/ufs/ffs/ffs_snapshot.c
1080
if ((error = readblock(snapvp, bp, lbn)) != 0)
sys/ufs/ffs/ffs_snapshot.c
1087
dip = (struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_snapshot.c
1096
bdwrite(bp);
sys/ufs/ffs/ffs_snapshot.c
1148
struct buf *bp;
sys/ufs/ffs/ffs_snapshot.c
1163
bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0);
sys/ufs/ffs/ffs_snapshot.c
1164
bp->b_blkno = fsbtodb(fs, blkno);
sys/ufs/ffs/ffs_snapshot.c
1165
if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0 &&
sys/ufs/ffs/ffs_snapshot.c
1166
(error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) {
sys/ufs/ffs/ffs_snapshot.c
1167
brelse(bp);
sys/ufs/ffs/ffs_snapshot.c
117
ffs_copyonwrite(struct vnode *devvp, struct buf *bp)
sys/ufs/ffs/ffs_snapshot.c
1177
bcopy(bp->b_data, (caddr_t)bap, fs->fs_bsize);
sys/ufs/ffs/ffs_snapshot.c
1178
bqrelse(bp);
sys/ufs/ffs/ffs_snapshot.c
1331
struct buf *bp;
sys/ufs/ffs/ffs_snapshot.c
1346
fs->fs_bsize, KERNCRED, BA_METAONLY, &bp);
sys/ufs/ffs/ffs_snapshot.c
1351
blkno = ((ufs2_daddr_t *)(bp->b_data))[indiroff];
sys/ufs/ffs/ffs_snapshot.c
1352
bqrelse(bp);
sys/ufs/ffs/ffs_snapshot.c
1355
if ((error = bread(snapvp, lbn, fs->fs_bsize, KERNCRED, &bp)))
sys/ufs/ffs/ffs_snapshot.c
1359
fs->fs_bsize, KERNCRED, 0, &bp);
sys/ufs/ffs/ffs_snapshot.c
1362
if ((error = readblock(snapvp, bp, lbn)) != 0)
sys/ufs/ffs/ffs_snapshot.c
1369
dip = (struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_snapshot.c
1380
bdwrite(bp);
sys/ufs/ffs/ffs_snapshot.c
1432
struct buf *bp;
sys/ufs/ffs/ffs_snapshot.c
1447
bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0);
sys/ufs/ffs/ffs_snapshot.c
1448
bp->b_blkno = fsbtodb(fs, blkno);
sys/ufs/ffs/ffs_snapshot.c
1449
if ((bp->b_flags & B_CACHE) == 0 &&
sys/ufs/ffs/ffs_snapshot.c
1450
(error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) {
sys/ufs/ffs/ffs_snapshot.c
1451
brelse(bp);
sys/ufs/ffs/ffs_snapshot.c
1461
bcopy(bp->b_data, (caddr_t)bap, fs->fs_bsize);
sys/ufs/ffs/ffs_snapshot.c
1462
bqrelse(bp);
sys/ufs/ffs/ffs_snapshot.c
209
struct buf *bp, *nbp, *ibp;
sys/ufs/ffs/ffs_snapshot.c
2168
ffs_bp_snapblk(struct vnode *devvp, struct buf *bp)
sys/ufs/ffs/ffs_snapshot.c
2181
lbn = fragstoblks(fs, dbtofsb(fs, bp->b_blkno));
sys/ufs/ffs/ffs_snapshot.c
2200
ffs_bdflush(struct bufobj *bo, struct buf *bp)
sys/ufs/ffs/ffs_snapshot.c
2211
vp = bp->b_vp;
sys/ufs/ffs/ffs_snapshot.c
2213
KASSERT(vp == devvp, ("devvp != vp %p %p", bo, bp));
sys/ufs/ffs/ffs_snapshot.c
2216
bp_bdskip = ffs_bp_snapblk(devvp, bp);
sys/ufs/ffs/ffs_snapshot.c
2233
if (bp == nbp)
sys/ufs/ffs/ffs_snapshot.c
2274
ffs_copyonwrite(struct vnode *devvp, struct buf *bp)
sys/ufs/ffs/ffs_snapshot.c
2287
if (devvp != bp->b_vp && IS_SNAPSHOT(VTOI(bp->b_vp)))
sys/ufs/ffs/ffs_snapshot.c
2304
lbn = fragstoblks(fs, dbtofsb(fs, bp->b_blkno));
sys/ufs/ffs/ffs_snapshot.c
2332
saved_runningbufspace = bp->b_runningbufspace;
sys/ufs/ffs/ffs_snapshot.c
2334
runningbufwakeup(bp);
sys/ufs/ffs/ffs_snapshot.c
2346
(void)runningbufclaim(bp,
sys/ufs/ffs/ffs_snapshot.c
2362
if (bp->b_vp == vp)
sys/ufs/ffs/ffs_snapshot.c
2387
if (blkno == BLK_SNAP && bp->b_lblkno >= 0)
sys/ufs/ffs/ffs_snapshot.c
2412
if (bp->b_vp == devvp)
sys/ufs/ffs/ffs_snapshot.c
2416
(uintmax_t)VTOI(bp->b_vp)->i_number);
sys/ufs/ffs/ffs_snapshot.c
2418
(intmax_t)bp->b_lblkno, (intmax_t)cbp->b_blkno);
sys/ufs/ffs/ffs_snapshot.c
2434
if ((devvp == bp->b_vp || bp->b_vp->v_type == VDIR ||
sys/ufs/ffs/ffs_snapshot.c
2447
if ((devvp == bp->b_vp || bp->b_vp->v_type == VDIR ||
sys/ufs/ffs/ffs_snapshot.c
2467
if ((devvp == bp->b_vp || bp->b_vp->v_type == VDIR ||
sys/ufs/ffs/ffs_snapshot.c
2482
(void)runningbufclaim(bp, saved_runningbufspace);
sys/ufs/ffs/ffs_snapshot.c
2526
struct buf *bp,
sys/ufs/ffs/ffs_snapshot.c
2535
bp->b_iocmd = BIO_READ;
sys/ufs/ffs/ffs_snapshot.c
2536
bp->b_iooffset = dbtob(fsbtodb(fs, blkstofrags(fs, lbn)));
sys/ufs/ffs/ffs_snapshot.c
2537
bp->b_iodone = bdone;
sys/ufs/ffs/ffs_snapshot.c
2538
g_vfs_strategy(&ITODEVVP(ip)->v_bufobj, bp);
sys/ufs/ffs/ffs_snapshot.c
2539
bufwait(bp);
sys/ufs/ffs/ffs_snapshot.c
2540
return (bp->b_error);
sys/ufs/ffs/ffs_snapshot.c
317
fs->fs_bsize, KERNCRED, BA_CLRBUF, &bp);
sys/ufs/ffs/ffs_snapshot.c
320
bawrite(bp);
sys/ufs/ffs/ffs_snapshot.c
500
len, KERNCRED, &bp)) != 0) {
sys/ufs/ffs/ffs_snapshot.c
501
brelse(bp);
sys/ufs/ffs/ffs_snapshot.c
504
bcopy(bp->b_data, space, (uint64_t)len);
sys/ufs/ffs/ffs_snapshot.c
506
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_snapshot.c
507
brelse(bp);
sys/ufs/ffs/ffs_snapshot.c
659
fs->fs_bsize, KERNCRED, BA_CLRBUF, &bp);
sys/ufs/ffs/ffs_snapshot.c
662
error = readblock(vp, bp, blockno);
sys/ufs/ffs/ffs_snapshot.c
663
bawrite(bp);
sys/ufs/ffs/ffs_snapshot.c
922
struct buf *bp, *ibp;
sys/ufs/ffs/ffs_snapshot.c
931
if ((error = ffs_getcg(fs, ITODEVVP(ip), cg, 0, &bp, &cgp)) != 0)
sys/ufs/ffs/ffs_snapshot.c
943
bcopy(bp->b_data, nbp->b_data, fs->fs_cgsize);
sys/ufs/ffs/ffs_snapshot.c
948
bqrelse(bp);
sys/ufs/ffs/ffs_softdep.c
10220
struct buf *bp) /* structure describing disk write to occur */
sys/ufs/ffs/ffs_softdep.c
10234
if (bp->b_iocmd != BIO_WRITE)
sys/ufs/ffs/ffs_softdep.c
10237
if (bp->b_vflags & BV_BKGRDINPROG)
sys/ufs/ffs/ffs_softdep.c
10239
"background write in progress: %p", bp);
sys/ufs/ffs/ffs_softdep.c
10241
ump = softdep_bp_to_mp(bp);
sys/ufs/ffs/ffs_softdep.c
10250
for (wk = LIST_FIRST(&bp->b_dep); wk != NULL;
sys/ufs/ffs/ffs_softdep.c
10255
initiate_write_filepage(WK_PAGEDEP(wk), bp);
sys/ufs/ffs/ffs_softdep.c
10261
initiate_write_inodeblock_ufs1(inodedep, bp);
sys/ufs/ffs/ffs_softdep.c
10263
initiate_write_inodeblock_ufs2(inodedep, bp);
sys/ufs/ffs/ffs_softdep.c
10267
initiate_write_indirdep(WK_INDIRDEP(wk), bp);
sys/ufs/ffs/ffs_softdep.c
10271
initiate_write_bmsafemap(WK_BMSAFEMAP(wk), bp);
sys/ufs/ffs/ffs_softdep.c
10339
initiate_write_filepage(struct pagedep *pagedep, struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
10373
((char *)bp->b_data + dap->da_offset);
sys/ufs/ffs/ffs_softdep.c
10402
struct buf *bp) /* The inode block */
sys/ufs/ffs/ffs_softdep.c
10422
dp = (struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
10574
struct buf *bp) /* The inode block */
sys/ufs/ffs/ffs_softdep.c
10594
dp = (struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
10810
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
10841
cancel_allocindir(aip, bp, freeblks, 0);
sys/ufs/ffs/ffs_softdep.c
10855
bcopy(bp->b_data, indirdep->ir_savebp->b_data, bp->b_bcount);
sys/ufs/ffs/ffs_softdep.c
10857
bcopy(bp->b_data, indirdep->ir_saveddata, bp->b_bcount);
sys/ufs/ffs/ffs_softdep.c
10898
initiate_write_indirdep(struct indirdep *indirdep, struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
10919
indirdep->ir_saveddata = malloc(bp->b_bcount, M_INDIRDEP,
sys/ufs/ffs/ffs_softdep.c
10925
bcopy(bp->b_data, indirdep->ir_saveddata, bp->b_bcount);
sys/ufs/ffs/ffs_softdep.c
10926
bcopy(indirdep->ir_savebp->b_data, bp->b_data,
sys/ufs/ffs/ffs_softdep.c
10927
bp->b_bcount);
sys/ufs/ffs/ffs_softdep.c
10936
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
10952
isclr(cg_inosused((struct cg *)bp->b_data),
sys/ufs/ffs/ffs_softdep.c
10971
jwork_move(&bp->b_dep, wkhd);
sys/ufs/ffs/ffs_softdep.c
10985
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
11016
bmsafemap = bmsafemap_lookup(mp, bp, dtog(fs, blkno), NULL);
sys/ufs/ffs/ffs_softdep.c
11041
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
11069
bmsafemap = bmsafemap_lookup(mp, bp, dtog(fs, blkno), NULL);
sys/ufs/ffs/ffs_softdep.c
11163
struct buf *bp) /* The cg block. */
sys/ufs/ffs/ffs_softdep.c
11184
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
11206
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
11229
softdep_handle_error(struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
11233
ump = softdep_bp_to_mp(bp);
sys/ufs/ffs/ffs_softdep.c
11237
if (ffs_fsfail_cleanup(ump, bp->b_error)) {
sys/ufs/ffs/ffs_softdep.c
11243
bp->b_ioflags &= ~BIO_ERROR;
sys/ufs/ffs/ffs_softdep.c
11244
bp->b_error = 0;
sys/ufs/ffs/ffs_softdep.c
11259
struct buf *bp) /* describes the completed disk write */
sys/ufs/ffs/ffs_softdep.c
11268
ump = softdep_bp_to_mp(bp);
sys/ufs/ffs/ffs_softdep.c
11269
KASSERT(LIST_EMPTY(&bp->b_dep) || ump != NULL,
sys/ufs/ffs/ffs_softdep.c
11271
"with outstanding dependencies for buffer %p", bp));
sys/ufs/ffs/ffs_softdep.c
11274
if ((bp->b_ioflags & BIO_ERROR) != 0)
sys/ufs/ffs/ffs_softdep.c
11275
softdep_handle_error(bp);
sys/ufs/ffs/ffs_softdep.c
11284
if ((bp->b_ioflags & BIO_ERROR) != 0 && (bp->b_flags & B_INVAL) == 0) {
sys/ufs/ffs/ffs_softdep.c
11285
LIST_FOREACH(wk, &bp->b_dep, wk_list) {
sys/ufs/ffs/ffs_softdep.c
11288
handle_written_filepage(WK_PAGEDEP(wk), bp, 0);
sys/ufs/ffs/ffs_softdep.c
11293
bp, 0);
sys/ufs/ffs/ffs_softdep.c
11298
bp, 0);
sys/ufs/ffs/ffs_softdep.c
11303
bp, &sbp, 0);
sys/ufs/ffs/ffs_softdep.c
11321
while ((wk = LIST_FIRST(&bp->b_dep)) != NULL) {
sys/ufs/ffs/ffs_softdep.c
11329
if (handle_written_filepage(WK_PAGEDEP(wk), bp,
sys/ufs/ffs/ffs_softdep.c
11335
if (handle_written_inodeblock(WK_INODEDEP(wk), bp,
sys/ufs/ffs/ffs_softdep.c
11341
if (handle_written_bmsafemap(WK_BMSAFEMAP(wk), bp,
sys/ufs/ffs/ffs_softdep.c
11361
if (handle_written_indirdep(WK_INDIRDEP(wk), bp, &sbp,
sys/ufs/ffs/ffs_softdep.c
11383
handle_written_jseg(WK_JSEG(wk), bp);
sys/ufs/ffs/ffs_softdep.c
11387
if (handle_written_sbdep(WK_SBDEP(wk), bp))
sys/ufs/ffs/ffs_softdep.c
11406
WORKLIST_INSERT(&bp->b_dep, wk);
sys/ufs/ffs/ffs_softdep.c
11669
struct buf *bp, /* buffer containing the inode block */
sys/ufs/ffs/ffs_softdep.c
11688
dp1 = (struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
11693
dp2 = (struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
11728
if ((bp->b_flags & B_DELWRI) == 0)
sys/ufs/ffs/ffs_softdep.c
11730
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
11817
if (hadchanges && (bp->b_flags & B_DELWRI) == 0)
sys/ufs/ffs/ffs_softdep.c
11862
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
11940
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
11957
bcopy(indirdep->ir_saveddata, bp->b_data, bp->b_bcount);
sys/ufs/ffs/ffs_softdep.c
11973
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
12009
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
12055
struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
12068
if (bp->b_xflags & BX_BKGRDMARKER)
sys/ufs/ffs/ffs_softdep.c
12069
initiate_write_bmsafemap(bmsafemap, bp);
sys/ufs/ffs/ffs_softdep.c
12138
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
12159
foreground = (bp->b_xflags & BX_BKGRDMARKER) == 0;
sys/ufs/ffs/ffs_softdep.c
12174
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
12202
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
12229
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
12265
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
12340
struct buf *bp, /* buffer containing the written page */
sys/ufs/ffs/ffs_softdep.c
12383
((char *)bp->b_data + dap->da_offset);
sys/ufs/ffs/ffs_softdep.c
12406
if ((bp->b_flags & B_DELWRI) == 0)
sys/ufs/ffs/ffs_softdep.c
12408
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
12483
struct buf *bp, /* the buffer containing the inode block */
sys/ufs/ffs/ffs_softdep.c
12523
((struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
12527
((struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
12556
WORKLIST_INSERT(&bp->b_dep, &inodedep->id_list);
sys/ufs/ffs/ffs_softdep.c
12666
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
12797
&bp);
sys/ufs/ffs/ffs_softdep.c
12799
error = bwrite(bp);
sys/ufs/ffs/ffs_softdep.c
12801
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
12823
struct buf *bp, *nbp;
sys/ufs/ffs/ffs_softdep.c
12832
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/ufs/ffs/ffs_softdep.c
12836
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL))
sys/ufs/ffs/ffs_softdep.c
12839
if ((bp->b_flags & B_DELWRI) == 0)
sys/ufs/ffs/ffs_softdep.c
12845
if ((wk = LIST_FIRST(&bp->b_dep)) == NULL ||
sys/ufs/ffs/ffs_softdep.c
12847
(bp->b_vflags & BV_BKGRDINPROG)) {
sys/ufs/ffs/ffs_softdep.c
12848
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
12852
bremfree(bp);
sys/ufs/ffs/ffs_softdep.c
12853
(void) bawrite(bp);
sys/ufs/ffs/ffs_softdep.c
12872
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
12895
bp = getdirtybuf(bmsafemap->sm_buf, LOCK_PTR(ump), waitfor);
sys/ufs/ffs/ffs_softdep.c
12896
if (bp == NULL && waitfor == MNT_WAIT)
sys/ufs/ffs/ffs_softdep.c
12900
if (bp == NULL)
sys/ufs/ffs/ffs_softdep.c
12904
bawrite(bp);
sys/ufs/ffs/ffs_softdep.c
12906
error = bwrite(bp);
sys/ufs/ffs/ffs_softdep.c
12961
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
12980
if (waitfor == MNT_NOWAIT && softdep_count_dependencies(bp, 0))
sys/ufs/ffs/ffs_softdep.c
12992
LIST_FOREACH(wk, &bp->b_dep, wk_list) {
sys/ufs/ffs/ffs_softdep.c
13063
BUF_AREC(bp);
sys/ufs/ffs/ffs_softdep.c
13076
&pagedep->pd_diraddhd[i], bp);
sys/ufs/ffs/ffs_softdep.c
13079
BUF_NOREC(bp);
sys/ufs/ffs/ffs_softdep.c
13083
BUF_NOREC(bp);
sys/ufs/ffs/ffs_softdep.c
13180
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
13194
bp = newblk->nb_bmsafemap->sm_buf;
sys/ufs/ffs/ffs_softdep.c
13195
bp = getdirtybuf(bp, LOCK_PTR(ump), waitfor);
sys/ufs/ffs/ffs_softdep.c
13196
if (bp == NULL) {
sys/ufs/ffs/ffs_softdep.c
13203
bawrite(bp);
sys/ufs/ffs/ffs_softdep.c
13205
*errorp = bwrite(bp);
sys/ufs/ffs/ffs_softdep.c
13225
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
13260
bp = newblk->nb_bmsafemap->sm_buf;
sys/ufs/ffs/ffs_softdep.c
13261
bp = getdirtybuf(bp, LOCK_PTR(ump), MNT_WAIT);
sys/ufs/ffs/ffs_softdep.c
13262
if (bp == NULL)
sys/ufs/ffs/ffs_softdep.c
13265
error = bwrite(bp);
sys/ufs/ffs/ffs_softdep.c
13276
bp = gbincore(bo, lbn);
sys/ufs/ffs/ffs_softdep.c
13277
if (bp != NULL) {
sys/ufs/ffs/ffs_softdep.c
13278
error = BUF_LOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL |
sys/ufs/ffs/ffs_softdep.c
13287
if (bp->b_flags & B_DELWRI) {
sys/ufs/ffs/ffs_softdep.c
13288
bremfree(bp);
sys/ufs/ffs/ffs_softdep.c
13289
error = bwrite(bp);
sys/ufs/ffs/ffs_softdep.c
13293
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
13325
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
13431
bp = inodedep->id_bmsafemap->sm_buf;
sys/ufs/ffs/ffs_softdep.c
13432
bp = getdirtybuf(bp, LOCK_PTR(ump), MNT_WAIT);
sys/ufs/ffs/ffs_softdep.c
13433
if (bp == NULL)
sys/ufs/ffs/ffs_softdep.c
13436
if ((error = bwrite(bp)) != 0)
sys/ufs/ffs/ffs_softdep.c
1345
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
1363
bp->b_vflags &= ~BV_SCANNED;
sys/ufs/ffs/ffs_softdep.c
1364
BUF_NOREC(bp);
sys/ufs/ffs/ffs_softdep.c
1365
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
137
struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
1396
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
1417
if (bp != NULL && bplocked)
sys/ufs/ffs/ffs_softdep.c
1418
get_parent_vp_unlock_bp(mp, bp,
sys/ufs/ffs/ffs_softdep.c
14206
softdep_buf_append(struct buf *bp, struct workhead *wkhd)
sys/ufs/ffs/ffs_softdep.c
14219
WORKLIST_INSERT(&bp->b_dep, wk);
sys/ufs/ffs/ffs_softdep.c
14231
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
14241
(int)fs->fs_bsize, cred, &bp);
sys/ufs/ffs/ffs_softdep.c
14243
bqrelse(bp);
sys/ufs/ffs/ffs_softdep.c
14247
softdep_buf_append(bp, wkhd);
sys/ufs/ffs/ffs_softdep.c
14248
bqrelse(bp);
sys/ufs/ffs/ffs_softdep.c
14268
softdep_bp_to_mp(struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
1427
if (bp != NULL && bplocked) {
sys/ufs/ffs/ffs_softdep.c
14273
if (LIST_EMPTY(&bp->b_dep))
sys/ufs/ffs/ffs_softdep.c
14275
vp = bp->b_vp;
sys/ufs/ffs/ffs_softdep.c
1428
get_parent_vp_unlock_bp(mp, bp, diraddhdp, unfinishedp);
sys/ufs/ffs/ffs_softdep.c
14324
softdep_count_dependencies(struct buf *bp, int wantcount)
sys/ufs/ffs/ffs_softdep.c
14341
ump = softdep_bp_to_mp(bp);
sys/ufs/ffs/ffs_softdep.c
14346
LIST_FOREACH(wk, &bp->b_dep, wk_list) {
sys/ufs/ffs/ffs_softdep.c
144
softdep_setup_inomapdep(struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
14486
getdirtybuf(struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
14492
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0) {
sys/ufs/ffs/ffs_softdep.c
14495
error = BUF_LOCK(bp,
sys/ufs/ffs/ffs_softdep.c
14502
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
14508
if ((bp->b_vflags & BV_BKGRDINPROG) != 0) {
sys/ufs/ffs/ffs_softdep.c
14509
if (lock != BO_LOCKPTR(bp->b_bufobj) && waitfor == MNT_WAIT) {
sys/ufs/ffs/ffs_softdep.c
14511
BO_LOCK(bp->b_bufobj);
sys/ufs/ffs/ffs_softdep.c
14512
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
14513
if ((bp->b_vflags & BV_BKGRDINPROG) != 0) {
sys/ufs/ffs/ffs_softdep.c
14514
bp->b_vflags |= BV_BKGRDWAIT;
sys/ufs/ffs/ffs_softdep.c
14515
msleep(&bp->b_xflags, BO_LOCKPTR(bp->b_bufobj),
sys/ufs/ffs/ffs_softdep.c
14518
BO_UNLOCK(bp->b_bufobj);
sys/ufs/ffs/ffs_softdep.c
14522
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
14525
if (bp->b_vp->v_type != VCHR)
sys/ufs/ffs/ffs_softdep.c
14526
ASSERT_BO_WLOCKED(bp->b_bufobj);
sys/ufs/ffs/ffs_softdep.c
14527
bp->b_vflags |= BV_BKGRDWAIT;
sys/ufs/ffs/ffs_softdep.c
14528
rw_sleep(&bp->b_xflags, lock, PRIBIO, "getbuf", 0);
sys/ufs/ffs/ffs_softdep.c
14531
if ((bp->b_flags & B_DELWRI) == 0) {
sys/ufs/ffs/ffs_softdep.c
14532
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
14535
bremfree(bp);
sys/ufs/ffs/ffs_softdep.c
14536
return (bp);
sys/ufs/ffs/ffs_softdep.c
14553
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
14662
bp = indirdep->ir_savebp;
sys/ufs/ffs/ffs_softdep.c
14666
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
14739
softdep_deallocate_dependencies(struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
1474
if (bp != NULL) {
sys/ufs/ffs/ffs_softdep.c
14742
if ((bp->b_ioflags & BIO_ERROR) == 0)
sys/ufs/ffs/ffs_softdep.c
14744
if (bp->b_vp != NULL && bp->b_vp->v_mount != NULL)
sys/ufs/ffs/ffs_softdep.c
14745
softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error);
sys/ufs/ffs/ffs_softdep.c
14748
"got error %d while accessing filesystem\n", bp->b_error);
sys/ufs/ffs/ffs_softdep.c
14749
if (bp->b_error != ENXIO)
sys/ufs/ffs/ffs_softdep.c
154
softdep_setup_blkmapdep(struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
1571
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
1576
bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO);
sys/ufs/ffs/ffs_softdep.c
1577
bp->b_iocmd = BIO_SPEEDUP;
sys/ufs/ffs/ffs_softdep.c
1578
bp->b_ioflags = flags;
sys/ufs/ffs/ffs_softdep.c
1579
bp->b_bcount = omin(shortage, LONG_MAX);
sys/ufs/ffs/ffs_softdep.c
1580
g_vfs_strategy(ump->um_bo, bp);
sys/ufs/ffs/ffs_softdep.c
1581
bufwait(bp);
sys/ufs/ffs/ffs_softdep.c
1582
free(bp, M_TRIM);
sys/ufs/ffs/ffs_softdep.c
171
struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
184
struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
193
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
206
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
2228
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
2243
if (bp) {
sys/ufs/ffs/ffs_softdep.c
2244
LIST_FOREACH(wk, &bp->b_dep, wk_list) {
sys/ufs/ffs/ffs_softdep.c
2254
if (((*pagedeppp)->pd_state & ONWORKLIST) == 0 && bp)
sys/ufs/ffs/ffs_softdep.c
2255
WORKLIST_INSERT(&bp->b_dep, &(*pagedeppp)->pd_list);
sys/ufs/ffs/ffs_softdep.c
2281
WORKLIST_INSERT(&bp->b_dep, &pagedep->pd_list);
sys/ufs/ffs/ffs_softdep.c
250
softdep_setup_directory_add(struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
2584
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
262
softdep_change_directoryentry_offset(struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
2675
fs->fs_cgsize, cred, &bp)) != 0) {
sys/ufs/ffs/ffs_softdep.c
2676
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
2680
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
2686
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
274
softdep_setup_remove(struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
284
softdep_setup_directory_change(struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
296
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
308
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
3549
softdep_synchronize_completed(struct bio *bp)
sys/ufs/ffs/ffs_softdep.c
3559
jseg = bp->bio_caller1;
sys/ufs/ffs/ffs_softdep.c
3561
g_destroy_bio(bp);
sys/ufs/ffs/ffs_softdep.c
3584
g_destroy_bio(bp);
sys/ufs/ffs/ffs_softdep.c
3594
softdep_synchronize(struct bio *bp,
sys/ufs/ffs/ffs_softdep.c
3599
bp->bio_cmd = BIO_FLUSH;
sys/ufs/ffs/ffs_softdep.c
3600
bp->bio_flags |= BIO_ORDERED;
sys/ufs/ffs/ffs_softdep.c
3601
bp->bio_data = NULL;
sys/ufs/ffs/ffs_softdep.c
3602
bp->bio_offset = ump->um_cp->provider->mediasize;
sys/ufs/ffs/ffs_softdep.c
3603
bp->bio_length = 0;
sys/ufs/ffs/ffs_softdep.c
3604
bp->bio_done = softdep_synchronize_completed;
sys/ufs/ffs/ffs_softdep.c
3605
bp->bio_caller1 = caller1;
sys/ufs/ffs/ffs_softdep.c
3606
g_io_request(bp, ump->um_cp);
sys/ufs/ffs/ffs_softdep.c
3621
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
3696
bp = geteblk(fs->fs_bsize, 0);
sys/ufs/ffs/ffs_softdep.c
3707
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_softdep.c
3710
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
3729
bp->b_blkno = jblocks_alloc(jblocks, size, &size);
sys/ufs/ffs/ffs_softdep.c
3730
bp->b_lblkno = bp->b_blkno;
sys/ufs/ffs/ffs_softdep.c
3731
bp->b_offset = bp->b_blkno * DEV_BSIZE;
sys/ufs/ffs/ffs_softdep.c
3732
bp->b_bcount = size;
sys/ufs/ffs/ffs_softdep.c
3733
bp->b_flags &= ~B_INVAL;
sys/ufs/ffs/ffs_softdep.c
3734
bp->b_flags |= B_VALIDSUSPWRT | B_NOCOPY;
sys/ufs/ffs/ffs_softdep.c
3740
jseg->js_buf = bp;
sys/ufs/ffs/ffs_softdep.c
3754
data = bp->b_data;
sys/ufs/ffs/ffs_softdep.c
3764
data = bp->b_data + off;
sys/ufs/ffs/ffs_softdep.c
3782
data = bp->b_data + off;
sys/ufs/ffs/ffs_softdep.c
3820
data = bp->b_data + off;
sys/ufs/ffs/ffs_softdep.c
3833
WORKLIST_INSERT(&bp->b_dep, &jseg->js_list);
sys/ufs/ffs/ffs_softdep.c
3835
bp->b_xflags |= BX_CVTENXIO;
sys/ufs/ffs/ffs_softdep.c
3836
pbgetvp(ump->um_devvp, bp);
sys/ufs/ffs/ffs_softdep.c
3842
bwrite(bp);
sys/ufs/ffs/ffs_softdep.c
3844
bawrite(bp);
sys/ufs/ffs/ffs_softdep.c
3975
handle_written_jseg(struct jseg *jseg, struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
3985
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_softdep.c
3986
pbrelvp(bp);
sys/ufs/ffs/ffs_softdep.c
417
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
456
softdep_sync_buf(struct vnode *vp, struct buf *bp, int waitfor)
sys/ufs/ffs/ffs_softdep.c
5230
struct buf *bp, /* buffer for cylgroup block with inode map */
sys/ufs/ffs/ffs_softdep.c
5280
bmsafemap = bmsafemap_lookup(mp, bp, ino_to_cg(fs, newinum), bmsafemap);
sys/ufs/ffs/ffs_softdep.c
5300
struct buf *bp, /* buffer for cylgroup block with block map */
sys/ufs/ffs/ffs_softdep.c
532
softdep_buf_append(struct buf *bp, struct workhead *wkhd)
sys/ufs/ffs/ffs_softdep.c
5337
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
5361
newblk->nb_bmsafemap = bmsafemap = bmsafemap_lookup(mp, bp,
sys/ufs/ffs/ffs_softdep.c
5408
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
5419
KASSERT(bp != NULL, ("bmsafemap_lookup: missing buffer"));
sys/ufs/ffs/ffs_softdep.c
5420
LIST_FOREACH(wk, &bp->b_dep, wk_list) {
sys/ufs/ffs/ffs_softdep.c
5442
bmsafemap->sm_buf = bp;
sys/ufs/ffs/ffs_softdep.c
5458
WORKLIST_INSERT(&bp->b_dep, &bmsafemap->sm_list);
sys/ufs/ffs/ffs_softdep.c
5499
struct buf *bp) /* bp for allocated block */
sys/ufs/ffs/ffs_softdep.c
5511
lbn = bp->b_lblkno;
sys/ufs/ffs/ffs_softdep.c
5531
(bp->b_flags & B_DELWRI) != 0 ? NOTRIM_KEY : SINGLETON_KEY);
sys/ufs/ffs/ffs_softdep.c
5559
pagedep_lookup(mp, bp, ip->i_number, off, DEPALLOC,
sys/ufs/ffs/ffs_softdep.c
5591
WORKLIST_INSERT(&bp->b_dep, &newblk->nb_list);
sys/ufs/ffs/ffs_softdep.c
5895
struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
5914
lbn = bp->b_lblkno;
sys/ufs/ffs/ffs_softdep.c
5931
(bp->b_flags & B_DELWRI) != 0 ? NOTRIM_KEY : SINGLETON_KEY);
sys/ufs/ffs/ffs_softdep.c
5966
WORKLIST_INSERT(&bp->b_dep, &newblk->nb_list);
sys/ufs/ffs/ffs_softdep.c
6078
struct buf *bp, /* buffer with indirect blk referencing page */
sys/ufs/ffs/ffs_softdep.c
6097
lbn, bp->b_lblkno));
sys/ufs/ffs/ffs_softdep.c
6112
freefrag = setup_allocindir_phase2(bp, ip, inodedep, aip, lbn);
sys/ufs/ffs/ffs_softdep.c
6126
struct buf *bp, /* indirect block referencing allocated block */
sys/ufs/ffs/ffs_softdep.c
6146
if (setup_allocindir_phase2(bp, ip, inodedep, aip, lbn))
sys/ufs/ffs/ffs_softdep.c
6175
struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
6190
LIST_FOREACH(wk, &bp->b_dep, wk_list) {
sys/ufs/ffs/ffs_softdep.c
6218
if (bp->b_blkno == bp->b_lblkno) {
sys/ufs/ffs/ffs_softdep.c
6219
ufs_bmaparray(bp->b_vp, bp->b_lblkno, &blkno, bp,
sys/ufs/ffs/ffs_softdep.c
6221
bp->b_blkno = blkno;
sys/ufs/ffs/ffs_softdep.c
6225
getblk(ump->um_devvp, bp->b_blkno, bp->b_bcount, 0, 0, 0);
sys/ufs/ffs/ffs_softdep.c
6226
newindirdep->ir_bp = bp;
sys/ufs/ffs/ffs_softdep.c
6228
bcopy(bp->b_data, newindirdep->ir_savebp->b_data, bp->b_bcount);
sys/ufs/ffs/ffs_softdep.c
6232
WORKLIST_INSERT(&bp->b_dep, &indirdep->ir_list);
sys/ufs/ffs/ffs_softdep.c
6239
if (newblk_lookup(mp, dbtofsb(fs, bp->b_blkno), 0, &newblk))
sys/ufs/ffs/ffs_softdep.c
6252
struct buf *bp, /* in-memory copy of the indirect block */
sys/ufs/ffs/ffs_softdep.c
6269
if (bp->b_lblkno >= 0)
sys/ufs/ffs/ffs_softdep.c
6273
indirdep = indirdep_lookup(mp, ip, bp);
sys/ufs/ffs/ffs_softdep.c
6436
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
6446
cancel_allocindir(aip, bp, freeblks, 1);
sys/ufs/ffs/ffs_softdep.c
6449
cancel_allocindir(aip, bp, freeblks, 1);
sys/ufs/ffs/ffs_softdep.c
6481
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
6500
(int)mp->mnt_stat.f_iosize, NULL, NULL, 0, NOCRED, 0, NULL, &bp);
sys/ufs/ffs/ffs_softdep.c
6519
indirdep = indirdep_lookup(mp, ip, bp);
sys/ufs/ffs/ffs_softdep.c
6530
if (newblk_lookup(mp, dbtofsb(ump->um_fs, bp->b_blkno), 0,
sys/ufs/ffs/ffs_softdep.c
6534
trunc_indirdep(indirn, freeblks, bp, off);
sys/ufs/ffs/ffs_softdep.c
6536
trunc_indirdep(indirdep, freeblks, bp, off);
sys/ufs/ffs/ffs_softdep.c
6544
indirdep->ir_saveddata = malloc(bp->b_bcount, M_INDIRDEP,
sys/ufs/ffs/ffs_softdep.c
6549
blkno = ((ufs1_daddr_t *)bp->b_data)[off];
sys/ufs/ffs/ffs_softdep.c
6550
start = (uint8_t *)&((ufs1_daddr_t *)bp->b_data)[off+1];
sys/ufs/ffs/ffs_softdep.c
6552
blkno = ((ufs2_daddr_t *)bp->b_data)[off];
sys/ufs/ffs/ffs_softdep.c
6553
start = (uint8_t *)&((ufs2_daddr_t *)bp->b_data)[off+1];
sys/ufs/ffs/ffs_softdep.c
6557
end = bp->b_data + bp->b_bcount;
sys/ufs/ffs/ffs_softdep.c
6559
bdwrite(bp);
sys/ufs/ffs/ffs_softdep.c
6561
bqrelse(bp);
sys/ufs/ffs/ffs_softdep.c
6580
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
6588
bp = indirdep->ir_bp;
sys/ufs/ffs/ffs_softdep.c
6590
if (bp == NULL)
sys/ufs/ffs/ffs_softdep.c
6593
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) == 0)
sys/ufs/ffs/ffs_softdep.c
6595
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK,
sys/ufs/ffs/ffs_softdep.c
6597
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
6630
if (bp == NULL)
sys/ufs/ffs/ffs_softdep.c
6643
if (bp == NULL) {
sys/ufs/ffs/ffs_softdep.c
6651
bp = indirdep->ir_savebp;
sys/ufs/ffs/ffs_softdep.c
6655
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
6660
WORKLIST_INSERT(&bp->b_dep, &freework->fw_list);
sys/ufs/ffs/ffs_softdep.c
6661
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_softdep.c
6758
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
6903
NULL, NULL, 0, cred, 0, NULL, &bp);
sys/ufs/ffs/ffs_softdep.c
6908
if (bp->b_bufsize == fs->fs_bsize)
sys/ufs/ffs/ffs_softdep.c
6909
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_softdep.c
6910
softdep_update_inodeblock(ip, bp, 0);
sys/ufs/ffs/ffs_softdep.c
6912
*((struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
6916
*((struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
6931
WORKLIST_INSERT(&bp->b_dep, &freeblks->fb_list);
sys/ufs/ffs/ffs_softdep.c
6972
bdwrite(bp);
sys/ufs/ffs/ffs_softdep.c
6985
error = UFS_BALLOC(vp, length - 1, 1, cred, BA_CLRBUF, &bp);
sys/ufs/ffs/ffs_softdep.c
6993
allocbuf(bp, frags);
sys/ufs/ffs/ffs_softdep.c
6995
bawrite(bp);
sys/ufs/ffs/ffs_softdep.c
7003
error = bread(vp, lastlbn, size, cred, &bp);
sys/ufs/ffs/ffs_softdep.c
7005
bzero((char *)bp->b_data + lastoff, size - lastoff);
sys/ufs/ffs/ffs_softdep.c
7006
bawrite(bp);
sys/ufs/ffs/ffs_softdep.c
7101
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
7119
(int)fs->fs_bsize, NOCRED, &bp)) != 0) {
sys/ufs/ffs/ffs_softdep.c
7164
dp1 = ((struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
7169
dp2 = ((struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
7191
WORKLIST_INSERT(&bp->b_dep, &freeblks->fb_list);
sys/ufs/ffs/ffs_softdep.c
7218
bdwrite(bp);
sys/ufs/ffs/ffs_softdep.c
7293
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
7303
if (((flags & IO_EXT) == 0 && (bp->b_xflags & BX_ALTDATA)) ||
sys/ufs/ffs/ffs_softdep.c
7304
((flags & IO_NORMAL) == 0 && (bp->b_xflags & BX_ALTDATA) == 0))
sys/ufs/ffs/ffs_softdep.c
7307
if ((bp->b_xflags & BX_ALTDATA) != 0)
sys/ufs/ffs/ffs_softdep.c
7317
lbn = bp->b_lblkno;
sys/ufs/ffs/ffs_softdep.c
7344
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
7357
TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs)
sys/ufs/ffs/ffs_softdep.c
7358
bp->b_vflags &= ~BV_SCANNED;
sys/ufs/ffs/ffs_softdep.c
7360
TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) {
sys/ufs/ffs/ffs_softdep.c
7361
if (bp->b_vflags & BV_SCANNED)
sys/ufs/ffs/ffs_softdep.c
7363
if (!trunc_check_buf(bp, &blkoff, lastlbn, lastoff, flags)) {
sys/ufs/ffs/ffs_softdep.c
7364
bp->b_vflags |= BV_SCANNED;
sys/ufs/ffs/ffs_softdep.c
7367
KASSERT(bp->b_bufobj == bo, ("Wrong object in buffer"));
sys/ufs/ffs/ffs_softdep.c
7368
if ((bp = getdirtybuf(bp, BO_LOCKPTR(bo), MNT_WAIT)) == NULL)
sys/ufs/ffs/ffs_softdep.c
7371
if (deallocate_dependencies(bp, freeblks, blkoff))
sys/ufs/ffs/ffs_softdep.c
7372
bqrelse(bp);
sys/ufs/ffs/ffs_softdep.c
7374
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
7381
TAILQ_FOREACH(bp, &bo->bo_clean.bv_hd, b_bobufs)
sys/ufs/ffs/ffs_softdep.c
7382
bp->b_vflags &= ~BV_SCANNED;
sys/ufs/ffs/ffs_softdep.c
7384
TAILQ_FOREACH(bp, &bo->bo_clean.bv_hd, b_bobufs) {
sys/ufs/ffs/ffs_softdep.c
7385
if (bp->b_vflags & BV_SCANNED)
sys/ufs/ffs/ffs_softdep.c
7387
if (!trunc_check_buf(bp, &blkoff, lastlbn, lastoff, flags)) {
sys/ufs/ffs/ffs_softdep.c
7388
bp->b_vflags |= BV_SCANNED;
sys/ufs/ffs/ffs_softdep.c
7391
if (BUF_LOCK(bp,
sys/ufs/ffs/ffs_softdep.c
7398
bp->b_vflags |= BV_SCANNED;
sys/ufs/ffs/ffs_softdep.c
7400
bremfree(bp);
sys/ufs/ffs/ffs_softdep.c
7402
allocbuf(bp, blkoff);
sys/ufs/ffs/ffs_softdep.c
7403
bqrelse(bp);
sys/ufs/ffs/ffs_softdep.c
7405
bp->b_flags |= B_INVAL | B_NOCACHE | B_RELBUF;
sys/ufs/ffs/ffs_softdep.c
7406
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
7499
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
7508
ump = softdep_bp_to_mp(bp);
sys/ufs/ffs/ffs_softdep.c
7512
LIST_FOREACH_SAFE(wk, &bp->b_dep, wk_list, wkn) {
sys/ufs/ffs/ffs_softdep.c
7516
if (bp->b_lblkno >= 0 ||
sys/ufs/ffs/ffs_softdep.c
7517
bp->b_blkno != indirdep->ir_savebp->b_lblkno)
sys/ufs/ffs/ffs_softdep.c
7519
cancel_indirdep(indirdep, bp, freeblks);
sys/ufs/ffs/ffs_softdep.c
7567
allocbuf(bp, off);
sys/ufs/ffs/ffs_softdep.c
7568
bp->b_vflags |= BV_SCANNED;
sys/ufs/ffs/ffs_softdep.c
7571
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_softdep.c
786
static void cancel_allocindir(struct allocindir *, struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
8312
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
8347
bp = indirdep->ir_savebp;
sys/ufs/ffs/ffs_softdep.c
8348
if (bp == NULL || bp->b_blkno != dbn)
sys/ufs/ffs/ffs_softdep.c
8350
bp, (intmax_t)dbn);
sys/ufs/ffs/ffs_softdep.c
8351
} else if ((bp = incore(&freeblks->fb_devvp->v_bufobj, dbn)) != NULL) {
sys/ufs/ffs/ffs_softdep.c
8356
indirdep = WK_INDIRDEP(LIST_FIRST(&bp->b_dep));
sys/ufs/ffs/ffs_softdep.c
8359
indirdep, bp);
sys/ufs/ffs/ffs_softdep.c
8362
(int)fs->fs_bsize, NULL, NULL, 0, NOCRED, 0, NULL, &bp);
sys/ufs/ffs/ffs_softdep.c
8391
KASSERT(indirdep->ir_savebp == bp,
sys/ufs/ffs/ffs_softdep.c
8401
bap1 = (ufs1_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
8406
bap2 = (ufs2_daddr_t *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
8471
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_softdep.c
8472
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
8523
struct buf *bp,
sys/ufs/ffs/ffs_softdep.c
8537
if (bp && (trunc || newblk->nb_jnewblk)) {
sys/ufs/ffs/ffs_softdep.c
8545
((ufs1_daddr_t *)bp->b_data)[aip->ai_offset] = 0;
sys/ufs/ffs/ffs_softdep.c
8547
((ufs2_daddr_t *)bp->b_data)[aip->ai_offset] = 0;
sys/ufs/ffs/ffs_softdep.c
862
static int pagedep_lookup(struct mount *, struct buf *bp, ino_t, ufs_lbn_t,
sys/ufs/ffs/ffs_softdep.c
8702
struct buf *bp, /* buffer containing directory block */
sys/ufs/ffs/ffs_softdep.c
871
static struct ufsmount *softdep_bp_to_mp(struct buf *bp);
sys/ufs/ffs/ffs_softdep.c
8747
isindir = bp->b_lblkno >= UFS_NDADDR;
sys/ufs/ffs/ffs_softdep.c
8772
pagedep_lookup(mp, bp, dp->i_number, lbn, DEPALLOC, &pagedep);
sys/ufs/ffs/ffs_softdep.c
8849
if (newblk_lookup(mp, dbtofsb(fs, bp->b_blkno), 0, &newblk)
sys/ufs/ffs/ffs_softdep.c
8877
struct buf *bp, /* Buffer holding directory block. */
sys/ufs/ffs/ffs_softdep.c
8918
if (pagedep_lookup(mp, bp, dp->i_number, lbn, flags, &pagedep) == 0)
sys/ufs/ffs/ffs_softdep.c
9169
struct buf *bp, /* buffer containing directory block */
sys/ufs/ffs/ffs_softdep.c
9187
dirrem = newdirrem(bp, dp, ip, isrmdir, &prevdirrem);
sys/ufs/ffs/ffs_softdep.c
931
static int softdep_count_dependencies(struct buf *bp, int);
sys/ufs/ffs/ffs_softdep.c
9361
struct buf *bp, /* buffer containing directory block */
sys/ufs/ffs/ffs_softdep.c
9430
pagedep_lookup(UFSTOVFS(ump), bp, dp->i_number, lbn, DEPALLOC,
sys/ufs/ffs/ffs_softdep.c
9524
struct buf *bp, /* buffer containing directory block */
sys/ufs/ffs/ffs_softdep.c
953
#define BUF_AREC(bp) lockallowrecurse(&(bp)->b_lock)
sys/ufs/ffs/ffs_softdep.c
954
#define BUF_NOREC(bp) lockdisablerecurse(&(bp)->b_lock)
sys/ufs/ffs/ffs_softdep.c
9561
dirrem = newdirrem(bp, dp, ip, newparent != 0, &prevdirrem);
sys/ufs/ffs/ffs_softdep.c
9700
struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
9707
LIST_FOREACH(wk, &bp->b_dep, wk_list)
sys/ufs/ffs/ffs_softdep.c
9717
WORKLIST_INSERT(&bp->b_dep, &sbdep->sb_list);
sys/ufs/ffs/ffs_softdep.c
9776
handle_written_sbdep(struct sbdep *sbdep, struct buf *bp)
sys/ufs/ffs/ffs_softdep.c
9789
bdirty(bp);
sys/ufs/ffs/ffs_softdep.c
9843
struct buf *bp;
sys/ufs/ffs/ffs_softdep.c
9895
bp = getblk(ump->um_devvp, btodb(fs->fs_sblockloc),
sys/ufs/ffs/ffs_softdep.c
9901
&bp);
sys/ufs/ffs/ffs_softdep.c
9914
brelse(bp);
sys/ufs/ffs/ffs_softdep.c
9938
bcopy((caddr_t)fs, bp->b_data, (uint64_t)fs->fs_sbsize);
sys/ufs/ffs/ffs_softdep.c
9939
bpfs = (struct fs *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
9941
softdep_setup_sbupdate(ump, bpfs, bp);
sys/ufs/ffs/ffs_softdep.c
9948
((struct ufs1_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
9951
dip = (struct ufs2_dinode *)bp->b_data +
sys/ufs/ffs/ffs_softdep.c
9960
bwrite(bp);
sys/ufs/ffs/ffs_softdep.c
9968
bp = getblk(ump->um_devvp, btodb(fs->fs_sblockloc),
sys/ufs/ffs/ffs_softdep.c
9970
bcopy((caddr_t)fs, bp->b_data, (uint64_t)fs->fs_sbsize);
sys/ufs/ffs/ffs_softdep.c
9971
bpfs = (struct fs *)bp->b_data;
sys/ufs/ffs/ffs_softdep.c
9973
softdep_setup_sbupdate(ump, bpfs, bp);
sys/ufs/ffs/ffs_softdep.c
9979
bwrite(bp);
sys/ufs/ffs/ffs_suspend.c
138
NOCRED, &bp);
sys/ufs/ffs/ffs_suspend.c
143
error = copyin(base, bp->b_data, len);
sys/ufs/ffs/ffs_suspend.c
145
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_suspend.c
146
brelse(bp);
sys/ufs/ffs/ffs_suspend.c
149
error = bwrite(bp);
sys/ufs/ffs/ffs_suspend.c
154
error = copyout(bp->b_data, base, len);
sys/ufs/ffs/ffs_suspend.c
155
brelse(bp);
sys/ufs/ffs/ffs_suspend.c
96
struct buf *bp;
sys/ufs/ffs/ffs_vfsops.c
1208
struct buf *bp;
sys/ufs/ffs/ffs_vfsops.c
1214
&bp)) != 0)
sys/ufs/ffs/ffs_vfsops.c
1216
bcopy(bp->b_data, *bufp, size);
sys/ufs/ffs/ffs_vfsops.c
1217
bp->b_flags |= B_INVAL | B_NOCACHE;
sys/ufs/ffs/ffs_vfsops.c
1218
brelse(bp);
sys/ufs/ffs/ffs_vfsops.c
163
struct buf *bp;
sys/ufs/ffs/ffs_vfsops.c
1700
struct buf *bp;
sys/ufs/ffs/ffs_vfsops.c
173
error = bread(vp, lbn, bsize, NOCRED, &bp);
sys/ufs/ffs/ffs_vfsops.c
178
*res = (char *)bp->b_data + blkoff(fs, offset);
sys/ufs/ffs/ffs_vfsops.c
179
*bpp = bp;
sys/ufs/ffs/ffs_vfsops.c
1812
(int)fs->fs_bsize, NULL, NULL, 0, NOCRED, 0, NULL, &bp);
sys/ufs/ffs/ffs_vfsops.c
1825
if ((error = ffs_load_inode(bp, ip, fs, ino)) != 0) {
sys/ufs/ffs/ffs_vfsops.c
1826
bqrelse(bp);
sys/ufs/ffs/ffs_vfsops.c
1832
bqrelse(bp);
sys/ufs/ffs/ffs_vfsops.c
188
ffs_load_inode(struct buf *bp, struct inode *ip, struct fs *fs, ino_t ino)
sys/ufs/ffs/ffs_vfsops.c
1935
struct buf *bp;
sys/ufs/ffs/ffs_vfsops.c
1951
if (ffs_getcg(fs, ump->um_devvp, cg, 0, &bp, &cgp) != 0)
sys/ufs/ffs/ffs_vfsops.c
1954
brelse(bp);
sys/ufs/ffs/ffs_vfsops.c
1957
brelse(bp);
sys/ufs/ffs/ffs_vfsops.c
197
*((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ino));
sys/ufs/ffs/ffs_vfsops.c
2060
struct buf *bp;
sys/ufs/ffs/ffs_vfsops.c
2066
bp = devfdp->sbbp;
sys/ufs/ffs/ffs_vfsops.c
2067
fs = (struct fs *)bp->b_data;
sys/ufs/ffs/ffs_vfsops.c
2072
bp = getblk(ump->um_devvp, btodb(loc), size, 0, 0, 0);
sys/ufs/ffs/ffs_vfsops.c
2073
bcopy(buf, bp->b_data, (uint64_t)size);
sys/ufs/ffs/ffs_vfsops.c
2075
bp->b_flags |= B_VALIDSUSPWRT;
sys/ufs/ffs/ffs_vfsops.c
2077
bawrite(bp);
sys/ufs/ffs/ffs_vfsops.c
2078
else if ((error = bwrite(bp)) != 0)
sys/ufs/ffs/ffs_vfsops.c
2093
brelse(bp);
sys/ufs/ffs/ffs_vfsops.c
2097
softdep_setup_sbupdate(ump, fs, bp);
sys/ufs/ffs/ffs_vfsops.c
2099
bp->b_flags |= B_VALIDSUSPWRT;
sys/ufs/ffs/ffs_vfsops.c
2101
bawrite(bp);
sys/ufs/ffs/ffs_vfsops.c
2102
else if ((error = bwrite(bp)) != 0)
sys/ufs/ffs/ffs_vfsops.c
211
dip2 = ((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ino));
sys/ufs/ffs/ffs_vfsops.c
2140
ffs_backgroundwritedone(struct buf *bp)
sys/ufs/ffs/ffs_vfsops.c
2146
if (!LIST_EMPTY(&bp->b_dep) && (bp->b_ioflags & BIO_ERROR) != 0)
sys/ufs/ffs/ffs_vfsops.c
2147
softdep_handle_error(bp);
sys/ufs/ffs/ffs_vfsops.c
2153
bufobj = bp->b_bufobj;
sys/ufs/ffs/ffs_vfsops.c
2155
if ((origbp = gbincore(bp->b_bufobj, bp->b_lblkno)) == NULL)
sys/ufs/ffs/ffs_vfsops.c
2162
if ((bp->b_ioflags & BIO_ERROR) != 0)
sys/ufs/ffs/ffs_vfsops.c
2168
if (!LIST_EMPTY(&bp->b_dep) && (bp->b_ioflags & BIO_ERROR) == 0)
sys/ufs/ffs/ffs_vfsops.c
2169
buf_complete(bp);
sys/ufs/ffs/ffs_vfsops.c
2171
if (!LIST_EMPTY(&bp->b_dep))
sys/ufs/ffs/ffs_vfsops.c
2172
softdep_move_dependencies(bp, origbp);
sys/ufs/ffs/ffs_vfsops.c
2178
bp->b_flags |= B_NOCACHE;
sys/ufs/ffs/ffs_vfsops.c
2179
bp->b_flags &= ~(B_CACHE | B_IOSTARTED);
sys/ufs/ffs/ffs_vfsops.c
2180
pbrelvp(bp);
sys/ufs/ffs/ffs_vfsops.c
2188
if ((bp->b_ioflags & BIO_ERROR) != 0)
sys/ufs/ffs/ffs_vfsops.c
2189
bp->b_flags |= B_INVAL;
sys/ufs/ffs/ffs_vfsops.c
2190
bufdone(bp);
sys/ufs/ffs/ffs_vfsops.c
2220
ffs_bufwrite(struct buf *bp)
sys/ufs/ffs/ffs_vfsops.c
2225
CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
sys/ufs/ffs/ffs_vfsops.c
2226
if (bp->b_flags & B_INVAL) {
sys/ufs/ffs/ffs_vfsops.c
2227
brelse(bp);
sys/ufs/ffs/ffs_vfsops.c
2231
if (!BUF_ISLOCKED(bp))
sys/ufs/ffs/ffs_vfsops.c
2238
BO_LOCK(bp->b_bufobj);
sys/ufs/ffs/ffs_vfsops.c
2239
if (bp->b_vflags & BV_BKGRDINPROG) {
sys/ufs/ffs/ffs_vfsops.c
2240
if (bp->b_flags & B_ASYNC) {
sys/ufs/ffs/ffs_vfsops.c
2241
BO_UNLOCK(bp->b_bufobj);
sys/ufs/ffs/ffs_vfsops.c
2242
bdwrite(bp);
sys/ufs/ffs/ffs_vfsops.c
2245
bp->b_vflags |= BV_BKGRDWAIT;
sys/ufs/ffs/ffs_vfsops.c
2246
msleep(&bp->b_xflags, BO_LOCKPTR(bp->b_bufobj), PRIBIO,
sys/ufs/ffs/ffs_vfsops.c
2248
if (bp->b_vflags & BV_BKGRDINPROG)
sys/ufs/ffs/ffs_vfsops.c
2251
bp->b_vflags &= ~BV_BKGRDERR;
sys/ufs/ffs/ffs_vfsops.c
2252
BO_UNLOCK(bp->b_bufobj);
sys/ufs/ffs/ffs_vfsops.c
2262
if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) &&
sys/ufs/ffs/ffs_vfsops.c
2263
(bp->b_flags & B_ASYNC) &&
sys/ufs/ffs/ffs_vfsops.c
2266
KASSERT(bp->b_iodone == NULL,
sys/ufs/ffs/ffs_vfsops.c
2267
("bufwrite: needs chained iodone (%p)", bp->b_iodone));
sys/ufs/ffs/ffs_vfsops.c
2270
newbp = geteblk(bp->b_bufsize, GB_NOWAIT_BD);
sys/ufs/ffs/ffs_vfsops.c
2274
KASSERT(buf_mapped(bp), ("Unmapped cg"));
sys/ufs/ffs/ffs_vfsops.c
2275
memcpy(newbp->b_data, bp->b_data, bp->b_bufsize);
sys/ufs/ffs/ffs_vfsops.c
2276
BO_LOCK(bp->b_bufobj);
sys/ufs/ffs/ffs_vfsops.c
2277
bp->b_vflags |= BV_BKGRDINPROG;
sys/ufs/ffs/ffs_vfsops.c
2278
BO_UNLOCK(bp->b_bufobj);
sys/ufs/ffs/ffs_vfsops.c
2280
(bp->b_xflags & BX_FSPRIV) | BX_BKGRDMARKER;
sys/ufs/ffs/ffs_vfsops.c
2281
newbp->b_lblkno = bp->b_lblkno;
sys/ufs/ffs/ffs_vfsops.c
2282
newbp->b_blkno = bp->b_blkno;
sys/ufs/ffs/ffs_vfsops.c
2283
newbp->b_offset = bp->b_offset;
sys/ufs/ffs/ffs_vfsops.c
2287
pbgetvp(bp->b_vp, newbp);
sys/ufs/ffs/ffs_vfsops.c
2295
if (LIST_EMPTY(&bp->b_dep) ||
sys/ufs/ffs/ffs_vfsops.c
2296
softdep_move_dependencies(bp, newbp) == 0)
sys/ufs/ffs/ffs_vfsops.c
2297
bundirty(bp);
sys/ufs/ffs/ffs_vfsops.c
2299
bundirty(bp);
sys/ufs/ffs/ffs_vfsops.c
2309
if ((bp->b_xflags & BX_CYLGRP) != 0) {
sys/ufs/ffs/ffs_vfsops.c
2310
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_vfsops.c
2313
calculate_crc32c(~0L, bp->b_data, bp->b_bcount);
sys/ufs/ffs/ffs_vfsops.c
2315
bqrelse(bp);
sys/ufs/ffs/ffs_vfsops.c
2316
bp = newbp;
sys/ufs/ffs/ffs_vfsops.c
2319
bundirty(bp);
sys/ufs/ffs/ffs_vfsops.c
2326
if ((bp->b_xflags & BX_CYLGRP) != 0) {
sys/ufs/ffs/ffs_vfsops.c
2327
cgp = (struct cg *)bp->b_data;
sys/ufs/ffs/ffs_vfsops.c
2330
return (bufwrite(bp));
sys/ufs/ffs/ffs_vfsops.c
2334
ffs_geom_strategy(struct bufobj *bo, struct buf *bp)
sys/ufs/ffs/ffs_vfsops.c
2347
KASSERT(bp->b_vp == NULL || bp->b_vp->v_type != VCHR ||
sys/ufs/ffs/ffs_vfsops.c
2348
bp->b_vp->v_rdev == NULL ||
sys/ufs/ffs/ffs_vfsops.c
2349
bp->b_vp->v_rdev->si_mountpt == NULL ||
sys/ufs/ffs/ffs_vfsops.c
2350
VFSTOUFS(bp->b_vp->v_rdev->si_mountpt) == NULL ||
sys/ufs/ffs/ffs_vfsops.c
2351
vp == VFSTOUFS(bp->b_vp->v_rdev->si_mountpt)->um_devvp,
sys/ufs/ffs/ffs_vfsops.c
2353
if (bp->b_iocmd == BIO_WRITE) {
sys/ufs/ffs/ffs_vfsops.c
2354
if ((bp->b_flags & B_VALIDSUSPWRT) == 0 &&
sys/ufs/ffs/ffs_vfsops.c
2355
bp->b_vp != NULL && bp->b_vp->v_mount != NULL &&
sys/ufs/ffs/ffs_vfsops.c
2356
(bp->b_vp->v_mount->mnt_kern_flag & MNTK_SUSPENDED) != 0)
sys/ufs/ffs/ffs_vfsops.c
2358
nocopy = bp->b_flags & B_NOCOPY;
sys/ufs/ffs/ffs_vfsops.c
2359
bp->b_flags &= ~(B_VALIDSUSPWRT | B_NOCOPY);
sys/ufs/ffs/ffs_vfsops.c
2362
if ((bp->b_flags & B_CLUSTER) != 0) {
sys/ufs/ffs/ffs_vfsops.c
2363
runningbufwakeup(bp);
sys/ufs/ffs/ffs_vfsops.c
2364
TAILQ_FOREACH(tbp, &bp->b_cluster.cluster_head,
sys/ufs/ffs/ffs_vfsops.c
2369
bp->b_error = error;
sys/ufs/ffs/ffs_vfsops.c
2370
bp->b_ioflags |= BIO_ERROR;
sys/ufs/ffs/ffs_vfsops.c
2371
bp->b_flags &= ~B_BARRIER;
sys/ufs/ffs/ffs_vfsops.c
2372
bufdone(bp);
sys/ufs/ffs/ffs_vfsops.c
2376
(void)runningbufclaim(bp, bp->b_bufsize);
sys/ufs/ffs/ffs_vfsops.c
2378
error = ffs_copyonwrite(vp, bp);
sys/ufs/ffs/ffs_vfsops.c
2380
bp->b_error = error;
sys/ufs/ffs/ffs_vfsops.c
2381
bp->b_ioflags |= BIO_ERROR;
sys/ufs/ffs/ffs_vfsops.c
2382
bp->b_flags &= ~B_BARRIER;
sys/ufs/ffs/ffs_vfsops.c
2383
bufdone(bp);
sys/ufs/ffs/ffs_vfsops.c
2389
if ((bp->b_flags & B_CLUSTER) != 0) {
sys/ufs/ffs/ffs_vfsops.c
2390
TAILQ_FOREACH(tbp, &bp->b_cluster.cluster_head,
sys/ufs/ffs/ffs_vfsops.c
2396
if (!LIST_EMPTY(&bp->b_dep))
sys/ufs/ffs/ffs_vfsops.c
2397
buf_start(bp);
sys/ufs/ffs/ffs_vfsops.c
2404
switch (bp->b_xflags & BX_FSPRIV) {
sys/ufs/ffs/ffs_vfsops.c
2406
((struct cg *)bp->b_data)->cg_ckhash = 0;
sys/ufs/ffs/ffs_vfsops.c
2407
((struct cg *)bp->b_data)->cg_ckhash =
sys/ufs/ffs/ffs_vfsops.c
2408
calculate_crc32c(~0L, bp->b_data, bp->b_bcount);
sys/ufs/ffs/ffs_vfsops.c
2423
(bp->b_xflags & BX_FSPRIV), PRINT_UFS_BUF_XFLAGS);
sys/ufs/ffs/ffs_vfsops.c
2427
if (bp->b_iocmd != BIO_READ && ffs_enxio_enable)
sys/ufs/ffs/ffs_vfsops.c
2428
bp->b_xflags |= BX_CVTENXIO;
sys/ufs/ffs/ffs_vfsops.c
2429
g_vfs_strategy(bo, bp);
sys/ufs/ffs/ffs_vfsops.c
761
struct buf *bp;
sys/ufs/ffs/ffs_vfsops.c
846
(int)fs->fs_bsize, NOCRED, &bp);
sys/ufs/ffs/ffs_vfsops.c
852
if ((error = ffs_load_inode(bp, ip, fs, ip->i_number)) != 0) {
sys/ufs/ffs/ffs_vfsops.c
853
brelse(bp);
sys/ufs/ffs/ffs_vfsops.c
859
brelse(bp);
sys/ufs/ffs/ffs_vnops.c
1003
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_vnops.c
1004
bawrite(bp);
sys/ufs/ffs/ffs_vnops.c
1007
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_vnops.c
1008
cluster_write(vp, &ip->i_clusterw, bp,
sys/ufs/ffs/ffs_vnops.c
1011
bawrite(bp);
sys/ufs/ffs/ffs_vnops.c
1014
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_vnops.c
1015
bawrite(bp);
sys/ufs/ffs/ffs_vnops.c
1017
bp->b_flags |= B_CLUSTEROK;
sys/ufs/ffs/ffs_vnops.c
1018
bdwrite(bp);
sys/ufs/ffs/ffs_vnops.c
1065
struct buf *bp;
sys/ufs/ffs/ffs_vnops.c
1087
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
sys/ufs/ffs/ffs_vnops.c
1123
error = bread(vp, -1 - lbn, size, NOCRED, &bp);
sys/ufs/ffs/ffs_vnops.c
1135
size, &nextlbn, &nextsize, 1, NOCRED, &bp);
sys/ufs/ffs/ffs_vnops.c
1138
brelse(bp);
sys/ufs/ffs/ffs_vnops.c
1139
bp = NULL;
sys/ufs/ffs/ffs_vnops.c
1150
size -= bp->b_resid;
sys/ufs/ffs/ffs_vnops.c
1157
error = uiomove((char *)bp->b_data + blkoffset,
sys/ufs/ffs/ffs_vnops.c
1161
vfs_bio_brelse(bp, ioflag);
sys/ufs/ffs/ffs_vnops.c
1170
if (bp != NULL)
sys/ufs/ffs/ffs_vnops.c
1171
vfs_bio_brelse(bp, ioflag);
sys/ufs/ffs/ffs_vnops.c
1184
struct buf *bp;
sys/ufs/ffs/ffs_vnops.c
1229
ucred, flags, &bp);
sys/ufs/ffs/ffs_vnops.c
1239
if ((bp->b_flags & B_CACHE) == 0 && fs->fs_bsize <= xfersize)
sys/ufs/ffs/ffs_vnops.c
1240
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_vnops.c
1247
size = sblksize(fs, dp->di_extsize, lbn) - bp->b_resid;
sys/ufs/ffs/ffs_vnops.c
1252
uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
sys/ufs/ffs/ffs_vnops.c
1254
vfs_bio_set_flags(bp, ioflag);
sys/ufs/ffs/ffs_vnops.c
1264
(void)bwrite(bp);
sys/ufs/ffs/ffs_vnops.c
1269
bawrite(bp);
sys/ufs/ffs/ffs_vnops.c
1271
bdwrite(bp);
sys/ufs/ffs/ffs_vnops.c
267
struct buf *bp, *nbp;
sys/ufs/ffs/ffs_vnops.c
302
TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs)
sys/ufs/ffs/ffs_vnops.c
303
bp->b_vflags &= ~BV_SCANNED;
sys/ufs/ffs/ffs_vnops.c
304
TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) {
sys/ufs/ffs/ffs_vnops.c
311
if ((bp->b_vflags & BV_SCANNED) != 0)
sys/ufs/ffs/ffs_vnops.c
313
bp->b_vflags |= BV_SCANNED;
sys/ufs/ffs/ffs_vnops.c
322
if (waitfor == MNT_WAIT && bp->b_lblkno <= -UFS_NDADDR &&
sys/ufs/ffs/ffs_vnops.c
323
(lbn_level(bp->b_lblkno) >= passes ||
sys/ufs/ffs/ffs_vnops.c
326
if (bp->b_lblkno > lbn)
sys/ufs/ffs/ffs_vnops.c
328
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) == 0) {
sys/ufs/ffs/ffs_vnops.c
331
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL |
sys/ufs/ffs/ffs_vnops.c
334
bp->b_vflags &= ~BV_SCANNED;
sys/ufs/ffs/ffs_vnops.c
339
if ((bp->b_flags & B_DELWRI) == 0)
sys/ufs/ffs/ffs_vnops.c
344
if (!LIST_EMPTY(&bp->b_dep) &&
sys/ufs/ffs/ffs_vnops.c
345
(error = softdep_sync_buf(vp, bp,
sys/ufs/ffs/ffs_vnops.c
369
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_vnops.c
373
if ((bp->b_flags & B_DEFERRED) == 0) {
sys/ufs/ffs/ffs_vnops.c
374
bp->b_flags |= B_DEFERRED;
sys/ufs/ffs/ffs_vnops.c
375
BUF_UNLOCK(bp);
sys/ufs/ffs/ffs_vnops.c
380
bremfree(bp);
sys/ufs/ffs/ffs_vnops.c
381
error = bwrite(bp);
sys/ufs/ffs/ffs_vnops.c
386
} else if ((bp->b_flags & B_CLUSTEROK)) {
sys/ufs/ffs/ffs_vnops.c
387
(void) vfs_bio_awrite(bp);
sys/ufs/ffs/ffs_vnops.c
389
bremfree(bp);
sys/ufs/ffs/ffs_vnops.c
390
(void) bawrite(bp);
sys/ufs/ffs/ffs_vnops.c
432
TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) {
sys/ufs/ffs/ffs_vnops.c
433
if (bp->b_lblkno > -UFS_NDADDR) {
sys/ufs/ffs/ffs_vnops.c
651
struct buf *bp;
sys/ufs/ffs/ffs_vnops.c
704
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
sys/ufs/ffs/ffs_vnops.c
740
error = bread_gb(vp, lbn, size, NOCRED, bflag, &bp);
sys/ufs/ffs/ffs_vnops.c
751
seqcount, bflag, &bp);
sys/ufs/ffs/ffs_vnops.c
763
&nextsize, 1, NOCRED, bflag, NULL, &bp);
sys/ufs/ffs/ffs_vnops.c
770
error = bread_gb(vp, lbn, size, NOCRED, bflag, &bp);
sys/ufs/ffs/ffs_vnops.c
778
brelse(bp);
sys/ufs/ffs/ffs_vnops.c
779
bp = NULL;
sys/ufs/ffs/ffs_vnops.c
790
size -= bp->b_resid;
sys/ufs/ffs/ffs_vnops.c
797
if (buf_mapped(bp)) {
sys/ufs/ffs/ffs_vnops.c
798
error = vn_io_fault_uiomove((char *)bp->b_data +
sys/ufs/ffs/ffs_vnops.c
801
error = vn_io_fault_pgmove(bp->b_pages,
sys/ufs/ffs/ffs_vnops.c
802
blkoffset + (bp->b_offset & PAGE_MASK),
sys/ufs/ffs/ffs_vnops.c
808
vfs_bio_brelse(bp, ioflag);
sys/ufs/ffs/ffs_vnops.c
817
if (bp != NULL)
sys/ufs/ffs/ffs_vnops.c
818
vfs_bio_brelse(bp, ioflag);
sys/ufs/ffs/ffs_vnops.c
842
struct buf *bp;
sys/ufs/ffs/ffs_vnops.c
935
ap->a_cred, flags, &bp);
sys/ufs/ffs/ffs_vnops.c
941
bp->b_flags |= B_NOCACHE;
sys/ufs/ffs/ffs_vnops.c
949
size = blksize(fs, ip, lbn) - bp->b_resid;
sys/ufs/ffs/ffs_vnops.c
953
if (buf_mapped(bp)) {
sys/ufs/ffs/ffs_vnops.c
954
error = vn_io_fault_uiomove((char *)bp->b_data +
sys/ufs/ffs/ffs_vnops.c
957
error = vn_io_fault_pgmove(bp->b_pages,
sys/ufs/ffs/ffs_vnops.c
958
blkoffset + (bp->b_offset & PAGE_MASK),
sys/ufs/ffs/ffs_vnops.c
978
if (error != 0 && (bp->b_flags & B_CACHE) == 0 &&
sys/ufs/ffs/ffs_vnops.c
980
if (error == EFAULT && LIST_EMPTY(&bp->b_dep)) {
sys/ufs/ffs/ffs_vnops.c
981
bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE;
sys/ufs/ffs/ffs_vnops.c
982
brelse(bp);
sys/ufs/ffs/ffs_vnops.c
985
vfs_bio_clrbuf(bp);
sys/ufs/ffs/ffs_vnops.c
989
vfs_bio_set_flags(bp, ioflag);
sys/ufs/ffs/ffs_vnops.c
999
(void)bwrite(bp);
sys/ufs/ufs/ufs_bmap.c
102
struct buf *bp;
sys/ufs/ufs/ufs_bmap.c
110
bp = getblk(vp, lbn, mp->mnt_stat.f_iosize, 0, 0, 0);
sys/ufs/ufs/ufs_bmap.c
111
if ((bp->b_flags & B_CACHE) == 0) {
sys/ufs/ufs/ufs_bmap.c
115
bp->b_blkno = blkptrtodb(ump, daddr);
sys/ufs/ufs/ufs_bmap.c
116
bp->b_iocmd = BIO_READ;
sys/ufs/ufs/ufs_bmap.c
117
bp->b_flags &= ~B_INVAL;
sys/ufs/ufs/ufs_bmap.c
118
bp->b_ioflags &= ~BIO_ERROR;
sys/ufs/ufs/ufs_bmap.c
119
vfs_busy_pages(bp, 0);
sys/ufs/ufs/ufs_bmap.c
120
bp->b_iooffset = dbtob(bp->b_blkno);
sys/ufs/ufs/ufs_bmap.c
121
bstrategy(bp);
sys/ufs/ufs/ufs_bmap.c
125
racct_add_buf(curproc, bp, 0);
sys/ufs/ufs/ufs_bmap.c
130
error = bufwait(bp);
sys/ufs/ufs/ufs_bmap.c
132
brelse(bp);
sys/ufs/ufs/ufs_bmap.c
136
*bpp = bp;
sys/ufs/ufs/ufs_bmap.c
163
struct buf *bp;
sys/ufs/ufs/ufs_bmap.c
244
for (bp = NULL, ++ap; --num; ++ap) {
sys/ufs/ufs/ufs_bmap.c
258
if (bp)
sys/ufs/ufs/ufs_bmap.c
259
bqrelse(bp);
sys/ufs/ufs/ufs_bmap.c
260
error = readindir(vp, metalbn, daddr, &bp);
sys/ufs/ufs/ufs_bmap.c
265
daddr = ((ufs1_daddr_t *)bp->b_data)[ap->in_off];
sys/ufs/ufs/ufs_bmap.c
267
daddr = ((ufs2_daddr_t *)bp->b_data)[ap->in_off];
sys/ufs/ufs/ufs_bmap.c
270
bqrelse(bp);
sys/ufs/ufs/ufs_bmap.c
278
((ufs1_daddr_t *)bp->b_data)[bn - 1],
sys/ufs/ufs/ufs_bmap.c
279
((ufs1_daddr_t *)bp->b_data)[bn]);
sys/ufs/ufs/ufs_bmap.c
285
((ufs1_daddr_t *)bp->b_data)[bn],
sys/ufs/ufs/ufs_bmap.c
286
((ufs1_daddr_t *)bp->b_data)[bn+1]);
sys/ufs/ufs/ufs_bmap.c
296
((ufs2_daddr_t *)bp->b_data)[bn - 1],
sys/ufs/ufs/ufs_bmap.c
297
((ufs2_daddr_t *)bp->b_data)[bn]);
sys/ufs/ufs/ufs_bmap.c
303
((ufs2_daddr_t *)bp->b_data)[bn],
sys/ufs/ufs/ufs_bmap.c
304
((ufs2_daddr_t *)bp->b_data)[bn + 1]);
sys/ufs/ufs/ufs_bmap.c
309
if (bp)
sys/ufs/ufs/ufs_bmap.c
310
bqrelse(bp);
sys/ufs/ufs/ufs_bmap.c
346
struct buf *bp;
sys/ufs/ufs/ufs_bmap.c
356
bp = NULL;
sys/ufs/ufs/ufs_bmap.c
401
if (bp != NULL)
sys/ufs/ufs/ufs_bmap.c
402
bqrelse(bp);
sys/ufs/ufs/ufs_bmap.c
403
error = readindir(vp, ap->in_lbn, daddr, &bp);
sys/ufs/ufs/ufs_bmap.c
414
((ufs1_daddr_t *)bp->b_data)[off] :
sys/ufs/ufs/ufs_bmap.c
415
((ufs2_daddr_t *)bp->b_data)[off];
sys/ufs/ufs/ufs_bmap.c
434
if (bp != NULL)
sys/ufs/ufs/ufs_bmap.c
435
bqrelse(bp);
sys/ufs/ufs/ufs_dirhash.c
345
struct buf *bp = NULL;
sys/ufs/ufs/ufs_dirhash.c
437
if (bp != NULL)
sys/ufs/ufs/ufs_dirhash.c
438
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
439
if (UFS_BLKATOFF(vp, (off_t)pos, NULL, &bp) != 0)
sys/ufs/ufs/ufs_dirhash.c
444
ep = (struct direct *)((char *)bp->b_data + (pos & bmask));
sys/ufs/ufs/ufs_dirhash.c
448
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
463
if (bp != NULL)
sys/ufs/ufs/ufs_dirhash.c
464
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
555
struct buf *bp;
sys/ufs/ufs/ufs_dirhash.c
595
bp = NULL;
sys/ufs/ufs/ufs_dirhash.c
629
if (bp != NULL)
sys/ufs/ufs/ufs_dirhash.c
630
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
632
if (UFS_BLKATOFF(vp, (off_t)blkoff, NULL, &bp) != 0) {
sys/ufs/ufs/ufs_dirhash.c
637
KASSERT(bp != NULL, ("no buffer allocated"));
sys/ufs/ufs/ufs_dirhash.c
638
dp = (struct direct *)(bp->b_data + (offset & bmask));
sys/ufs/ufs/ufs_dirhash.c
663
*bpp = bp;
sys/ufs/ufs/ufs_dirhash.c
681
if (bp != NULL)
sys/ufs/ufs/ufs_dirhash.c
682
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
707
struct buf *bp;
sys/ufs/ufs/ufs_dirhash.c
728
error = UFS_BLKATOFF(ip->i_vnode, (off_t)pos, (char **)&dp, &bp);
sys/ufs/ufs/ufs_dirhash.c
735
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
744
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
756
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
763
brelse(bp);
sys/ufs/ufs/ufs_dirhash.c
768
brelse(bp);
sys/ufs/ufs/ufs_gjournal.c
57
struct buf *bp;
sys/ufs/ufs/ufs_gjournal.c
80
bp = NULL;
sys/ufs/ufs/ufs_gjournal.c
86
if ((error = ffs_getcg(fs, devvp, cg, 0, &bp, &cgp)) != 0)
sys/ufs/ufs/ufs_gjournal.c
94
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1015
softdep_change_directoryentry_offset(bp, dp, dirbuf,
sys/ufs/ufs/ufs_lookup.c
1064
(void) softdep_setup_directory_add(bp, dp,
sys/ufs/ufs/ufs_lookup.c
1069
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1072
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1075
error = bwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1106
struct buf *bp;
sys/ufs/ufs/ufs_lookup.c
1130
if ((error = UFS_BLKATOFF(dvp, offset, (char **)&ep, &bp)) != 0) {
sys/ufs/ufs/ufs_lookup.c
1194
softdep_setup_remove(bp, dp, ip, isrmdir);
sys/ufs/ufs/ufs_lookup.c
1196
error = bwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1198
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1201
error = bwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1203
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1205
error = bwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1227
struct buf *bp;
sys/ufs/ufs/ufs_lookup.c
1246
error = UFS_BLKATOFF(vdp, (off_t)I_OFFSET(dp), (char **)&ep, &bp);
sys/ufs/ufs/ufs_lookup.c
1249
brelse(bp);
sys/ufs/ufs/ufs_lookup.c
1268
softdep_setup_directory_change(bp, dp, oip, newinum,
sys/ufs/ufs/ufs_lookup.c
1270
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1273
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
1276
error = bwrite(bp);
sys/ufs/ufs/ufs_lookup.c
192
struct buf *bp; /* a buffer of directory entries */
sys/ufs/ufs/ufs_lookup.c
252
bp = NULL;
sys/ufs/ufs/ufs_lookup.c
297
&i_offset, &bp, nameiop == DELETE ? &prevoff : NULL)) {
sys/ufs/ufs/ufs_lookup.c
299
ep = (struct direct *)((char *)bp->b_data +
sys/ufs/ufs/ufs_lookup.c
329
(error = UFS_BLKATOFF(vdp, (off_t)i_offset, NULL, &bp)))
sys/ufs/ufs/ufs_lookup.c
344
if (bp != NULL)
sys/ufs/ufs/ufs_lookup.c
345
brelse(bp);
sys/ufs/ufs/ufs_lookup.c
347
UFS_BLKATOFF(vdp, (off_t)i_offset, NULL, &bp);
sys/ufs/ufs/ufs_lookup.c
368
ep = (struct direct *)((char *)bp->b_data + entryoffsetinblock);
sys/ufs/ufs/ufs_lookup.c
464
if (bp != NULL)
sys/ufs/ufs/ufs_lookup.c
465
brelse(bp);
sys/ufs/ufs/ufs_lookup.c
545
brelse(bp);
sys/ufs/ufs/ufs_lookup.c
548
brelse(bp);
sys/ufs/ufs/ufs_lookup.c
854
struct buf *bp;
sys/ufs/ufs/ufs_lookup.c
890
cr, flags, &bp)) != 0) {
sys/ufs/ufs/ufs_lookup.c
903
bcopy((caddr_t)dirp, (caddr_t)bp->b_data + blkoff,newentrysize);
sys/ufs/ufs/ufs_lookup.c
908
ufsdirhash_checkblock(dp, (char *)bp->b_data + blkoff,
sys/ufs/ufs/ufs_lookup.c
920
while (blkoff < bp->b_bcount) {
sys/ufs/ufs/ufs_lookup.c
922
(bp->b_data + blkoff))->d_reclen = DIRBLKSIZ;
sys/ufs/ufs/ufs_lookup.c
925
if (softdep_setup_directory_add(bp, dp, I_OFFSET(dp),
sys/ufs/ufs/ufs_lookup.c
930
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
934
bdwrite(bp);
sys/ufs/ufs/ufs_lookup.c
937
error = bwrite(bp);
sys/ufs/ufs/ufs_lookup.c
968
error = UFS_BLKATOFF(dvp, (off_t)I_OFFSET(dp), &dirbuf, &bp);
sys/ufs/ufs/ufs_vnops.c
2010
struct buf *bp;
sys/ufs/ufs/ufs_vnops.c
2179
BA_CLRBUF, &bp)) != 0)
sys/ufs/ufs/ufs_vnops.c
2184
bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate);
sys/ufs/ufs/ufs_vnops.c
2193
while (blkoff < bp->b_bcount) {
sys/ufs/ufs/ufs_vnops.c
2195
(bp->b_data + blkoff))->d_reclen = DIRBLKSIZ;
sys/ufs/ufs/ufs_vnops.c
2201
(void)bwrite(bp);
sys/ufs/ufs/ufs_vnops.c
2216
bdwrite(bp);
sys/ufs/ufs/ufs_vnops.c
2217
else if (!DOINGSOFTDEP(dvp) && ((error = bwrite(bp))))
sys/ufs/ufs/ufs_vnops.c
2220
error = ufs_direnter(dvp, tvp, &newdir, cnp, bp);
sys/ufs/ufs/ufs_vnops.c
2407
struct buf *bp;
sys/ufs/ufs/ufs_vnops.c
2447
error = UFS_BLKATOFF(vp, uio->uio_offset, NULL, &bp);
sys/ufs/ufs/ufs_vnops.c
2450
if (bp->b_offset + bp->b_bcount > ip->i_size)
sys/ufs/ufs/ufs_vnops.c
2451
readcnt = ip->i_size - bp->b_offset;
sys/ufs/ufs/ufs_vnops.c
2453
readcnt = bp->b_bcount;
sys/ufs/ufs/ufs_vnops.c
2454
skipcnt = (size_t)(uio->uio_offset - bp->b_offset) &
sys/ufs/ufs/ufs_vnops.c
2456
offset = bp->b_offset + skipcnt;
sys/ufs/ufs/ufs_vnops.c
2457
dp = (struct direct *)&bp->b_data[skipcnt];
sys/ufs/ufs/ufs_vnops.c
2458
edp = (struct direct *)&bp->b_data[readcnt];
sys/ufs/ufs/ufs_vnops.c
2511
bqrelse(bp);
sys/ufs/ufs/ufs_vnops.c
2567
struct buf *bp = ap->a_bp;
sys/ufs/ufs/ufs_vnops.c
2572
if (bp->b_blkno == bp->b_lblkno) {
sys/ufs/ufs/ufs_vnops.c
2573
error = ufs_bmaparray(vp, bp->b_lblkno, &blkno, bp, NULL, NULL);
sys/ufs/ufs/ufs_vnops.c
2574
bp->b_blkno = blkno;
sys/ufs/ufs/ufs_vnops.c
2576
bp->b_error = error;
sys/ufs/ufs/ufs_vnops.c
2577
bp->b_ioflags |= BIO_ERROR;
sys/ufs/ufs/ufs_vnops.c
2578
bufdone(bp);
sys/ufs/ufs/ufs_vnops.c
2581
if ((long)bp->b_blkno == -1)
sys/ufs/ufs/ufs_vnops.c
2582
vfs_bio_clrbuf(bp);
sys/ufs/ufs/ufs_vnops.c
2584
if ((long)bp->b_blkno == -1) {
sys/ufs/ufs/ufs_vnops.c
2585
bufdone(bp);
sys/ufs/ufs/ufs_vnops.c
2588
bp->b_iooffset = dbtob(bp->b_blkno);
sys/ufs/ufs/ufs_vnops.c
2589
BO_STRATEGY(VFSTOUFS(vp->v_mount)->um_bo, bp);
sys/vm/swap_pager.c
1001
sp->sw_strategy(bp, sp);
sys/vm/swap_pager.c
1363
vm_page_t *ma, int count, int *a_rbehind, int *a_rahead, struct buf *bp)
sys/vm/swap_pager.c
1383
uma_zfree(swrbuf_zone, bp);
sys/vm/swap_pager.c
1404
vm_object_prepare_buf_pages(object, bp->b_pages, count, &rbehind,
sys/vm/swap_pager.c
1406
bp->b_npages = rbehind + count + rahead;
sys/vm/swap_pager.c
1407
KASSERT(bp->b_npages <= PBUF_PAGES,
sys/vm/swap_pager.c
1409
bp->b_npages, rbehind, count, rahead, (uintmax_t)PBUF_PAGES));
sys/vm/swap_pager.c
1410
for (i = 0; i < bp->b_npages; i++) {
sys/vm/swap_pager.c
1411
m = bp->b_pages[i];
sys/vm/swap_pager.c
1415
bp->b_blkno = swp_pager_meta_lookup(blks, pindex - rbehind);
sys/vm/swap_pager.c
1416
KASSERT(bp->b_blkno != SWAPBLK_NONE,
sys/vm/swap_pager.c
1419
vm_object_pip_add(object, bp->b_npages);
sys/vm/swap_pager.c
1421
MPASS((bp->b_flags & B_MAXPHYS) != 0);
sys/vm/swap_pager.c
1429
bp->b_flags |= B_PAGING;
sys/vm/swap_pager.c
1430
bp->b_iocmd = BIO_READ;
sys/vm/swap_pager.c
1431
bp->b_iodone = swp_pager_async_iodone;
sys/vm/swap_pager.c
1432
bp->b_rcred = crhold(thread0.td_ucred);
sys/vm/swap_pager.c
1433
bp->b_wcred = crhold(thread0.td_ucred);
sys/vm/swap_pager.c
1434
bp->b_bufsize = bp->b_bcount = ptoa(bp->b_npages);
sys/vm/swap_pager.c
1435
bp->b_pgbefore = rbehind;
sys/vm/swap_pager.c
1436
bp->b_pgafter = rahead;
sys/vm/swap_pager.c
1439
VM_CNT_ADD(v_swappgsin, bp->b_npages);
sys/vm/swap_pager.c
1452
BUF_KERNPROC(bp);
sys/vm/swap_pager.c
1453
swp_pager_strategy(bp);
sys/vm/swap_pager.c
1475
bp->b_bufobj, (intmax_t)bp->b_blkno, bp->b_bcount);
sys/vm/swap_pager.c
1502
struct buf *bp;
sys/vm/swap_pager.c
1505
bp = uma_zalloc(swrbuf_zone, M_WAITOK);
sys/vm/swap_pager.c
1509
rahead, bp));
sys/vm/swap_pager.c
1568
struct buf *bp;
sys/vm/swap_pager.c
1628
bp = uma_zalloc(swwbuf_zone, M_WAITOK);
sys/vm/swap_pager.c
1629
MPASS((bp->b_flags & B_MAXPHYS) != 0);
sys/vm/swap_pager.c
1631
bp->b_flags |= B_ASYNC;
sys/vm/swap_pager.c
1632
bp->b_flags |= B_PAGING;
sys/vm/swap_pager.c
1633
bp->b_iocmd = BIO_WRITE;
sys/vm/swap_pager.c
1635
bp->b_rcred = crhold(thread0.td_ucred);
sys/vm/swap_pager.c
1636
bp->b_wcred = crhold(thread0.td_ucred);
sys/vm/swap_pager.c
1637
bp->b_bcount = PAGE_SIZE * n;
sys/vm/swap_pager.c
1638
bp->b_bufsize = PAGE_SIZE * n;
sys/vm/swap_pager.c
1639
bp->b_blkno = blk;
sys/vm/swap_pager.c
1641
bp->b_pages[j] = ma[i + j];
sys/vm/swap_pager.c
1642
bp->b_npages = n;
sys/vm/swap_pager.c
1647
bp->b_dirtyoff = 0;
sys/vm/swap_pager.c
1648
bp->b_dirtyend = bp->b_bcount;
sys/vm/swap_pager.c
1651
VM_CNT_ADD(v_swappgsout, bp->b_npages);
sys/vm/swap_pager.c
1669
bp->b_iodone = swp_pager_async_iodone;
sys/vm/swap_pager.c
1670
BUF_KERNPROC(bp);
sys/vm/swap_pager.c
1671
swp_pager_strategy(bp);
sys/vm/swap_pager.c
1680
bp->b_iodone = bdone;
sys/vm/swap_pager.c
1681
swp_pager_strategy(bp);
sys/vm/swap_pager.c
1686
bwait(bp, PVM, "swwrt");
sys/vm/swap_pager.c
1692
swp_pager_async_iodone(bp);
sys/vm/swap_pager.c
1707
swp_pager_async_iodone(struct buf *bp)
sys/vm/swap_pager.c
1716
if (bp->b_ioflags & BIO_ERROR && bp->b_error != ENOMEM) {
sys/vm/swap_pager.c
1720
((bp->b_iocmd == BIO_READ) ? "pagein" : "pageout"),
sys/vm/swap_pager.c
1721
(long)bp->b_blkno,
sys/vm/swap_pager.c
1722
(long)bp->b_bcount,
sys/vm/swap_pager.c
1723
bp->b_error
sys/vm/swap_pager.c
1730
if (buf_mapped(bp))
sys/vm/swap_pager.c
1731
pmap_qremove((vm_offset_t)bp->b_data, bp->b_npages);
sys/vm/swap_pager.c
1733
bp->b_data = bp->b_kvabase;
sys/vm/swap_pager.c
1735
if (bp->b_npages) {
sys/vm/swap_pager.c
1736
object = bp->b_pages[0]->object;
sys/vm/swap_pager.c
1748
for (i = 0; i < bp->b_npages; ++i) {
sys/vm/swap_pager.c
1749
vm_page_t m = bp->b_pages[i];
sys/vm/swap_pager.c
1763
if (bp->b_ioflags & BIO_ERROR) {
sys/vm/swap_pager.c
1770
if (bp->b_iocmd == BIO_READ) {
sys/vm/swap_pager.c
1777
if (i < bp->b_pgbefore ||
sys/vm/swap_pager.c
1778
i >= bp->b_npages - bp->b_pgafter)
sys/vm/swap_pager.c
1792
} else if (bp->b_iocmd == BIO_READ) {
sys/vm/swap_pager.c
1808
if (i < bp->b_pgbefore ||
sys/vm/swap_pager.c
1809
i >= bp->b_npages - bp->b_pgafter)
sys/vm/swap_pager.c
1834
vm_object_pip_wakeupn(object, bp->b_npages);
sys/vm/swap_pager.c
1843
if (bp->b_vp) {
sys/vm/swap_pager.c
1844
bp->b_vp = NULL;
sys/vm/swap_pager.c
1845
bp->b_bufobj = NULL;
sys/vm/swap_pager.c
1850
if (bp->b_flags & B_ASYNC) {
sys/vm/swap_pager.c
1856
uma_zfree((bp->b_iocmd == BIO_READ) ? swrbuf_zone : swwbuf_zone, bp);
sys/vm/swap_pager.c
1908
struct buf **bp)
sys/vm/swap_pager.c
1977
NULL, &rahead, *bp);
sys/vm/swap_pager.c
1981
*bp = uma_zalloc(swrbuf_zone, M_WAITOK);
sys/vm/swap_pager.c
2043
struct buf *bp;
sys/vm/swap_pager.c
2050
bp = uma_zalloc(swrbuf_zone, M_WAITOK);
sys/vm/swap_pager.c
2075
swap_pager_swapoff_object(sp, object, &bp);
sys/vm/swap_pager.c
2081
uma_zfree(swrbuf_zone, bp);
sys/vm/swap_pager.c
3161
struct buf *bp;
sys/vm/swap_pager.c
3164
bp = bp2->bio_caller2;
sys/vm/swap_pager.c
3166
bp->b_ioflags = bp2->bio_flags;
sys/vm/swap_pager.c
3168
bp->b_ioflags |= BIO_ERROR;
sys/vm/swap_pager.c
3169
bp->b_resid = bp->b_bcount - bp2->bio_completed;
sys/vm/swap_pager.c
3170
bp->b_error = bp2->bio_error;
sys/vm/swap_pager.c
3171
bp->b_caller1 = NULL;
sys/vm/swap_pager.c
3172
bufdone(bp);
sys/vm/swap_pager.c
3181
swapgeom_strategy(struct buf *bp, struct swdevt *sp)
sys/vm/swap_pager.c
3190
bp->b_error = ENXIO;
sys/vm/swap_pager.c
3191
bp->b_ioflags |= BIO_ERROR;
sys/vm/swap_pager.c
3192
bufdone(bp);
sys/vm/swap_pager.c
3197
if (bp->b_iocmd == BIO_WRITE)
sys/vm/swap_pager.c
3205
bp->b_error = ENOMEM;
sys/vm/swap_pager.c
3206
bp->b_ioflags |= BIO_ERROR;
sys/vm/swap_pager.c
3208
bufdone(bp);
sys/vm/swap_pager.c
3212
bp->b_caller1 = bio;
sys/vm/swap_pager.c
3214
bio->bio_caller2 = bp;
sys/vm/swap_pager.c
3215
bio->bio_cmd = bp->b_iocmd;
sys/vm/swap_pager.c
3216
bio->bio_offset = (bp->b_blkno - sp->sw_first) * PAGE_SIZE;
sys/vm/swap_pager.c
3217
bio->bio_length = bp->b_bcount;
sys/vm/swap_pager.c
3220
if (!buf_mapped(bp)) {
sys/vm/swap_pager.c
3221
bio->bio_ma = bp->b_pages;
sys/vm/swap_pager.c
3223
bio->bio_ma_offset = (vm_offset_t)bp->b_offset & PAGE_MASK;
sys/vm/swap_pager.c
3224
bio->bio_ma_n = bp->b_npages;
sys/vm/swap_pager.c
3227
bio->bio_data = bp->b_data;
sys/vm/swap_pager.c
3357
swapdev_strategy(struct buf *bp, struct swdevt *sp)
sys/vm/swap_pager.c
3361
bp->b_blkno = ctodb(bp->b_blkno - sp->sw_first);
sys/vm/swap_pager.c
3365
if (bp->b_iocmd == BIO_WRITE) {
sys/vm/swap_pager.c
3367
if (bp->b_bufobj)
sys/vm/swap_pager.c
3368
bufobj_wdrop(bp->b_bufobj);
sys/vm/swap_pager.c
3373
if (bp->b_bufobj != &vp2->v_bufobj)
sys/vm/swap_pager.c
3374
bp->b_bufobj = &vp2->v_bufobj;
sys/vm/swap_pager.c
3375
bp->b_vp = vp2;
sys/vm/swap_pager.c
3376
bp->b_iooffset = dbtob(bp->b_blkno);
sys/vm/swap_pager.c
3377
bstrategy(bp);
sys/vm/swap_pager.c
482
static void swp_pager_async_iodone(struct buf *bp);
sys/vm/swap_pager.c
985
swp_pager_strategy(struct buf *bp)
sys/vm/swap_pager.c
991
if (swp_pager_isondev(bp->b_blkno, sp)) {
sys/vm/swap_pager.c
995
bp->b_data = unmapped_buf;
sys/vm/swap_pager.c
996
bp->b_offset = 0;
sys/vm/swap_pager.c
998
pmap_qenter((vm_offset_t)bp->b_data,
sys/vm/swap_pager.c
999
&bp->b_pages[0], bp->b_bcount / PAGE_SIZE);
sys/vm/vm_pager.c
458
struct buf *bp = mem;
sys/vm/vm_pager.c
460
bp->b_vp = NULL;
sys/vm/vm_pager.c
461
bp->b_bufobj = NULL;
sys/vm/vm_pager.c
464
bp->b_rcred = NOCRED;
sys/vm/vm_pager.c
465
bp->b_wcred = NOCRED;
sys/vm/vm_pager.c
466
bp->b_qindex = 0; /* On no queue (QUEUE_NONE) */
sys/vm/vm_pager.c
467
bp->b_data = bp->b_kvabase;
sys/vm/vm_pager.c
468
bp->b_xflags = 0;
sys/vm/vm_pager.c
469
bp->b_flags = B_MAXPHYS;
sys/vm/vm_pager.c
470
bp->b_ioflags = 0;
sys/vm/vm_pager.c
471
bp->b_iodone = NULL;
sys/vm/vm_pager.c
472
bp->b_error = 0;
sys/vm/vm_pager.c
473
BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWITNESS, NULL);
sys/vm/vm_pager.c
481
struct buf *bp = mem;
sys/vm/vm_pager.c
483
if (bp->b_rcred != NOCRED) {
sys/vm/vm_pager.c
484
crfree(bp->b_rcred);
sys/vm/vm_pager.c
485
bp->b_rcred = NOCRED;
sys/vm/vm_pager.c
487
if (bp->b_wcred != NOCRED) {
sys/vm/vm_pager.c
488
crfree(bp->b_wcred);
sys/vm/vm_pager.c
489
bp->b_wcred = NOCRED;
sys/vm/vm_pager.c
492
BUF_UNLOCK(bp);
sys/vm/vm_pager.c
500
struct buf *bp = mem;
sys/vm/vm_pager.c
504
bp->b_kvabase = (void *)kva_alloc(ptoa(PBUF_PAGES));
sys/vm/vm_pager.c
505
if (bp->b_kvabase == NULL)
sys/vm/vm_pager.c
507
bp->b_kvasize = ptoa(PBUF_PAGES);
sys/vm/vm_pager.c
508
BUF_LOCKINIT(bp, pbuf_wmesg);
sys/vm/vm_pager.c
509
LIST_INIT(&bp->b_dep);
sys/vm/vm_pager.c
510
bp->b_rcred = bp->b_wcred = NOCRED;
sys/vm/vm_pager.c
511
bp->b_xflags = 0;
sys/vm/vm_pager.c
526
pbgetvp(struct vnode *vp, struct buf *bp)
sys/vm/vm_pager.c
529
KASSERT(bp->b_vp == NULL, ("pbgetvp: not free"));
sys/vm/vm_pager.c
530
KASSERT(bp->b_bufobj == NULL, ("pbgetvp: not free (bufobj)"));
sys/vm/vm_pager.c
532
bp->b_vp = vp;
sys/vm/vm_pager.c
533
bp->b_flags |= B_PAGING;
sys/vm/vm_pager.c
534
bp->b_bufobj = &vp->v_bufobj;
sys/vm/vm_pager.c
545
pbgetbo(struct bufobj *bo, struct buf *bp)
sys/vm/vm_pager.c
548
KASSERT(bp->b_vp == NULL, ("pbgetbo: not free (vnode)"));
sys/vm/vm_pager.c
549
KASSERT(bp->b_bufobj == NULL, ("pbgetbo: not free (bufobj)"));
sys/vm/vm_pager.c
551
bp->b_flags |= B_PAGING;
sys/vm/vm_pager.c
552
bp->b_bufobj = bo;
sys/vm/vm_pager.c
559
pbrelvp(struct buf *bp)
sys/vm/vm_pager.c
562
KASSERT(bp->b_vp != NULL, ("pbrelvp: NULL"));
sys/vm/vm_pager.c
563
KASSERT(bp->b_bufobj != NULL, ("pbrelvp: NULL bufobj"));
sys/vm/vm_pager.c
564
KASSERT((bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) == 0,
sys/vm/vm_pager.c
567
bp->b_vp = NULL;
sys/vm/vm_pager.c
568
bp->b_bufobj = NULL;
sys/vm/vm_pager.c
569
bp->b_flags &= ~B_PAGING;
sys/vm/vm_pager.c
576
pbrelbo(struct buf *bp)
sys/vm/vm_pager.c
579
KASSERT(bp->b_vp == NULL, ("pbrelbo: vnode"));
sys/vm/vm_pager.c
580
KASSERT(bp->b_bufobj != NULL, ("pbrelbo: NULL bufobj"));
sys/vm/vm_pager.c
581
KASSERT((bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) == 0,
sys/vm/vm_pager.c
584
bp->b_bufobj = NULL;
sys/vm/vm_pager.c
585
bp->b_flags &= ~B_PAGING;
sys/vm/vnode_pager.c
1042
vm_object_prepare_buf_pages(object, bp->b_pages, count,
sys/vm/vnode_pager.c
1047
bp->b_pages[j] = m[j];
sys/vm/vnode_pager.c
1049
bp->b_blkno -= IDX_TO_OFF(rbehind) / DEV_BSIZE;
sys/vm/vnode_pager.c
1050
bp->b_pgbefore = rbehind;
sys/vm/vnode_pager.c
1051
bp->b_pgafter = rahead;
sys/vm/vnode_pager.c
1052
bp->b_npages = rbehind + count + rahead;
sys/vm/vnode_pager.c
1056
*a_rbehind = bp->b_pgbefore;
sys/vm/vnode_pager.c
1058
*a_rahead = bp->b_pgafter;
sys/vm/vnode_pager.c
1061
KASSERT(bp->b_npages <= atop(maxphys),
sys/vm/vnode_pager.c
1062
("%s: buf %p overflowed", __func__, bp));
sys/vm/vnode_pager.c
1063
for (int j = 1, prev = 0; j < bp->b_npages; j++) {
sys/vm/vnode_pager.c
1064
if (bp->b_pages[j] == bogus_page)
sys/vm/vnode_pager.c
1066
KASSERT(bp->b_pages[j]->pindex - bp->b_pages[prev]->pindex ==
sys/vm/vnode_pager.c
1068
__func__, bp));
sys/vm/vnode_pager.c
1078
foff = IDX_TO_OFF(bp->b_pages[0]->pindex);
sys/vm/vnode_pager.c
1079
bytecount = ptoa(bp->b_npages);
sys/vm/vnode_pager.c
1093
bp->b_data = unmapped_buf;
sys/vm/vnode_pager.c
1094
bp->b_offset = 0;
sys/vm/vnode_pager.c
1096
bp->b_data = bp->b_kvabase;
sys/vm/vnode_pager.c
1097
pmap_qenter((vm_offset_t)bp->b_data, bp->b_pages, bp->b_npages);
sys/vm/vnode_pager.c
1101
bp->b_iocmd = BIO_READ;
sys/vm/vnode_pager.c
1102
KASSERT(bp->b_rcred == NOCRED, ("leaking read ucred"));
sys/vm/vnode_pager.c
1103
KASSERT(bp->b_wcred == NOCRED, ("leaking write ucred"));
sys/vm/vnode_pager.c
1104
bp->b_rcred = crhold(curthread->td_ucred);
sys/vm/vnode_pager.c
1105
bp->b_wcred = crhold(curthread->td_ucred);
sys/vm/vnode_pager.c
1106
pbgetbo(bo, bp);
sys/vm/vnode_pager.c
1107
bp->b_vp = vp;
sys/vm/vnode_pager.c
1108
bp->b_bcount = bp->b_bufsize = bytecount;
sys/vm/vnode_pager.c
1109
bp->b_iooffset = dbtob(bp->b_blkno);
sys/vm/vnode_pager.c
1110
KASSERT(IDX_TO_OFF(m[0]->pindex - bp->b_pages[0]->pindex) ==
sys/vm/vnode_pager.c
1111
(blkno0 - bp->b_blkno) * DEV_BSIZE +
sys/vm/vnode_pager.c
1115
(uintmax_t)m[0]->pindex, (uintmax_t)bp->b_pages[0]->pindex,
sys/vm/vnode_pager.c
1116
(uintmax_t)blkno0, (uintmax_t)bp->b_blkno));
sys/vm/vnode_pager.c
1118
(void)runningbufclaim(bp, bp->b_bufsize);
sys/vm/vnode_pager.c
1121
VM_CNT_ADD(v_vnodepgsin, bp->b_npages);
sys/vm/vnode_pager.c
1124
bp->b_pgiodone = iodone;
sys/vm/vnode_pager.c
1125
bp->b_caller1 = arg;
sys/vm/vnode_pager.c
1126
bp->b_iodone = vnode_pager_generic_getpages_done_async;
sys/vm/vnode_pager.c
1127
bp->b_flags |= B_ASYNC;
sys/vm/vnode_pager.c
1128
BUF_KERNPROC(bp);
sys/vm/vnode_pager.c
1129
bstrategy(bp);
sys/vm/vnode_pager.c
1132
bp->b_iodone = bdone;
sys/vm/vnode_pager.c
1133
bstrategy(bp);
sys/vm/vnode_pager.c
1134
bwait(bp, PVM, "vnread");
sys/vm/vnode_pager.c
1135
error = vnode_pager_generic_getpages_done(bp);
sys/vm/vnode_pager.c
1136
for (i = 0; i < bp->b_npages; i++)
sys/vm/vnode_pager.c
1137
bp->b_pages[i] = NULL;
sys/vm/vnode_pager.c
1138
bp->b_vp = NULL;
sys/vm/vnode_pager.c
1139
pbrelbo(bp);
sys/vm/vnode_pager.c
1140
uma_zfree(vnode_pbuf_zone, bp);
sys/vm/vnode_pager.c
1146
vnode_pager_generic_getpages_done_async(struct buf *bp)
sys/vm/vnode_pager.c
1150
error = vnode_pager_generic_getpages_done(bp);
sys/vm/vnode_pager.c
1152
bp->b_pgiodone(bp->b_caller1, bp->b_pages + bp->b_pgbefore,
sys/vm/vnode_pager.c
1153
bp->b_npages - bp->b_pgbefore - bp->b_pgafter, error);
sys/vm/vnode_pager.c
1154
for (int i = 0; i < bp->b_npages; i++)
sys/vm/vnode_pager.c
1155
bp->b_pages[i] = NULL;
sys/vm/vnode_pager.c
1156
bp->b_vp = NULL;
sys/vm/vnode_pager.c
1157
pbrelbo(bp);
sys/vm/vnode_pager.c
1158
uma_zfree(vnode_pbuf_zone, bp);
sys/vm/vnode_pager.c
1162
vnode_pager_generic_getpages_done(struct buf *bp)
sys/vm/vnode_pager.c
1168
KASSERT((bp->b_ioflags & BIO_ERROR) == 0 || bp->b_error != 0,
sys/vm/vnode_pager.c
1170
error = (bp->b_ioflags & BIO_ERROR) != 0 ? bp->b_error : 0;
sys/vm/vnode_pager.c
1171
object = bp->b_vp->v_object;
sys/vm/vnode_pager.c
1173
runningbufwakeup(bp);
sys/vm/vnode_pager.c
1175
if (error == 0 && bp->b_bcount != ptoa(bp->b_npages)) {
sys/vm/vnode_pager.c
1176
if (!buf_mapped(bp)) {
sys/vm/vnode_pager.c
1177
bp->b_data = bp->b_kvabase;
sys/vm/vnode_pager.c
1178
pmap_qenter((vm_offset_t)bp->b_data, bp->b_pages,
sys/vm/vnode_pager.c
1179
bp->b_npages);
sys/vm/vnode_pager.c
1181
bzero(bp->b_data + bp->b_bcount,
sys/vm/vnode_pager.c
1182
ptoa(bp->b_npages) - bp->b_bcount);
sys/vm/vnode_pager.c
1184
if (buf_mapped(bp)) {
sys/vm/vnode_pager.c
1185
pmap_qremove((vm_offset_t)bp->b_data, bp->b_npages);
sys/vm/vnode_pager.c
1186
bp->b_data = unmapped_buf;
sys/vm/vnode_pager.c
1196
for (i = 0; i < bp->b_pgbefore; i++)
sys/vm/vnode_pager.c
1197
vm_page_free_invalid(bp->b_pages[i]);
sys/vm/vnode_pager.c
1198
for (i = bp->b_npages - bp->b_pgafter; i < bp->b_npages; i++)
sys/vm/vnode_pager.c
1199
vm_page_free_invalid(bp->b_pages[i]);
sys/vm/vnode_pager.c
1206
for (i = 0, tfoff = IDX_TO_OFF(bp->b_pages[0]->pindex);
sys/vm/vnode_pager.c
1207
i < bp->b_npages; i++, tfoff = nextoff) {
sys/vm/vnode_pager.c
1211
mt = bp->b_pages[i];
sys/vm/vnode_pager.c
1239
if (i < bp->b_pgbefore || i >= bp->b_npages - bp->b_pgafter)
sys/vm/vnode_pager.c
657
vnode_pager_input_bdone(struct buf *bp)
sys/vm/vnode_pager.c
659
runningbufwakeup(bp);
sys/vm/vnode_pager.c
660
bdone(bp);
sys/vm/vnode_pager.c
671
struct buf *bp;
sys/vm/vnode_pager.c
705
bp = uma_zalloc(vnode_pbuf_zone, M_WAITOK);
sys/vm/vnode_pager.c
708
bp->b_iocmd = BIO_READ;
sys/vm/vnode_pager.c
709
bp->b_iodone = vnode_pager_input_bdone;
sys/vm/vnode_pager.c
710
KASSERT(bp->b_rcred == NOCRED, ("leaking read ucred"));
sys/vm/vnode_pager.c
711
KASSERT(bp->b_wcred == NOCRED, ("leaking write ucred"));
sys/vm/vnode_pager.c
712
bp->b_rcred = crhold(curthread->td_ucred);
sys/vm/vnode_pager.c
713
bp->b_wcred = crhold(curthread->td_ucred);
sys/vm/vnode_pager.c
714
bp->b_data = (caddr_t)sf_buf_kva(sf) + i * bsize;
sys/vm/vnode_pager.c
715
bp->b_blkno = fileaddr;
sys/vm/vnode_pager.c
716
pbgetbo(bo, bp);
sys/vm/vnode_pager.c
717
bp->b_vp = vp;
sys/vm/vnode_pager.c
718
bp->b_bcount = bsize;
sys/vm/vnode_pager.c
719
bp->b_bufsize = bsize;
sys/vm/vnode_pager.c
720
(void)runningbufclaim(bp, bp->b_bufsize);
sys/vm/vnode_pager.c
723
bp->b_iooffset = dbtob(bp->b_blkno);
sys/vm/vnode_pager.c
724
bstrategy(bp);
sys/vm/vnode_pager.c
726
bwait(bp, PVM, "vnsrd");
sys/vm/vnode_pager.c
728
if ((bp->b_ioflags & BIO_ERROR) != 0) {
sys/vm/vnode_pager.c
729
KASSERT(bp->b_error != 0,
sys/vm/vnode_pager.c
731
error = bp->b_error;
sys/vm/vnode_pager.c
737
bp->b_vp = NULL;
sys/vm/vnode_pager.c
738
pbrelbo(bp);
sys/vm/vnode_pager.c
739
uma_zfree(vnode_pbuf_zone, bp);
sys/vm/vnode_pager.c
895
struct buf *bp;
sys/vm/vnode_pager.c
930
bp = uma_zalloc(vnode_pbuf_zone, M_WAITOK);
sys/vm/vnode_pager.c
931
MPASS((bp->b_flags & B_MAXPHYS) != 0);
sys/vm/vnode_pager.c
938
error = VOP_BMAP(vp, foff / bsize, &bo, &bp->b_blkno, &after, &before);
sys/vm/vnode_pager.c
940
uma_zfree(vnode_pbuf_zone, bp);
sys/vm/vnode_pager.c
952
uma_zfree(vnode_pbuf_zone, bp);
sys/vm/vnode_pager.c
961
uma_zfree(vnode_pbuf_zone, bp);
sys/vm/vnode_pager.c
976
if (bp->b_blkno == -1) {
sys/vm/vnode_pager.c
980
uma_zfree(vnode_pbuf_zone, bp);
sys/vm/vnode_pager.c
989
blkno0 = bp->b_blkno;
sys/vm/vnode_pager.c
991
bp->b_blkno += (foff % bsize) / DEV_BSIZE;
sys/xdr/xdr.c
384
xdr_bool(XDR *xdrs, bool_t *bp)
sys/xdr/xdr.c
390
lb = *bp ? XDR_TRUE : XDR_FALSE;
sys/xdr/xdr.c
397
*bp = (lb == XDR_FALSE) ? FALSE : TRUE;
sys/xdr/xdr_sizeof.c
56
x_putbytes(XDR *xdrs, const char *bp, u_int len)
tools/diag/prtblknos/prtblknos.c
165
bp = getdatablk(blkno, fs->fs_bsize, BT_LEVEL1 + level);
tools/diag/prtblknos/prtblknos.c
166
if (bp->b_errs == 0) {
tools/diag/prtblknos/prtblknos.c
167
memcpy(indir, bp->b_un.b_buf, fs->fs_bsize);
tools/diag/prtblknos/prtblknos.c
39
static struct bufarea *bp;
tools/tools/ncpus/acpi.c
101
u_int8_t *bp;
tools/tools/ncpus/acpi.c
104
bp = p;
tools/tools/ncpus/acpi.c
107
sum += *bp++;
tools/tools/netmap/nmreplay.c
1106
struct pipe_args bp[N_OPTS];
tools/tools/netmap/nmreplay.c
1111
bzero(&bp, sizeof(bp)); /* all data initially go here */
tools/tools/netmap/nmreplay.c
1123
struct _qs *qs = &bp[i].q;
tools/tools/netmap/nmreplay.c
1193
bp[0].q.burst = atoi(optarg);
tools/tools/netmap/nmreplay.c
1206
bp[0].wait_link = atoi(optarg);
tools/tools/netmap/nmreplay.c
1227
if (bp[0].q.burst < 1 || bp[0].q.burst > 8192) {
tools/tools/netmap/nmreplay.c
1228
WWW("invalid burst %d, set to 1024", bp[0].q.burst);
tools/tools/netmap/nmreplay.c
1229
bp[0].q.burst = 1024; // XXX 128 is probably better
tools/tools/netmap/nmreplay.c
1231
if (bp[0].wait_link > 100) {
tools/tools/netmap/nmreplay.c
1232
ED("invalid wait_link %d, set to 4", bp[0].wait_link);
tools/tools/netmap/nmreplay.c
1233
bp[0].wait_link = 4;
tools/tools/netmap/nmreplay.c
1236
bp[0].q.prod_ifname = pcap_file[0];
tools/tools/netmap/nmreplay.c
1237
bp[0].q.cons_ifname = ifname[0];
tools/tools/netmap/nmreplay.c
1240
bp[0].cons_core = cores[0];
tools/tools/netmap/nmreplay.c
1241
bp[0].prod_core = cores[1];
tools/tools/netmap/nmreplay.c
1246
struct _qs *qs = &bp[i].q;
tools/tools/netmap/nmreplay.c
1254
pthread_create(&bp[0].cons_tid, NULL, nmreplay_main, (void*)&bp[0]);
tools/tools/netmap/nmreplay.c
1258
struct _qs olda = bp[0].q;
tools/tools/netmap/nmreplay.c
1259
struct _qs *q0 = &bp[0].q;
tools/tools/netmap/nmreplay.c
1270
bp[0].q.rx_qmax = (bp[0].q.rx_qmax * 7)/8; // ewma
tools/tools/netmap/nmreplay.c
1271
bp[0].q.prod_max_gap = (bp[0].q.prod_max_gap * 7)/8; // ewma
usr.bin/cap_mkdb/cap_mkdb.c
150
char *bp, *p, *t;
usr.bin/cap_mkdb/cap_mkdb.c
154
for (reccnt = 0, bplen = 0; (st = cgetnext(&bp, ifiles)) > 0;) {
usr.bin/cap_mkdb/cap_mkdb.c
160
len = strlen(bp);
usr.bin/cap_mkdb/cap_mkdb.c
168
if ((p = strchr(bp, ':')) == NULL) {
usr.bin/cap_mkdb/cap_mkdb.c
169
warnx("no name field: %.*s", (int)MIN(len, 20), bp);
usr.bin/cap_mkdb/cap_mkdb.c
180
warnx("record not tc expanded: %.*s", (int)(p - bp),
usr.bin/cap_mkdb/cap_mkdb.c
181
bp);
usr.bin/cap_mkdb/cap_mkdb.c
186
memmove(&((u_char *)(data.data))[1], bp, len + 1);
usr.bin/cap_mkdb/cap_mkdb.c
190
key.data = bp;
usr.bin/cap_mkdb/cap_mkdb.c
191
key.size = p - bp;
usr.bin/cap_mkdb/cap_mkdb.c
206
if (strchr(bp, '|') == NULL)
usr.bin/cap_mkdb/cap_mkdb.c
216
for (p = t = bp;; ++p) {
usr.bin/chpass/edit.c
105
char *bp, *gecos, *p;
usr.bin/chpass/edit.c
149
if ((bp = gecos = strdup(pw->pw_gecos)) == NULL) {
usr.bin/chpass/edit.c
155
p = strsep(&bp, ",");
usr.bin/chpass/edit.c
161
p = strsep(&bp, ",");
usr.bin/chpass/edit.c
167
p = strsep(&bp, ",");
usr.bin/chpass/edit.c
173
p = strsep(&bp, ",");
usr.bin/chpass/edit.c
179
bp = strdup(bp ? bp : "");
usr.bin/chpass/edit.c
180
list[E_OTHER].save = bp;
usr.bin/chpass/edit.c
182
(void)fprintf(fp, "Other information: %s\n", bp);
usr.bin/compress/zopen.c
237
const u_char *bp;
usr.bin/compress/zopen.c
246
bp = (const u_char *)wbp;
usr.bin/compress/zopen.c
269
ent = *bp++;
usr.bin/compress/zopen.c
281
c = *bp++;
usr.bin/compress/zopen.c
369
char_type *bp;
usr.bin/compress/zopen.c
373
bp = buf;
usr.bin/compress/zopen.c
376
bp += (r_off >> 3);
usr.bin/compress/zopen.c
382
*bp = (*bp & rmask[r_off]) | ((ocode << r_off) & lmask[r_off]);
usr.bin/compress/zopen.c
383
bp++;
usr.bin/compress/zopen.c
388
*bp++ = ocode;
usr.bin/compress/zopen.c
394
*bp = ocode;
usr.bin/compress/zopen.c
397
bp = buf;
usr.bin/compress/zopen.c
400
if (fwrite(bp, sizeof(char), bits, fp) != bits)
usr.bin/compress/zopen.c
402
bp += bits;
usr.bin/compress/zopen.c
457
u_char *bp, header[3];
usr.bin/compress/zopen.c
464
bp = (u_char *)rbp;
usr.bin/compress/zopen.c
503
*bp++ = (u_char)finchar;
usr.bin/compress/zopen.c
547
*bp++ = *--stackp;
usr.bin/compress/zopen.c
576
char_type *bp;
usr.bin/compress/zopen.c
578
bp = gbuf;
usr.bin/compress/zopen.c
607
bp += (r_off >> 3);
usr.bin/compress/zopen.c
611
gcode = (*bp++ >> r_off);
usr.bin/compress/zopen.c
617
gcode |= *bp++ << r_off;
usr.bin/compress/zopen.c
624
gcode |= (*bp & rmask[bits]) << r_off;
usr.bin/ctags/fortran.c
136
char *bp;
usr.bin/ctags/fortran.c
138
for (len = 0, bp = lbp; *cp && (*cp &~ ' ') == (*bp++ &~ ' ');
usr.bin/finger/util.c
320
char *bp, name[1024];
usr.bin/finger/util.c
334
(void)strncpy(bp = tbuf, pw->pw_gecos, sizeof(tbuf));
usr.bin/finger/util.c
336
if (*bp == '*')
usr.bin/finger/util.c
337
++bp;
usr.bin/finger/util.c
340
if (!(p = strsep(&bp, ",")))
usr.bin/finger/util.c
358
pn->office = ((p = strsep(&bp, ",")) && *p) ?
usr.bin/finger/util.c
360
pn->officephone = ((p = strsep(&bp, ",")) && *p) ?
usr.bin/finger/util.c
362
pn->homephone = ((p = strsep(&bp, ",")) && *p) ?
usr.bin/gzip/unxz.c
47
off_t bytes_out, bp;
usr.bin/gzip/unxz.c
52
bytes_in = &bp;
usr.bin/gzip/zuncompress.c
217
u_char *bp, header[3];
usr.bin/gzip/zuncompress.c
224
bp = (u_char *)rbp;
usr.bin/gzip/zuncompress.c
307
*bp++ = *--zs->u.r.zs_stackp;
usr.bin/gzip/zuncompress.c
337
char_type *bp;
usr.bin/gzip/zuncompress.c
339
bp = zs->u.r.zs_gbuf;
usr.bin/gzip/zuncompress.c
376
bp += (r_off >> 3);
usr.bin/gzip/zuncompress.c
380
gcode = (*bp++ >> r_off);
usr.bin/gzip/zuncompress.c
386
gcode |= *bp++ << r_off;
usr.bin/gzip/zuncompress.c
392
gcode |= (*bp & rmask[bits]) << r_off;
usr.bin/hexdump/display.c
112
print(PR *pr, u_char *bp)
usr.bin/hexdump/display.c
132
conv_c(pr, bp, eaddress ? eaddress - address :
usr.bin/hexdump/display.c
136
(void)printf(pr->fmt, *bp);
usr.bin/hexdump/display.c
141
bcopy(bp, &f4, sizeof(f4));
usr.bin/hexdump/display.c
145
bcopy(bp, &f8, sizeof(f8));
usr.bin/hexdump/display.c
150
bcopy(bp, &ldbl, sizeof(ldbl));
usr.bin/hexdump/display.c
159
(void)printf(pr->fmt, (quad_t)(signed char)*bp);
usr.bin/hexdump/display.c
162
bcopy(bp, &s2, sizeof(s2));
usr.bin/hexdump/display.c
166
bcopy(bp, &s4, sizeof(s4));
usr.bin/hexdump/display.c
170
bcopy(bp, &s8, sizeof(s8));
usr.bin/hexdump/display.c
176
(void)printf(pr->fmt, isprint(*bp) ? *bp : '.');
usr.bin/hexdump/display.c
179
(void)printf(pr->fmt, (char *)bp);
usr.bin/hexdump/display.c
185
conv_u(pr, bp);
usr.bin/hexdump/display.c
190
(void)printf(pr->fmt, (u_quad_t)*bp);
usr.bin/hexdump/display.c
193
bcopy(bp, &u2, sizeof(u2));
usr.bin/hexdump/display.c
197
bcopy(bp, &u4, sizeof(u4));
usr.bin/hexdump/display.c
201
bcopy(bp, &u8, sizeof(u8));
usr.bin/hexdump/display.c
63
u_char *bp;
usr.bin/hexdump/display.c
68
while ((bp = get()))
usr.bin/hexdump/display.c
69
for (fs = fshead, savebp = bp, saveaddress = address; fs;
usr.bin/hexdump/display.c
70
fs = fs->nextfs, bp = savebp, address = saveaddress)
usr.bin/hexdump/display.c
76
bp += pr->bcnt, pr = pr->nextpr) {
usr.bin/hexdump/display.c
84
print(pr, bp);
usr.bin/join/join.c
268
char *bp, *buf = NULL, *fieldp;
usr.bin/join/join.c
326
bp = lp->line;
usr.bin/join/join.c
330
while ((fieldp = mbssep(&bp, tabchar)) != NULL) {
usr.bin/last/last.c
265
doentry(struct utmpx *bp)
usr.bin/last/last.c
270
if (bp->ut_type == BOOT_TIME || bp->ut_type == SHUTDOWN_TIME) {
usr.bin/last/last.c
276
currentout = -bp->ut_tv.tv_sec;
usr.bin/last/last.c
277
crmsg = bp->ut_type != SHUTDOWN_TIME ?
usr.bin/last/last.c
292
if (!snaptime && want(bp))
usr.bin/last/last.c
293
printentry(bp, NULL);
usr.bin/last/last.c
297
if (bp->ut_type == OLD_TIME || bp->ut_type == NEW_TIME) {
usr.bin/last/last.c
298
if (want(bp) && !snaptime)
usr.bin/last/last.c
299
printentry(bp, NULL);
usr.bin/last/last.c
303
if (bp->ut_type != USER_PROCESS && bp->ut_type != DEAD_PROCESS)
usr.bin/last/last.c
308
if (!memcmp(tt->id, bp->ut_id, sizeof bp->ut_id))
usr.bin/last/last.c
317
memcpy(tt->id, bp->ut_id, sizeof bp->ut_id);
usr.bin/last/last.c
325
if (bp->ut_type == USER_PROCESS && (want(bp) ||
usr.bin/last/last.c
326
(bp->ut_tv.tv_sec < snaptime &&
usr.bin/last/last.c
329
printentry(bp, tt);
usr.bin/last/last.c
331
tt->logout = bp->ut_tv.tv_sec;
usr.bin/last/last.c
342
printentry(struct utmpx *bp, struct idtab *tt)
usr.bin/last/last.c
355
t = bp->ut_tv.tv_sec;
usr.bin/last/last.c
360
switch (bp->ut_type) {
usr.bin/last/last.c
375
bp->ut_user, bp->ut_line, bp->ut_host);
usr.bin/last/last.c
395
delta = tt->logout - bp->ut_tv.tv_sec;
usr.bin/last/last.c
418
want(struct utmpx *bp)
usr.bin/last/last.c
431
if (bp->ut_type == BOOT_TIME ||
usr.bin/last/last.c
432
bp->ut_type == SHUTDOWN_TIME)
usr.bin/last/last.c
436
if (strcasecmp(step->name, bp->ut_host) == 0)
usr.bin/last/last.c
440
if (strcmp(step->name, bp->ut_line) == 0)
usr.bin/last/last.c
444
if (strcmp(step->name, bp->ut_user) == 0)
usr.bin/logins/logins.c
183
pwd_cmp_byname(const void *ap, const void *bp)
usr.bin/logins/logins.c
186
const struct passwd *b = bp;
usr.bin/logins/logins.c
192
pwd_cmp_byuid(const void *ap, const void *bp)
usr.bin/logins/logins.c
195
const struct passwd *b = bp;
usr.bin/m4/eval.c
725
bbase[ilevel] = bufbase = bp;
usr.bin/m4/extern.h
125
if (bp >= endpbb) \
usr.bin/m4/extern.h
127
*bp++ = (c); \
usr.bin/m4/extern.h
162
extern unsigned char *bp; /* first available character */
usr.bin/m4/main.c
287
bufbase = bp = buf; /* use the entire buffer */
usr.bin/m4/mdef.h
175
#define gpbc() (bp > bufbase) ? *--bp : obtain_char(infile+ilevel)
usr.bin/m4/misc.c
105
while (endpbb - bp <= (long)n)
usr.bin/m4/misc.c
108
*bp++ = s[--n];
usr.bin/m4/misc.c
168
bp = buf;
usr.bin/m4/misc.c
205
bp = (bp-buf)+newbuf;
usr.bin/m4/misc.c
455
return bp - buf;
usr.bin/m4/misc.c
464
for (s = bp; s-buf > (long)m;)
usr.bin/m4/misc.c
63
unsigned char *bp; /* first available character */
usr.bin/m4/misc.c
89
if (bp >= endpbb)
usr.bin/m4/misc.c
91
*bp++ = c;
usr.bin/mkuzip/mkuz_blockcache.c
103
assert((unsigned)lseek(fd, 0, SEEK_CUR) == bp->info.offset);
usr.bin/mkuzip/mkuz_blockcache.c
105
h = digest_fold(bp->info.digest);
usr.bin/mkuzip/mkuz_blockcache.c
110
if (bcep->hit.len != bp->info.len)
usr.bin/mkuzip/mkuz_blockcache.c
112
if (memcmp(bp->info.digest, bcep->hit.digest,
usr.bin/mkuzip/mkuz_blockcache.c
113
sizeof(bp->info.digest)) == 0) {
usr.bin/mkuzip/mkuz_blockcache.c
118
rval = verify_match(fd, bp, bcep);
usr.bin/mkuzip/mkuz_blockcache.c
123
I2J(bp->info.offset), I2J(bp->info.len));
usr.bin/mkuzip/mkuz_blockcache.c
144
bcep->hit = bp->info;
usr.bin/mkuzip/mkuz_blockcache.c
96
mkuz_blkcache_regblock(int fd, const struct mkuz_blk *bp)
usr.bin/mkuzip/mkuz_conveyor.c
100
MD5Final(bp->info.digest, &mcontext);
usr.bin/mkuzip/mkuz_conveyor.c
94
compute_digest(struct mkuz_blk *bp)
usr.bin/mkuzip/mkuz_conveyor.c
99
MD5Update(&mcontext, bp->data, bp->info.len);
usr.bin/mkuzip/mkuz_fqueue.c
122
struct mkuz_blk *bp;
usr.bin/mkuzip/mkuz_fqueue.c
157
bp = mip->this;
usr.bin/mkuzip/mkuz_fqueue.c
160
return bp;
usr.bin/mkuzip/mkuz_fqueue.c
167
struct mkuz_blk *bp;
usr.bin/mkuzip/mkuz_fqueue.c
186
bp = ip->this;
usr.bin/mkuzip/mkuz_fqueue.c
189
return bp;
usr.bin/mkuzip/mkuz_fqueue.c
60
mkuz_fqueue_enq(struct mkuz_fifo_queue *fqp, struct mkuz_blk *bp)
usr.bin/mkuzip/mkuz_fqueue.c
65
ip->this = bp;
usr.bin/mkuzip/mkuzip.c
105
cmp_blkno(const struct mkuz_blk *bp, void *p)
usr.bin/mkuzip/mkuzip.c
111
return (bp->info.blkno == *ap);
usr.bin/mt/mt.c
434
status(struct mtget *bp)
usr.bin/mt/mt.c
441
bp->mt_type);
usr.bin/mt/mt.c
444
if (mt->t_type == bp->mt_type)
usr.bin/mt/mt.c
448
st_status(bp);
usr.bin/mt/mt.c
451
mt->t_name, bp->mt_resid);
usr.bin/mt/mt.c
452
printreg("ds", (unsigned short)bp->mt_dsreg, mt->t_dsbits);
usr.bin/mt/mt.c
453
printreg("\ner", (unsigned short)bp->mt_erreg, mt->t_erbits);
usr.bin/mt/mt.c
604
st_status(struct mtget *bp)
usr.bin/mt/mt.c
614
denstostring(bp->mt_density), getblksiz(bp->mt_blksiz),
usr.bin/mt/mt.c
615
mt_density_bp(bp->mt_density, TRUE), comptostring(bp->mt_comp),
usr.bin/mt/mt.c
616
denstostring(bp->mt_density0), getblksiz(bp->mt_blksiz0),
usr.bin/mt/mt.c
617
mt_density_bp(bp->mt_density0, TRUE), comptostring(bp->mt_comp0),
usr.bin/mt/mt.c
618
denstostring(bp->mt_density1), getblksiz(bp->mt_blksiz1),
usr.bin/mt/mt.c
619
mt_density_bp(bp->mt_density1, TRUE), comptostring(bp->mt_comp1),
usr.bin/mt/mt.c
620
denstostring(bp->mt_density2), getblksiz(bp->mt_blksiz2),
usr.bin/mt/mt.c
621
mt_density_bp(bp->mt_density2, TRUE), comptostring(bp->mt_comp2),
usr.bin/mt/mt.c
622
denstostring(bp->mt_density3), getblksiz(bp->mt_blksiz3),
usr.bin/mt/mt.c
623
mt_density_bp(bp->mt_density3, TRUE), comptostring(bp->mt_comp3));
usr.bin/mt/mt.c
625
if (bp->mt_dsreg != MTIO_DSREG_NIL) {
usr.bin/mt/mt.c
630
state_str = get_driver_state_str(bp->mt_dsreg);
usr.bin/mt/mt.c
633
(void) sprintf(foo, "Unknown state 0x%x", bp->mt_dsreg);
usr.bin/mt/mt.c
639
if (bp->mt_resid == 0 && bp->mt_fileno == (daddr_t) -1 &&
usr.bin/mt/mt.c
640
bp->mt_blkno == (daddr_t) -1)
usr.bin/mt/mt.c
644
bp->mt_fileno, bp->mt_blkno, bp->mt_resid);
usr.bin/posixshmcontrol/posixshmcontrol.c
222
char *buf, *bp, *ep, jailpath[MAXPATHLEN], sizebuf[8], str[10];
usr.bin/posixshmcontrol/posixshmcontrol.c
300
for (bp = buf; bp < buf + len; bp += kif->kf_structsize) {
usr.bin/posixshmcontrol/posixshmcontrol.c
301
kif = (const struct kinfo_file *)(void *)bp;
usr.bin/tcopy/tcopy.cc
572
void *bp;
usr.bin/tcopy/tcopy.cc
575
if ((bp = malloc(blk)) == NULL)
usr.bin/tcopy/tcopy.cc
577
return ((char *)bp);
usr.bin/tee/tee.c
112
bp = buf;
usr.bin/tee/tee.c
114
if ((wval = write(p->fd, bp, n)) == -1) {
usr.bin/tee/tee.c
119
bp += wval;
usr.bin/tee/tee.c
63
char *bp, *buf;
usr.bin/tftp/main.c
736
const char *bp;
usr.bin/tftp/main.c
743
if ((bp = el_gets(el, &num)) == NULL || num == 0)
usr.bin/tftp/main.c
746
memcpy(line, bp, len);
usr.bin/tftp/main.c
748
history(hist, hep, H_ENTER, bp);
usr.bin/tip/tip/remote.c
111
cgetstr(bp, *p, *q);
usr.bin/tip/tip/remote.c
112
if (!BR && (cgetnum(bp, "br", &BR) == -1))
usr.bin/tip/tip/remote.c
114
if (!LD && (cgetnum(bp, "ld", &LD) == -1))
usr.bin/tip/tip/remote.c
116
if (cgetnum(bp, "fs", &FS) == -1)
usr.bin/tip/tip/remote.c
189
if (cgetnum(bp, "dl", &DL) == -1)
usr.bin/tip/tip/remote.c
191
if (cgetnum(bp, "cl", &CL) == -1)
usr.bin/tip/tip/remote.c
193
if (cgetnum(bp, "et", &ET) == -1)
usr.bin/tip/tip/remote.c
58
#define cgetflag(f) (cgetcap(bp, f, ':') != NULL)
usr.bin/tip/tip/remote.c
65
char **p, ***q, *bp, *rempath;
usr.bin/tip/tip/remote.c
79
if ((stat = cgetent(&bp, db_array, host)) < 0) {
usr.bin/tip/tip/tip.c
575
char *bp;
usr.bin/tip/tip/tip.c
577
bp = buf;
usr.bin/tip/tip/tip.c
580
*bp = partab[(*bp) & 0177];
usr.bin/tip/tip/tip.c
581
bp++;
usr.bin/tsort/tsort.c
180
grow_buf(void *bp, size_t size)
usr.bin/tsort/tsort.c
182
if ((bp = realloc(bp, size)) == NULL)
usr.bin/tsort/tsort.c
184
return (bp);
usr.bin/ul/ul.c
453
char *bp = tcapbuf;
usr.bin/ul/ul.c
456
CURS_UP = tgetstr("up", &bp);
usr.bin/ul/ul.c
457
CURS_RIGHT = tgetstr("ri", &bp);
usr.bin/ul/ul.c
459
CURS_RIGHT = tgetstr("nd", &bp);
usr.bin/ul/ul.c
460
CURS_LEFT = tgetstr("le", &bp);
usr.bin/ul/ul.c
462
CURS_LEFT = tgetstr("bc", &bp);
usr.bin/ul/ul.c
466
ENTER_STANDOUT = tgetstr("so", &bp);
usr.bin/ul/ul.c
467
EXIT_STANDOUT = tgetstr("se", &bp);
usr.bin/ul/ul.c
468
ENTER_UNDERLINE = tgetstr("us", &bp);
usr.bin/ul/ul.c
469
EXIT_UNDERLINE = tgetstr("ue", &bp);
usr.bin/ul/ul.c
470
ENTER_DIM = tgetstr("mh", &bp);
usr.bin/ul/ul.c
471
ENTER_BOLD = tgetstr("md", &bp);
usr.bin/ul/ul.c
472
ENTER_REVERSE = tgetstr("mr", &bp);
usr.bin/ul/ul.c
473
EXIT_ATTRIBUTES = tgetstr("me", &bp);
usr.bin/ul/ul.c
498
UNDER_CHAR = tgetstr("uc", &bp);
usr.bin/vmstat/vmstat.c
201
char *bp, *buf, *memf, *nlistf;
usr.bin/vmstat/vmstat.c
325
buf = bp = alloca(bufsize);
usr.bin/vmstat/vmstat.c
332
*bp++ = ' ';
usr.bin/vmstat/vmstat.c
333
memcpy(bp, namelist[c].n_name, len);
usr.bin/vmstat/vmstat.c
334
bp += len;
usr.bin/vmstat/vmstat.c
336
*bp = '\0';
usr.sbin/acpi/acpidump/acpi.c
2694
uint8_t *bp;
usr.sbin/acpi/acpidump/acpi.c
2697
bp = p;
usr.sbin/acpi/acpidump/acpi.c
2700
sum += *bp++;
usr.sbin/bhyve/gdb.c
1089
struct breakpoint *bp;
usr.sbin/bhyve/gdb.c
1091
TAILQ_FOREACH(bp, &breakpoints, link) {
usr.sbin/bhyve/gdb.c
1092
if (bp->gpa == gpa)
usr.sbin/bhyve/gdb.c
1093
return (bp);
usr.sbin/bhyve/gdb.c
1101
struct breakpoint *bp;
usr.sbin/bhyve/gdb.c
1114
bp = find_breakpoint(gpa);
usr.sbin/bhyve/gdb.c
1115
if (bp != NULL) {
usr.sbin/bhyve/gdb.c
1134
bp = find_breakpoint(gpa);
usr.sbin/bhyve/gdb.c
1135
if (bp == NULL) {
usr.sbin/bhyve/gdb.c
1501
struct breakpoint *bp, *nbp;
usr.sbin/bhyve/gdb.c
1507
TAILQ_FOREACH_SAFE(bp, &breakpoints, link, nbp) {
usr.sbin/bhyve/gdb.c
1508
debug("remove breakpoint at %#lx\n", bp->gpa);
usr.sbin/bhyve/gdb.c
1509
cp = paddr_guest2host(ctx, bp->gpa, sizeof(bp->shadow_inst));
usr.sbin/bhyve/gdb.c
1510
write_instr(cp, bp->shadow_inst, sizeof(bp->shadow_inst));
usr.sbin/bhyve/gdb.c
1511
TAILQ_REMOVE(&breakpoints, bp, link);
usr.sbin/bhyve/gdb.c
1512
free(bp);
usr.sbin/bhyve/gdb.c
1521
struct breakpoint *bp;
usr.sbin/bhyve/gdb.c
1541
cp = paddr_guest2host(ctx, gpa, sizeof(bp->shadow_inst));
usr.sbin/bhyve/gdb.c
1550
bp = find_breakpoint(gpa);
usr.sbin/bhyve/gdb.c
1557
if (bp == NULL) {
usr.sbin/bhyve/gdb.c
1563
bp = malloc(sizeof(*bp));
usr.sbin/bhyve/gdb.c
1564
bp->gpa = gpa;
usr.sbin/bhyve/gdb.c
1565
memcpy(bp->shadow_inst, cp, sizeof(bp->shadow_inst));
usr.sbin/bhyve/gdb.c
1566
write_instr(cp, GDB_BP_INSTR, sizeof(bp->shadow_inst));
usr.sbin/bhyve/gdb.c
1567
TAILQ_INSERT_TAIL(&breakpoints, bp, link);
usr.sbin/bhyve/gdb.c
1571
if (bp != NULL) {
usr.sbin/bhyve/gdb.c
1573
write_instr(cp, bp->shadow_inst,
usr.sbin/bhyve/gdb.c
1574
sizeof(bp->shadow_inst));
usr.sbin/bhyve/gdb.c
1575
TAILQ_REMOVE(&breakpoints, bp, link);
usr.sbin/bhyve/gdb.c
1576
free(bp);
usr.sbin/bhyve/pci_ahci.c
1268
uint8_t start_track, buf[20], *bp;
usr.sbin/bhyve/pci_ahci.c
1281
bp = buf + 2;
usr.sbin/bhyve/pci_ahci.c
1282
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1283
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1285
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1286
*bp++ = 0x14;
usr.sbin/bhyve/pci_ahci.c
1287
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1288
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1290
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1291
lba_to_msf(bp, 0);
usr.sbin/bhyve/pci_ahci.c
1292
bp += 3;
usr.sbin/bhyve/pci_ahci.c
1294
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1295
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1296
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1297
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1300
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1301
*bp++ = 0x14;
usr.sbin/bhyve/pci_ahci.c
1302
*bp++ = 0xaa;
usr.sbin/bhyve/pci_ahci.c
1303
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1307
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1308
lba_to_msf(bp, sectors);
usr.sbin/bhyve/pci_ahci.c
1309
bp += 3;
usr.sbin/bhyve/pci_ahci.c
1311
be32enc(bp, sectors);
usr.sbin/bhyve/pci_ahci.c
1312
bp += 4;
usr.sbin/bhyve/pci_ahci.c
1314
size = bp - buf;
usr.sbin/bhyve/pci_ahci.c
1343
uint8_t *bp, buf[50];
usr.sbin/bhyve/pci_ahci.c
1346
bp = buf + 2;
usr.sbin/bhyve/pci_ahci.c
1347
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1348
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1350
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1351
*bp++ = 0x14;
usr.sbin/bhyve/pci_ahci.c
1352
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1353
*bp++ = 0xa0;
usr.sbin/bhyve/pci_ahci.c
1354
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1355
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1356
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1357
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1358
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1359
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1360
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1362
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1363
*bp++ = 0x14;
usr.sbin/bhyve/pci_ahci.c
1364
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1365
*bp++ = 0xa1;
usr.sbin/bhyve/pci_ahci.c
1366
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1367
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1368
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1369
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1370
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1371
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1372
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1374
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1375
*bp++ = 0x14;
usr.sbin/bhyve/pci_ahci.c
1376
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1377
*bp++ = 0xa2;
usr.sbin/bhyve/pci_ahci.c
1378
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1379
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1380
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1384
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1385
lba_to_msf(bp, sectors);
usr.sbin/bhyve/pci_ahci.c
1386
bp += 3;
usr.sbin/bhyve/pci_ahci.c
1388
be32enc(bp, sectors);
usr.sbin/bhyve/pci_ahci.c
1389
bp += 4;
usr.sbin/bhyve/pci_ahci.c
1392
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1393
*bp++ = 0x14;
usr.sbin/bhyve/pci_ahci.c
1394
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1395
*bp++ = 1;
usr.sbin/bhyve/pci_ahci.c
1396
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1397
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1398
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1400
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1401
lba_to_msf(bp, 0);
usr.sbin/bhyve/pci_ahci.c
1402
bp += 3;
usr.sbin/bhyve/pci_ahci.c
1404
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1405
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1406
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1407
*bp++ = 0;
usr.sbin/bhyve/pci_ahci.c
1410
size = bp - buf;
usr.sbin/bhyve/pci_hda.c
107
uint32_t bp;
usr.sbin/bhyve/pci_hda.c
1162
assert(st->bp < bdl[st->be].len);
usr.sbin/bhyve/pci_hda.c
1170
(uint8_t *)bdle_desc->addr + st->bp);
usr.sbin/bhyve/pci_hda.c
1173
st->bp, *(uint32_t *)buf);
usr.sbin/bhyve/pci_hda.c
1176
st->bp += HDA_DMA_ACCESS_LEN;
usr.sbin/bhyve/pci_hda.c
1180
if (st->bp == bdle_desc->len) {
usr.sbin/bhyve/pci_hda.c
1181
st->bp = 0;
usr.sbin/bhyve/pci_hda.c
669
st->bp = 0;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1008
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1014
(bp = bridge_port_find(if_idx, bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1017
switch (bp->status) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1019
if (bridge_port_addm(bp, b_name) < 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
102
t1 != NULL && bp->sysindex == t1->sysindex;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1024
if (bridge_port_delm(bp, b_name) < 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1026
bridge_port_remove(bp, bif);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
104
if (bp->if_idx < t1->if_idx) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1040
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
105
TAILQ_INSERT_BEFORE(t1, bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1053
if ((bp = bridge_port_find(if_idx, bif)) == NULL) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1057
if ((bp = bridge_new_port(mif, bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1061
} else if (bp->status == RowStatus_active) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1064
ctx->scratch->int1 = bp->status;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1067
bp->span_enable = val->v.integer;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1068
bp->status = RowStatus_notInService;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
107
*f_bp = bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1079
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1092
if ((bp = bridge_port_index_get(&val->var, sub,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1101
if ((bp = bridge_port_index_getnext(&val->var, sub,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1103
bridge_port_index_append(&val->var, sub, bp) < 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1116
if ((bp = bridge_port_index_get(&val->var, sub,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1119
if ((bname = bridge_if_find_name(bp->sysindex)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1121
ctx->scratch->int1 = bp->priv_set;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1122
return (bridge_port_set_private(bname, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1140
if ((bp = bridge_port_index_get(&val->var, sub,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1143
if ((bname = bridge_if_find_name(bp->sysindex)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1145
return (bridge_port_set_private(bname, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1161
val->v.integer = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1165
val->v.integer = bp->if_idx;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1169
val->v.integer = bp->span_enable;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
117
TAILQ_INSERT_TAIL(headp, bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1173
val->v.uint32 = bp->dly_ex_drops;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1177
val->v.uint32 = bp->dly_mtu_drops;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1181
val->v.integer = bp->status;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1185
val->v.integer = bp->priv_set;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
119
TAILQ_INSERT_BEFORE(t1, bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1196
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1204
if ((bp = bridge_port_index_get(&val->var, sub, 0)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1209
if ((bp = bridge_port_index_getnext(&val->var, sub, 0)) ==
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1210
NULL || bridge_port_index_append(&val->var, sub, bp) < 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1215
if ((bp = bridge_port_index_get(&val->var, sub, 0)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1217
if ((b_name = bridge_if_find_name(bp->sysindex)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1225
ctx->scratch->int1 = bp->priority;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1226
if (bridge_port_set_priority(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1238
ctx->scratch->int1 = bp->enable;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1239
if (bridge_port_set_stp_enable(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1249
ctx->scratch->int1 = bp->path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1250
if (bridge_port_set_path_cost(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1267
if ((bp = bridge_port_index_get(&val->var, sub, 0)) == NULL ||
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1268
(b_name = bridge_if_find_name(bp->sysindex)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1273
bridge_port_set_priority(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1277
bridge_port_set_stp_enable(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1281
bridge_port_set_path_cost(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1295
val->v.integer = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1299
val->v.integer = bp->priority;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1303
val->v.integer = bp->state;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1307
val->v.integer = bp->enable;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1311
val->v.integer = bp->path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1315
return (string_get(val, bp->design_root, SNMP_BRIDGE_ID_LEN));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1318
val->v.integer = bp->design_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1322
return (string_get(val, bp->design_bridge, SNMP_BRIDGE_ID_LEN));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1325
return (string_get(val, bp->design_port, 2));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1328
val->v.uint32 = bp->fwd_trans;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1339
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1347
if ((bp = bridge_port_index_get(&val->var, sub, 0)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1352
if ((bp = bridge_port_index_getnext(&val->var, sub, 0)) ==
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1353
NULL || bridge_port_index_append(&val->var, sub, bp) < 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1358
if ((bp = bridge_port_index_get(&val->var, sub, 0)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1360
if ((b_name = bridge_if_find_name(bp->sysindex)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1369
ctx->scratch->int1 = bp->admin_edge;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1370
if (bridge_port_set_admin_edge(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1380
ctx->scratch->int1 = bp->admin_ptp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1381
if (bridge_port_set_admin_ptp(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1391
ctx->scratch->int1 = bp->admin_path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1392
if (bridge_port_set_path_cost(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1405
if ((bp = bridge_port_index_get(&val->var, sub, 0)) == NULL ||
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1406
(b_name = bridge_if_find_name(bp->sysindex)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1411
bridge_port_set_admin_edge(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1415
bridge_port_set_admin_ptp(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1419
bridge_port_set_path_cost(b_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1433
val->v.integer = bp->proto_migr;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1437
val->v.integer = bp->admin_edge;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1441
val->v.integer = bp->oper_edge;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1445
val->v.integer = bp->admin_ptp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1449
val->v.integer = bp->oper_ptp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1453
val->v.integer = bp->admin_path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1464
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1471
if ((bp = bridge_port_index_get(&val->var, sub, 0)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1476
if ((bp = bridge_port_index_getnext(&val->var, sub, 0)) ==
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1477
NULL || bridge_port_index_append(&val->var, sub, bp) < 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1493
val->v.integer = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1497
val->v.integer = bp->max_info;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1501
val->v.uint32 = bp->in_frames;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1505
val->v.uint32 = bp->out_frames;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
1509
val->v.uint32 = bp->in_drops;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
160
struct bridge_port *bp, struct bridge_port **f_bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
165
bridge_port_insert_at(headp, bp, f_bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
167
temp = bridge_port_find_pos(headp, bp->sysindex);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
170
TAILQ_INSERT_HEAD(headp, bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
172
TAILQ_INSERT_AFTER(headp, temp, bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
173
*f_bp = bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
212
bridge_port_next(struct bridge_port *bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
214
return (TAILQ_NEXT(bp, b_p));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
230
bridge_port_bif_next(struct bridge_port *bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
234
if ((bp_next = TAILQ_NEXT(bp, b_p)) == NULL ||
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
235
bp_next->sysindex != bp->sysindex)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
245
bridge_port_remove(struct bridge_port *bp, struct bridge_if *bif)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
247
if (bif->f_bp == bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
248
bif->f_bp = bridge_port_bif_next(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
250
TAILQ_REMOVE(&bridge_ports, bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
251
free(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
262
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
264
if ((bp = (struct bridge_port *) malloc(sizeof(*bp))) == NULL) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
270
bzero(bp, sizeof(*bp));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
272
bp->sysindex = bif->sysindex;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
273
bp->if_idx = mif->index;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
274
bp->port_no = mif->sysindex;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
275
strlcpy(bp->p_name, mif->name, IFNAMSIZ);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
276
bp->circuit = oid_zeroDotZero;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
283
bp->proto_migr = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
284
bp->admin_edge = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
285
bp->oper_edge = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
286
bp->oper_ptp = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
287
bp->admin_ptp = StpPortAdminPointToPointType_auto;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
289
bridge_port_memif_insert(&bridge_ports, bp, &(bif->f_bp));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
291
return (bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
298
bridge_port_getinfo_mibif(struct mibif *m_if, struct bridge_port *bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
300
bp->max_info = m_if->mib.ifmd_data.ifi_mtu;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
301
bp->in_frames = m_if->mib.ifmd_data.ifi_ipackets;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
302
bp->out_frames = m_if->mib.ifmd_data.ifi_opackets;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
303
bp->in_drops = m_if->mib.ifmd_data.ifi_iqdrops;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
313
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
315
for (bp = bif->f_bp; bp != NULL; bp = TAILQ_NEXT(bp, b_p)) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
316
if (bp->sysindex != bif->sysindex) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
317
bp = NULL;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
321
if (bp->if_idx == if_idx)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
325
return (bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
331
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
333
for (bp = bridge_port_bif_first(bif); bp != NULL;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
334
bp = bridge_port_bif_next(bp)) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
336
bp->p_name, bp->port_no);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
348
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
361
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
368
if ((bp = bridge_port_bif_first(bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
371
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
373
(bp = bridge_port_bif_next(bp)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
377
val->var.subs[sub] = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
392
val->v.integer = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
396
val->v.integer = bp->if_idx;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
400
val->v.oid = bp->circuit;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
404
val->v.uint32 = bp->dly_ex_drops;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
408
val->v.uint32 = bp->dly_mtu_drops;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
420
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
433
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
440
if ((bp = bridge_port_bif_first(bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
443
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
445
(bp = bridge_port_bif_next(bp)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
449
val->var.subs[sub] = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
455
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
464
ctx->scratch->int1 = bp->priority;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
465
if (bridge_port_set_priority(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
475
ctx->scratch->int1 = bp->enable;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
477
bp, val->v.integer) < 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
486
ctx->scratch->int1 = bp->path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
487
if (bridge_port_set_path_cost(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
504
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
509
bridge_port_set_priority(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
513
bridge_port_set_stp_enable(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
517
bridge_port_set_path_cost(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
531
val->v.integer = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
535
val->v.integer = bp->priority;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
539
val->v.integer = bp->state;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
543
val->v.integer = bp->enable;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
547
val->v.integer = bp->path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
551
return (string_get(val, bp->design_root,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
555
val->v.integer = bp->design_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
559
return (string_get(val, bp->design_bridge,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
563
return (string_get(val, bp->design_port, 2));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
566
val->v.uint32 = bp->fwd_trans;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
578
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
591
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
598
if ((bp = bridge_port_bif_first(bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
601
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
603
(bp = bridge_port_bif_next(bp)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
607
val->var.subs[sub] = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
613
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
62
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
623
ctx->scratch->int1 = bp->admin_edge;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
624
if (bridge_port_set_admin_edge(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
634
ctx->scratch->int1 = bp->admin_ptp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
635
if (bridge_port_set_admin_ptp(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
64
while ((bp = TAILQ_FIRST(headp)) != NULL) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
645
ctx->scratch->int1 = bp->admin_path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
646
if (bridge_port_set_path_cost(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
65
TAILQ_REMOVE(headp, bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
659
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
66
free(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
665
bridge_port_set_admin_edge(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
669
bridge_port_set_admin_ptp(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
673
bridge_port_set_path_cost(bif->bif_name, bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
687
val->v.integer = bp->proto_migr;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
691
val->v.integer = bp->admin_edge;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
695
val->v.integer = bp->oper_edge;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
699
val->v.integer = bp->admin_ptp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
703
val->v.integer = bp->oper_ptp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
707
val->v.integer = bp->admin_path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
719
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
732
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
739
if ((bp = bridge_port_bif_first(bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
742
if ((bp = bridge_port_find(val->var.subs[sub],
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
744
(bp = bridge_port_bif_next(bp)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
748
val->var.subs[sub] = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
763
val->v.integer = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
767
val->v.integer = bp->max_info;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
771
val->v.uint32 = bp->in_frames;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
775
val->v.uint32 = bp->out_frames;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
779
val->v.uint32 = bp->in_drops;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
78
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
795
const struct bridge_port *bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
800
if ((b_name = bridge_if_find_name(bp->sysindex)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
809
oid->subs[sub + i] = bp->port_no;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
81
bp = TAILQ_NEXT(bif->f_bp, b_p);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
824
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
839
if ((bp = bridge_port_find(port_no, bif)) == NULL ||
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
84
bif->f_bp = bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
840
(status == 0 && bp->status != RowStatus_active))
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
843
return (bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
856
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
859
bp = bridge_port_first();
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
872
(bp = bridge_port_find(port_no, bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
875
bp = bridge_port_next(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
879
return (bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
881
while (bp != NULL) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
882
if (bp->status == RowStatus_active)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
884
bp = bridge_port_next(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
887
return (bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
918
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
928
bp = bridge_port_find(if_idx, bif);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
932
if (bp == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
935
if (bp->span_enable == 0)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
938
ctx->scratch->int1 = bp->status;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
939
bp->status = RowStatus_active;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
943
if (bp == NULL || bp->span_enable == 0 ||
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
944
bp->status == RowStatus_active)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
947
ctx->scratch->int1 = bp->status;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
948
bp->status = RowStatus_notInService;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
95
struct bridge_port *bp, struct bridge_port **f_bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
956
if (bp != NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
959
if ((bp = bridge_new_port(mif, bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
963
bp->status = RowStatus_notReady;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
967
if (bp == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
970
ctx->scratch->int1 = bp->status;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
971
bp->status = RowStatus_destroy;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
985
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
991
(bp = bridge_port_find(if_idx, bif)) == NULL)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
995
bridge_port_remove(bp, bif);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
997
bp->status = ctx->scratch->int1;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
228
void bridge_port_remove(struct bridge_port *bp, struct bridge_if *bif);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
232
struct bridge_port *bridge_port_bif_next(struct bridge_port *bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
236
void bridge_port_getinfo_mibif(struct mibif *m_if, struct bridge_port *bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
322
int bridge_port_set_priority(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
326
int bridge_port_set_stp_enable(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
330
int bridge_port_set_path_cost(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
334
int bridge_port_set_admin_ptp(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
338
int bridge_port_set_admin_edge(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
342
int bridge_port_set_private(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
346
int bridge_port_addm(struct bridge_port *bp, const char *b_name);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
349
int bridge_port_delm(struct bridge_port *bp, const char *b_name);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1000
if (bp->span_enable == begemotBridgeBaseSpanEnabled_enabled)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1007
bp->p_name,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1020
bridge_port_delm(struct bridge_port *bp, const char *b_name)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1031
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1033
if (bp->span_enable == begemotBridgeBaseSpanEnabled_enabled)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1040
bp->p_name,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1179
struct bridge_port *bp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1190
if ((bp = bridge_new_port(m_if, bif)) != NULL) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1191
bp->status = RowStatus_active;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1192
bridge_port_getinfo_conf(b_req, bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1193
bridge_port_getinfo_mibif(m_if, bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1205
for (bp = bridge_port_bif_first(bif); bp != NULL;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1206
bp = bridge_port_bif_next(bp)) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1207
if ((bs_req = bridge_port_find_ifstplist(bp->port_no,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1209
bridge_port_clearinfo_opstp(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1211
bridge_port_getinfo_opstp(bs_req, bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1229
struct bridge_port *bp, *bp_next;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1247
if ((bp = bridge_port_find(m_if->index, bif)) == NULL &&
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1248
(bp = bridge_new_port(m_if, bif)) != NULL) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1249
bp->status = RowStatus_active;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1252
if (bp != NULL) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1254
bridge_port_getinfo_conf(b_req, bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1255
bridge_port_getinfo_mibif(m_if, bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1256
bp->flags |= BP_FOUND;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1262
for (bp = bridge_port_bif_first(bif); bp != NULL; bp = bp_next) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1263
bp_next = bridge_port_bif_next(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1265
if ((bp->flags & BP_FOUND) == 0 &&
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1266
bp->status == RowStatus_active)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1267
bridge_port_remove(bp, bif);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1269
bp->flags |= ~BP_FOUND;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1276
for (bp = bridge_port_bif_first(bif); bp != NULL;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1277
bp = bridge_port_bif_next(bp)) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1278
if ((bs_req = bridge_port_find_ifstplist(bp->port_no,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1280
bridge_port_clearinfo_opstp(bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
1282
bridge_port_getinfo_opstp(bs_req, bp);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
643
bridge_port_getinfo_conf(struct ifbreq *k_info, struct bridge_port *bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
645
bp->state = state2snmp_st(k_info->ifbr_state);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
646
bp->priority = k_info->ifbr_priority;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
659
bp->admin_path_cost = k_info->ifbr_path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
661
bp->admin_path_cost = 0;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
663
bp->path_cost = k_info->ifbr_path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
666
bp->enable = dot1dStpPortEnable_enabled;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
668
bp->enable = dot1dStpPortEnable_disabled;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
672
bp->span_enable = begemotBridgeBaseSpanEnabled_enabled;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
674
bp->span_enable = begemotBridgeBaseSpanEnabled_disabled;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
677
bp->priv_set = TruthValue_true;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
679
bp->priv_set = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
682
bp->admin_edge = TruthValue_true;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
684
bp->admin_edge = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
687
bp->oper_edge = TruthValue_true;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
689
bp->oper_edge = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
692
bp->admin_ptp = StpPortAdminPointToPointType_auto;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
694
bp->oper_ptp = TruthValue_true;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
696
bp->oper_ptp = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
698
bp->admin_ptp = StpPortAdminPointToPointType_forceTrue;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
699
bp->oper_ptp = TruthValue_true;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
701
bp->admin_ptp = StpPortAdminPointToPointType_forceFalse;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
702
bp->oper_ptp = TruthValue_false;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
711
bridge_port_getinfo_opstp(struct ifbpstpreq *bp_stp, struct bridge_port *bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
713
bp->enable = dot1dStpPortEnable_enabled;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
714
bp->fwd_trans = bp_stp->ifbp_fwd_trans;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
715
bp->design_cost = bp_stp->ifbp_design_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
716
snmp_uint64_to_bridgeid(bp_stp->ifbp_design_root, bp->design_root);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
717
snmp_uint64_to_bridgeid(bp_stp->ifbp_design_bridge, bp->design_bridge);
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
718
bcopy(&(bp_stp->ifbp_design_port), &(bp->design_port),
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
726
bridge_port_clearinfo_opstp(struct bridge_port *bp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
728
if (bp->enable == dot1dStpPortEnable_enabled) {
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
729
bp->design_cost = 0;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
730
bzero(&(bp->design_root), sizeof(bridge_id));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
731
bzero(&(bp->design_bridge), sizeof(bridge_id));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
732
bzero(&(bp->design_port), sizeof(port_id));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
733
bp->fwd_trans = 0;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
736
bp->enable = dot1dStpPortEnable_disabled;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
743
bridge_port_set_priority(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
752
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
759
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
763
bp->priority = priority;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
771
bridge_port_set_stp_enable(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
777
if (bp->enable == enable)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
784
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
789
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
801
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
805
bp->enable = enable;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
813
bridge_port_set_path_cost(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
826
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
833
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
837
bp->admin_path_cost = path_cost;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
846
bridge_port_set_admin_ptp(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
852
if (bp->admin_ptp == admin_ptp)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
859
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
864
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
885
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
889
bp->admin_ptp = admin_ptp;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
897
bridge_port_set_admin_edge(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
903
if (bp->admin_edge == enable)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
910
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
915
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
928
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
932
bp->admin_edge = enable;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
941
bridge_port_set_private(const char *bif_name, struct bridge_port *bp,
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
947
if (bp->priv_set == priv_set)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
954
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
959
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
973
"failed: %s", bp->p_name, strerror(errno));
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
977
bp->priv_set = priv_set;
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
987
bridge_port_addm(struct bridge_port *bp, const char *b_name)
usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
998
strlcpy(b_req.ifbr_ifsname, bp->p_name, sizeof(b_req.ifbr_ifsname));
usr.sbin/cdcontrol/cdcontrol.c
1168
const char *bp = NULL;
usr.sbin/cdcontrol/cdcontrol.c
1184
if ((bp = el_gets(el, &num)) == NULL || num == 0) {
usr.sbin/cdcontrol/cdcontrol.c
1191
memcpy(buf, bp, len);
usr.sbin/cdcontrol/cdcontrol.c
1193
history(hist, &he, H_ENTER, bp);
usr.sbin/jls/jls.c
372
char *ap, *bp;
usr.sbin/jls/jls.c
378
bp = strchr(paramb->jp_name, '.');
usr.sbin/jls/jls.c
379
if (ap && !bp)
usr.sbin/jls/jls.c
381
if (bp && !ap)
usr.sbin/lpr/common_source/printcap.c
140
char *bp;
usr.sbin/lpr/common_source/printcap.c
143
status = cgetfirst(&bp, printcapdb);
usr.sbin/lpr/common_source/printcap.c
151
status = getprintcap_int(bp, pp);
usr.sbin/lpr/common_source/printcap.c
152
free(bp);
usr.sbin/lpr/common_source/printcap.c
162
char *bp;
usr.sbin/lpr/common_source/printcap.c
165
status = cgetnext(&bp, printcapdb);
usr.sbin/lpr/common_source/printcap.c
173
status = getprintcap_int(bp, pp);
usr.sbin/lpr/common_source/printcap.c
174
free(bp);
usr.sbin/lpr/common_source/printcap.c
205
getprintcap_int(char *bp, struct printer *pp)
usr.sbin/lpr/common_source/printcap.c
211
if ((pp->printer = capdb_canonical_name(bp)) == NULL)
usr.sbin/lpr/common_source/printcap.c
215
CHK(capdb_getaltstr(bp, "af", "acct.file", 0, &pp->acct_file));
usr.sbin/lpr/common_source/printcap.c
216
CHK(capdb_getaltnum(bp, "br", "tty.rate", 0, &pp->baud_rate));
usr.sbin/lpr/common_source/printcap.c
217
CHK(capdb_getaltnum(bp, "ct", "remote.timeout", DEFTIMEOUT,
usr.sbin/lpr/common_source/printcap.c
219
CHK(capdb_getaltnum(bp, "du", "daemon.user", DEFUID,
usr.sbin/lpr/common_source/printcap.c
221
CHK(capdb_getaltstr(bp, "ff", "job.formfeed", DEFFF, &pp->form_feed));
usr.sbin/lpr/common_source/printcap.c
222
CHK(capdb_getaltstr(bp, "lf", "spool.log", _PATH_CONSOLE,
usr.sbin/lpr/common_source/printcap.c
224
CHK(capdb_getaltstr(bp, "lo", "spool.lock", DEFLOCK, &pp->lock_file));
usr.sbin/lpr/common_source/printcap.c
225
CHK(capdb_getaltstr(bp, "lp", "tty.device", _PATH_DEFDEVLP, &pp->lp));
usr.sbin/lpr/common_source/printcap.c
226
CHK(capdb_getaltnum(bp, "mc", "max.copies", DEFMAXCOPIES,
usr.sbin/lpr/common_source/printcap.c
228
CHK(capdb_getaltstr(bp, "ms", "tty.mode", 0, &pp->mode_set));
usr.sbin/lpr/common_source/printcap.c
229
CHK(capdb_getaltnum(bp, "mx", "max.blocks", DEFMX, &pp->max_blocks));
usr.sbin/lpr/common_source/printcap.c
230
CHK(capdb_getaltnum(bp, "pc", "acct.price", 0, &pp->price100));
usr.sbin/lpr/common_source/printcap.c
231
CHK(capdb_getaltnum(bp, "pl", "page.length", DEFLENGTH,
usr.sbin/lpr/common_source/printcap.c
233
CHK(capdb_getaltnum(bp, "pw", "page.width", DEFWIDTH,
usr.sbin/lpr/common_source/printcap.c
235
CHK(capdb_getaltnum(bp, "px", "page.pwidth", 0, &pp->page_pwidth));
usr.sbin/lpr/common_source/printcap.c
236
CHK(capdb_getaltnum(bp, "py", "page.plength", 0, &pp->page_plength));
usr.sbin/lpr/common_source/printcap.c
237
CHK(capdb_getaltstr(bp, "rg", "daemon.restrictgrp", 0,
usr.sbin/lpr/common_source/printcap.c
239
CHK(capdb_getaltstr(bp, "rm", "remote.host", 0, &pp->remote_host));
usr.sbin/lpr/common_source/printcap.c
240
CHK(capdb_getaltstr(bp, "rp", "remote.queue", DEFLP,
usr.sbin/lpr/common_source/printcap.c
242
CHK(capdb_getaltstr(bp, "sd", "spool.dir", _PATH_DEFSPOOL,
usr.sbin/lpr/common_source/printcap.c
244
CHK(capdb_getaltstr(bp, "sr", "stat.recv", 0, &pp->stat_recv));
usr.sbin/lpr/common_source/printcap.c
245
CHK(capdb_getaltstr(bp, "ss", "stat.send", 0, &pp->stat_send));
usr.sbin/lpr/common_source/printcap.c
246
CHK(capdb_getaltstr(bp, "st", "spool.status", DEFSTAT,
usr.sbin/lpr/common_source/printcap.c
248
CHK(capdb_getaltstr(bp, "tr", "job.trailer", 0, &pp->trailer));
usr.sbin/lpr/common_source/printcap.c
250
pp->resend_copies = capdb_getaltlog(bp, "rc", "remote.resend_copies");
usr.sbin/lpr/common_source/printcap.c
251
pp->restricted = capdb_getaltlog(bp, "rs", "daemon.restricted");
usr.sbin/lpr/common_source/printcap.c
252
pp->short_banner = capdb_getaltlog(bp, "sb", "banner.short");
usr.sbin/lpr/common_source/printcap.c
253
pp->no_copies = capdb_getaltlog(bp, "sc", "job.no_copies");
usr.sbin/lpr/common_source/printcap.c
254
pp->no_formfeed = capdb_getaltlog(bp, "sf", "job.no_formfeed");
usr.sbin/lpr/common_source/printcap.c
255
pp->no_header = capdb_getaltlog(bp, "sh", "banner.disable");
usr.sbin/lpr/common_source/printcap.c
256
pp->header_last = capdb_getaltlog(bp, "hl", "banner.last");
usr.sbin/lpr/common_source/printcap.c
257
pp->rw = capdb_getaltlog(bp, "rw", "tty.rw");
usr.sbin/lpr/common_source/printcap.c
258
pp->tof = !capdb_getaltlog(bp, "fo", "job.topofform");
usr.sbin/lpr/common_source/printcap.c
267
CHK((error = capdb_getaltstr(bp, "rp", "remote.queue", 0, &rp_name)));
usr.sbin/lpr/common_source/printcap.c
269
if (cgetmatch(bp,rp_name) != 0)
usr.sbin/lpr/common_source/printcap.c
278
CHK(capdb_getaltstr(bp, filters[filt], longfilters[filt], 0,
usr.sbin/lpr/common_source/printcap.c
364
capdb_getaltstr(char *bp, const char *shrt, const char *lng,
usr.sbin/lpr/common_source/printcap.c
369
status = cgetstr(bp, lng, result);
usr.sbin/lpr/common_source/printcap.c
372
status = cgetstr(bp, shrt, result);
usr.sbin/lpr/common_source/printcap.c
388
capdb_getaltnum(char *bp, const char *shrt, const char *lng, long dflt,
usr.sbin/lpr/common_source/printcap.c
393
status = cgetnum(bp, lng, result);
usr.sbin/lpr/common_source/printcap.c
396
status = cgetnum(bp, shrt, result);
usr.sbin/lpr/common_source/printcap.c
408
capdb_getaltlog(char *bp, const char *shrt, const char *lng)
usr.sbin/lpr/common_source/printcap.c
410
if (cgetcap(bp, lng, ':'))
usr.sbin/lpr/common_source/printcap.c
412
if (cgetcap(bp, shrt, ':'))
usr.sbin/lpr/common_source/printcap.c
424
capdb_canonical_name(const char *bp)
usr.sbin/lpr/common_source/printcap.c
429
nameend = strpbrk(bp, "|:");
usr.sbin/lpr/common_source/printcap.c
431
nameend = bp + 1;
usr.sbin/lpr/common_source/printcap.c
432
if ((retval = malloc(nameend - bp + 1)) != NULL) {
usr.sbin/lpr/common_source/printcap.c
434
strncat(retval, bp, nameend - bp);
usr.sbin/lpr/common_source/printcap.c
94
char *bp;
usr.sbin/lpr/common_source/printcap.c
96
if ((status = cgetent(&bp, printcapdb, printer)) < 0)
usr.sbin/lpr/common_source/printcap.c
98
status = getprintcap_int(bp, pp);
usr.sbin/lpr/common_source/printcap.c
99
free(bp);
usr.sbin/lpr/lpc/lpc.c
143
const char *bp;
usr.sbin/lpr/lpc/lpc.c
146
bp = NULL;
usr.sbin/lpr/lpc/lpc.c
170
if ((bp = el_gets(el, &num)) == NULL || num == 0)
usr.sbin/lpr/lpc/lpc.c
174
memcpy(cmdline, bp, len);
usr.sbin/lpr/lpc/lpc.c
176
history(hist, &he, H_ENTER, bp);
usr.sbin/makefs/ffs.c
1047
errno = ffs_balloc(&in, offset, chunk, &bp);
usr.sbin/makefs/ffs.c
1056
memcpy(bp->b_data, p, chunk);
usr.sbin/makefs/ffs.c
1057
errno = bwrite(bp);
usr.sbin/makefs/ffs.c
970
struct m_buf * bp;
usr.sbin/makefs/ffs/buf.c
113
bp->b_bcount = 0;
usr.sbin/makefs/ffs/buf.c
117
TAILQ_REMOVE(&buftail, bp, b_tailq);
usr.sbin/makefs/ffs/buf.c
118
free(bp->b_data);
usr.sbin/makefs/ffs/buf.c
119
free(bp);
usr.sbin/makefs/ffs/buf.c
123
bwrite(struct m_buf *bp)
usr.sbin/makefs/ffs/buf.c
129
fsinfo_t *fs = bp->b_fs;
usr.sbin/makefs/ffs/buf.c
131
assert (bp != NULL);
usr.sbin/makefs/ffs/buf.c
132
offset = (off_t)bp->b_blkno * fs->sectorsize + fs->offset;
usr.sbin/makefs/ffs/buf.c
133
bytes = (size_t)bp->b_bcount;
usr.sbin/makefs/ffs/buf.c
136
(long long)bp->b_blkno, (long long) offset, bytes);
usr.sbin/makefs/ffs/buf.c
137
if (lseek(bp->b_fs->fd, offset, SEEK_SET) == -1) {
usr.sbin/makefs/ffs/buf.c
138
brelse(bp);
usr.sbin/makefs/ffs/buf.c
141
rv = write(bp->b_fs->fd, bp->b_data, bytes);
usr.sbin/makefs/ffs/buf.c
145
bp->b_bcount, (long long)offset, (long long)rv);
usr.sbin/makefs/ffs/buf.c
146
brelse(bp);
usr.sbin/makefs/ffs/buf.c
157
struct m_buf *bp;
usr.sbin/makefs/ffs/buf.c
169
TAILQ_FOREACH(bp, &buftail, b_tailq) {
usr.sbin/makefs/ffs/buf.c
171
(long long)bp->b_lblkno, (long long)bp->b_blkno,
usr.sbin/makefs/ffs/buf.c
172
bp->b_bcount, bp->b_bufsize);
usr.sbin/makefs/ffs/buf.c
182
struct m_buf *bp;
usr.sbin/makefs/ffs/buf.c
189
bp = NULL;
usr.sbin/makefs/ffs/buf.c
196
TAILQ_FOREACH(bp, &buftail, b_tailq) {
usr.sbin/makefs/ffs/buf.c
197
if (bp->b_lblkno != blkno)
usr.sbin/makefs/ffs/buf.c
202
if (bp == NULL) {
usr.sbin/makefs/ffs/buf.c
203
bp = ecalloc(1, sizeof(*bp));
usr.sbin/makefs/ffs/buf.c
204
bp->b_bufsize = 0;
usr.sbin/makefs/ffs/buf.c
205
bp->b_blkno = bp->b_lblkno = blkno;
usr.sbin/makefs/ffs/buf.c
206
bp->b_fs = vp->fs;
usr.sbin/makefs/ffs/buf.c
207
bp->b_data = NULL;
usr.sbin/makefs/ffs/buf.c
208
TAILQ_INSERT_HEAD(&buftail, bp, b_tailq);
usr.sbin/makefs/ffs/buf.c
210
bp->b_bcount = size;
usr.sbin/makefs/ffs/buf.c
211
if (bp->b_data == NULL || bp->b_bcount > bp->b_bufsize) {
usr.sbin/makefs/ffs/buf.c
212
n = erealloc(bp->b_data, (size_t)size);
usr.sbin/makefs/ffs/buf.c
214
bp->b_data = n;
usr.sbin/makefs/ffs/buf.c
215
bp->b_bufsize = size;
usr.sbin/makefs/ffs/buf.c
218
return (bp);
usr.sbin/makefs/ffs/buf.c
93
brelse(struct m_buf *bp)
usr.sbin/makefs/ffs/buf.c
96
assert (bp != NULL);
usr.sbin/makefs/ffs/buf.c
97
assert (bp->b_data != NULL);
usr.sbin/makefs/ffs/buf.c
99
if (bp->b_lblkno < 0) {
usr.sbin/makefs/ffs/buf.h
73
#define bdwrite(bp) bwrite(bp)
usr.sbin/makefs/ffs/buf.h
74
#define clrbuf(bp) memset((bp)->b_data, 0, (u_int)(bp)->b_bcount)
usr.sbin/makefs/ffs/ffs_alloc.c
292
struct m_buf *bp;
usr.sbin/makefs/ffs/ffs_alloc.c
301
(int)fs->fs_cgsize, NULL, &bp);
usr.sbin/makefs/ffs/ffs_alloc.c
305
cgp = (struct cg *)bp->b_data;
usr.sbin/makefs/ffs/ffs_alloc.c
308
brelse(bp);
usr.sbin/makefs/ffs/ffs_alloc.c
312
bno = ffs_alloccgblk(ip, bp, bpref);
usr.sbin/makefs/ffs/ffs_alloc.c
313
bdwrite(bp);
usr.sbin/makefs/ffs/ffs_alloc.c
331
brelse(bp);
usr.sbin/makefs/ffs/ffs_alloc.c
334
bno = ffs_alloccgblk(ip, bp, bpref);
usr.sbin/makefs/ffs/ffs_alloc.c
344
bdwrite(bp);
usr.sbin/makefs/ffs/ffs_alloc.c
358
bdwrite(bp);
usr.sbin/makefs/ffs/ffs_alloc.c
374
ffs_alloccgblk(struct inode *ip, struct m_buf *bp, daddr_t bpref)
usr.sbin/makefs/ffs/ffs_alloc.c
383
cgp = (struct cg *)bp->b_data;
usr.sbin/makefs/ffs/ffs_alloc.c
426
struct m_buf *bp;
usr.sbin/makefs/ffs/ffs_alloc.c
444
(int)fs->fs_cgsize, NULL, &bp);
usr.sbin/makefs/ffs/ffs_alloc.c
448
cgp = (struct cg *)bp->b_data;
usr.sbin/makefs/ffs/ffs_alloc.c
450
brelse(bp);
usr.sbin/makefs/ffs/ffs_alloc.c
506
bdwrite(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
190
bp = getblk((void *)ip->i_devvp, lbn, nsize,
usr.sbin/makefs/ffs/ffs_balloc.c
192
bp->b_blkno = fsbtodb(fs, newb);
usr.sbin/makefs/ffs/ffs_balloc.c
193
clrbuf(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
194
*bpp = bp;
usr.sbin/makefs/ffs/ffs_balloc.c
229
bp = getblk((void *)ip->i_devvp, indirs[1].in_lbn,
usr.sbin/makefs/ffs/ffs_balloc.c
231
bp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
232
clrbuf(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
237
if ((error = bwrite(bp)) != 0)
usr.sbin/makefs/ffs/ffs_balloc.c
249
fs->fs_bsize, NULL, &bp);
usr.sbin/makefs/ffs/ffs_balloc.c
251
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
254
bap = (int32_t *)bp->b_data;
usr.sbin/makefs/ffs/ffs_balloc.c
260
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
267
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
282
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
287
bwrite(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
298
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
316
bwrite(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
319
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
338
struct m_buf *bp, *nbp;
usr.sbin/makefs/ffs/ffs_balloc.c
447
bp = getblk((void *)ip->i_devvp, lbn, nsize,
usr.sbin/makefs/ffs/ffs_balloc.c
449
bp->b_blkno = fsbtodb(fs, newb);
usr.sbin/makefs/ffs/ffs_balloc.c
450
clrbuf(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
451
*bpp = bp;
usr.sbin/makefs/ffs/ffs_balloc.c
486
bp = getblk((void *)ip->i_devvp, indirs[1].in_lbn,
usr.sbin/makefs/ffs/ffs_balloc.c
488
bp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
489
clrbuf(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
494
if ((error = bwrite(bp)) != 0)
usr.sbin/makefs/ffs/ffs_balloc.c
506
fs->fs_bsize, NULL, &bp);
usr.sbin/makefs/ffs/ffs_balloc.c
508
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
511
bap = (int64_t *)bp->b_data;
usr.sbin/makefs/ffs/ffs_balloc.c
517
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
524
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
539
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
544
bwrite(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
555
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
573
bwrite(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
576
brelse(bp);
usr.sbin/makefs/ffs/ffs_balloc.c
81
struct m_buf *bp, *nbp;
usr.sbin/makefs/msdos/msdosfs_denode.c
152
error = m_readep(pmp, dirclust, diroffset, &bp, &direntptr);
usr.sbin/makefs/msdos/msdosfs_denode.c
160
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_denode.c
215
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_denode.c
274
pmp->pm_bpcluster, 0, &bp);
usr.sbin/makefs/msdos/msdosfs_denode.c
276
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_denode.c
282
memset(bp->b_data + boff, 0, pmp->pm_bpcluster - boff);
usr.sbin/makefs/msdos/msdosfs_denode.c
283
bwrite(bp);
usr.sbin/makefs/msdos/msdosfs_denode.c
90
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_fat.c
1038
bp = getblk((void *)pmp->pm_devvp,
usr.sbin/makefs/msdos/msdosfs_fat.c
1041
clrbuf(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
1043
*bpp = bp;
usr.sbin/makefs/msdos/msdosfs_fat.c
1046
bdwrite(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
141
struct m_buf *bp = NULL;
usr.sbin/makefs/msdos/msdosfs_fat.c
203
if (bp)
usr.sbin/makefs/msdos/msdosfs_fat.c
204
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
206
NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
208
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
215
if (bp)
usr.sbin/makefs/msdos/msdosfs_fat.c
216
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
220
cn = getulong(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
222
cn = getushort(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
238
if (bp)
usr.sbin/makefs/msdos/msdosfs_fat.c
239
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
251
if (bp)
usr.sbin/makefs/msdos/msdosfs_fat.c
252
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
309
updatefats(struct msdosfsmount *pmp, struct m_buf *bp, u_long fatbn)
usr.sbin/makefs/msdos/msdosfs_fat.c
315
printf("updatefats(pmp %p, bp %p, fatbn %lu)\n", pmp, bp, fatbn);
usr.sbin/makefs/msdos/msdosfs_fat.c
339
bp->b_bcount, 0, 0, 0);
usr.sbin/makefs/msdos/msdosfs_fat.c
340
memcpy(bpn->b_data, bp->b_data, bp->b_bcount);
usr.sbin/makefs/msdos/msdosfs_fat.c
357
bwrite(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
359
bdwrite(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
453
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_fat.c
491
error = bread((void *)pmp->pm_devvp, bn, bsize, NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
493
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
499
readcn = getulong(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
501
readcn = getushort(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
513
readcn = getushort(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
521
putushort(bp->b_data + bo, readcn);
usr.sbin/makefs/msdos/msdosfs_fat.c
524
putushort(bp->b_data + bo, newcontents);
usr.sbin/makefs/msdos/msdosfs_fat.c
531
readcn = getulong(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
534
putulong(bp->b_data + bo, readcn);
usr.sbin/makefs/msdos/msdosfs_fat.c
537
updatefats(pmp, bp, bn);
usr.sbin/makefs/msdos/msdosfs_fat.c
538
bp = NULL;
usr.sbin/makefs/msdos/msdosfs_fat.c
541
if (bp)
usr.sbin/makefs/msdos/msdosfs_fat.c
542
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
559
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_fat.c
574
error = bread((void *)pmp->pm_devvp, bn, bsize, NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
576
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
584
readcn = getushort(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
592
putushort(bp->b_data + bo, readcn);
usr.sbin/makefs/msdos/msdosfs_fat.c
598
putushort(bp->b_data + bo, newc);
usr.sbin/makefs/msdos/msdosfs_fat.c
602
readcn = getulong(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
605
putulong(bp->b_data + bo, readcn);
usr.sbin/makefs/msdos/msdosfs_fat.c
612
updatefats(pmp, bp, bn);
usr.sbin/makefs/msdos/msdosfs_fat.c
810
struct m_buf *bp = NULL;
usr.sbin/makefs/msdos/msdosfs_fat.c
818
if (bp)
usr.sbin/makefs/msdos/msdosfs_fat.c
819
updatefats(pmp, bp, lbn);
usr.sbin/makefs/msdos/msdosfs_fat.c
821
NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
823
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
83
static void updatefats(struct msdosfsmount *pmp, struct m_buf *bp,
usr.sbin/makefs/msdos/msdosfs_fat.c
831
readcn = getushort(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
841
putushort(bp->b_data + bo, readcn);
usr.sbin/makefs/msdos/msdosfs_fat.c
844
cluster = getushort(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
845
putushort(bp->b_data + bo, MSDOSFSFREE);
usr.sbin/makefs/msdos/msdosfs_fat.c
848
cluster = getulong(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
849
putulong(bp->b_data + bo,
usr.sbin/makefs/msdos/msdosfs_fat.c
857
if (bp)
usr.sbin/makefs/msdos/msdosfs_fat.c
858
updatefats(pmp, bp, bn);
usr.sbin/makefs/msdos/msdosfs_fat.c
869
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_fat.c
873
bp = NULL;
usr.sbin/makefs/msdos/msdosfs_fat.c
893
if (bp != NULL)
usr.sbin/makefs/msdos/msdosfs_fat.c
894
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
897
NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
902
readcn = getulong(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
904
readcn = getushort(bp->b_data + bo);
usr.sbin/makefs/msdos/msdosfs_fat.c
919
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
924
if (bp != NULL)
usr.sbin/makefs/msdos/msdosfs_fat.c
925
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_fat.c
957
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_lookup.c
126
&bp)) != 0) {
usr.sbin/makefs/msdos/msdosfs_lookup.c
129
ndep = bptoep(pmp, bp, ddep->de_fndoffset);
usr.sbin/makefs/msdos/msdosfs_lookup.c
144
if ((error = bwrite(bp)) != 0)
usr.sbin/makefs/msdos/msdosfs_lookup.c
156
NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_lookup.c
160
ndep = bptoep(pmp, bp, ddep->de_fndoffset);
usr.sbin/makefs/msdos/msdosfs_lookup.c
171
if ((error = bwrite(bp)) != 0)
usr.sbin/makefs/msdos/msdosfs_lookup.c
246
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_lookup.c
271
NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_lookup.c
275
for (dentp = (struct direntry *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_lookup.c
276
(char *)dentp < bp->b_data + blsize;
usr.sbin/makefs/msdos/msdosfs_lookup.c
282
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_lookup.c
295
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_lookup.c
82
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
254
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
255
bp = NULL;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
269
pmp->pm_BytesPerSec, 0, &bp)) != 0)
usr.sbin/makefs/msdos/msdosfs_vfsops.c
271
fp = (struct fsinfo *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
278
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
279
bp = NULL;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
331
if (bp)
usr.sbin/makefs/msdos/msdosfs_vfsops.c
332
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
363
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
371
pmp->pm_BytesPerSec, NOCRED, &bp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
373
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
376
fp = (struct fsinfo *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
380
error = bwrite(bp);
usr.sbin/makefs/msdos/msdosfs_vfsops.c
77
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_vfsops.c
87
if ((error = bread((void *)devvp, 0, secsize, 0, &bp)) != 0)
usr.sbin/makefs/msdos/msdosfs_vfsops.c
90
bsp = (union bootsector *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vnops.c
157
struct m_buf *bp = 0;
usr.sbin/makefs/msdos/msdosfs_vnops.c
212
error = bread((void *)pmp->pm_devvp, bn, blsize, 0, &bp);
usr.sbin/makefs/msdos/msdosfs_vnops.c
219
dep = (struct direntry *)(bp->b_data + blkoff);
usr.sbin/makefs/msdos/msdosfs_vnops.c
241
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_vnops.c
301
brelse(bp);
usr.sbin/makefs/msdos/msdosfs_vnops.c
413
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_vnops.c
418
error = m_readde(dep, &bp, &dirp);
usr.sbin/makefs/msdos/msdosfs_vnops.c
422
error = bwrite(bp);
usr.sbin/makefs/msdos/msdosfs_vnops.c
437
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_vnops.c
491
&bp)) != 0) {
usr.sbin/makefs/msdos/msdosfs_vnops.c
496
memcpy(bp->b_data + on, dat + offs, cpsize);
usr.sbin/makefs/msdos/msdosfs_vnops.c
497
bwrite(bp);
usr.sbin/makefs/msdos/msdosfs_vnops.c
544
struct m_buf *bp;
usr.sbin/makefs/msdos/msdosfs_vnops.c
580
bp = getblk((void *)pmp->pm_devvp, bn, pmp->pm_bpcluster, 0, 0, 0);
usr.sbin/makefs/msdos/msdosfs_vnops.c
581
memset(bp->b_data, 0, pmp->pm_bpcluster);
usr.sbin/makefs/msdos/msdosfs_vnops.c
582
memcpy(bp->b_data, &dosdirtemplate, sizeof dosdirtemplate);
usr.sbin/makefs/msdos/msdosfs_vnops.c
583
denp = (struct direntry *)bp->b_data;
usr.sbin/makefs/msdos/msdosfs_vnops.c
611
if ((error = bwrite(bp)) != 0)
usr.sbin/makefs/zfs.c
695
blkptr_t *bp, *pbp;
usr.sbin/makefs/zfs.c
727
bp = buf;
usr.sbin/makefs/zfs.c
730
fill += BP_GET_FILL(&bp[i]);
usr.sbin/makefs/zfs/objset.c
130
blkptr_t *bp;
usr.sbin/makefs/zfs/objset.c
137
bp = dnode_cursor_next(zfs, c,
usr.sbin/makefs/zfs/objset.c
140
0, fill, chunk->buf + i, DNODE_BLOCK_SIZE, loc, bp);
usr.sbin/makefs/zfs/objset.c
260
objset_root_blkptr_copy(const zfs_objset_t *os, blkptr_t *bp)
usr.sbin/makefs/zfs/objset.c
262
memcpy(bp, &os->osbp, sizeof(blkptr_t));
usr.sbin/makefs/zfs/vdev.c
115
blkptr_t *bp)
usr.sbin/makefs/zfs/vdev.c
122
blkptr_set(bp, loc, sz, datatype, level, fill, cksumtype, &cksum);
usr.sbin/makefs/zfs/vdev.c
128
uint64_t fill, const void *data, off_t sz, off_t loc, blkptr_t *bp)
usr.sbin/makefs/zfs/vdev.c
131
data, sz, loc, bp);
usr.sbin/makefs/zfs/vdev.c
49
blkptr_set(blkptr_t *bp, off_t off, off_t size, uint8_t dntype, uint8_t level,
usr.sbin/makefs/zfs/vdev.c
56
BP_ZERO(bp);
usr.sbin/makefs/zfs/vdev.c
57
BP_SET_LSIZE(bp, size);
usr.sbin/makefs/zfs/vdev.c
58
BP_SET_PSIZE(bp, size);
usr.sbin/makefs/zfs/vdev.c
59
BP_SET_CHECKSUM(bp, cksumt);
usr.sbin/makefs/zfs/vdev.c
60
BP_SET_COMPRESS(bp, ZIO_COMPRESS_OFF);
usr.sbin/makefs/zfs/vdev.c
61
BP_SET_BYTEORDER(bp, ZFS_HOST_BYTEORDER);
usr.sbin/makefs/zfs/vdev.c
62
BP_SET_BIRTH(bp, TXG, TXG);
usr.sbin/makefs/zfs/vdev.c
63
BP_SET_LEVEL(bp, level);
usr.sbin/makefs/zfs/vdev.c
64
BP_SET_FILL(bp, fill);
usr.sbin/makefs/zfs/vdev.c
65
BP_SET_TYPE(bp, dntype);
usr.sbin/makefs/zfs/vdev.c
67
dva = BP_IDENTITY(bp);
usr.sbin/makefs/zfs/vdev.c
71
memcpy(&bp->blk_cksum, cksum, sizeof(*cksum));
usr.sbin/makefs/zfs/zfs.h
151
blkptr_t *bp);
usr.sbin/makefs/zfs/zfs.h
153
uint64_t fill, const void *data, off_t sz, off_t loc, blkptr_t *bp);
usr.sbin/mtest/mtest.c
736
uint8_t *bp = (uint8_t *)&sources[0];
usr.sbin/mtest/mtest.c
738
fprintf(stderr, "%02x", bp[j]);
usr.sbin/pkg/rsa.c
49
BIO *bp;
usr.sbin/pkg/rsa.c
52
bp = BIO_new_file(file, "r");
usr.sbin/pkg/rsa.c
53
if (!bp)
usr.sbin/pkg/rsa.c
56
if ((pkey = PEM_read_bio_PUBKEY(bp, NULL, NULL, NULL)) == NULL)
usr.sbin/pkg/rsa.c
59
BIO_free(bp);
usr.sbin/pkg/rsa.c
68
BIO *bp;
usr.sbin/pkg/rsa.c
71
bp = BIO_new_mem_buf(__DECONST(void *, cert), certlen);
usr.sbin/pkg/rsa.c
73
if ((pkey = PEM_read_bio_PUBKEY(bp, NULL, NULL, NULL)) == NULL)
usr.sbin/pkg/rsa.c
76
BIO_free(bp);
usr.sbin/ppp/acf.c
102
m_settype(bp, MB_ACFIN);
usr.sbin/ppp/acf.c
108
bp = mbuf_Read(bp, cp, 2);
usr.sbin/ppp/acf.c
109
m_settype(bp, MB_ACFIN);
usr.sbin/ppp/acf.c
113
return bp;
usr.sbin/ppp/acf.c
59
acf_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/acf.c
65
bp = m_prepend(bp, cp, 2, 0);
usr.sbin/ppp/acf.c
66
m_settype(bp, MB_ACFOUT);
usr.sbin/ppp/acf.c
69
return bp;
usr.sbin/ppp/acf.c
73
acf_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/acf.c
81
return bp;
usr.sbin/ppp/acf.c
84
if (mbuf_View(bp, cp, 2) == 2) {
usr.sbin/ppp/acf.c
87
bp = mbuf_Read(bp, cp, 2);
usr.sbin/ppp/acf.c
92
m_freem(bp);
usr.sbin/ppp/acf.c
99
m_freem(bp);
usr.sbin/ppp/async.c
102
async_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/async.c
111
if (!p || m_length(bp) > HDLCSIZE) {
usr.sbin/ppp/async.c
112
m_freem(bp);
usr.sbin/ppp/async.c
116
oldcnt = m_length(bp);
usr.sbin/ppp/async.c
120
wp = bp;
usr.sbin/ppp/async.c
127
m_freem(bp);
usr.sbin/ppp/async.c
136
m_freem(bp);
usr.sbin/ppp/async.c
137
bp = m_get(cnt, MB_ASYNCOUT);
usr.sbin/ppp/async.c
138
memcpy(MBUF_CTOP(bp), p->async.xbuff, cnt);
usr.sbin/ppp/async.c
139
bp->priv = cnt - oldcnt;
usr.sbin/ppp/async.c
140
log_DumpBp(LogASYNC, "Write", bp);
usr.sbin/ppp/async.c
142
return bp;
usr.sbin/ppp/async.c
148
struct mbuf *bp;
usr.sbin/ppp/async.c
157
bp = m_get(async->length, MB_ASYNCIN);
usr.sbin/ppp/async.c
158
mbuf_Write(bp, async->hbuff, async->length);
usr.sbin/ppp/async.c
160
return bp;
usr.sbin/ppp/async.c
189
async_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/async.c
199
return bp;
usr.sbin/ppp/async.c
204
log_DumpBp(LogASYNC, "Read", bp);
usr.sbin/ppp/async.c
205
while (bp) {
usr.sbin/ppp/async.c
206
ch = MBUF_CTOP(bp);
usr.sbin/ppp/async.c
207
for (cnt = bp->m_len; cnt; cnt--) {
usr.sbin/ppp/async.c
212
bp = m_free(bp);
usr.sbin/ppp/auth.c
444
auth_ReadHeader(struct authinfo *authp, struct mbuf *bp)
usr.sbin/ppp/auth.c
448
len = m_length(bp);
usr.sbin/ppp/auth.c
450
bp = mbuf_Read(bp, (u_char *)&authp->in.hdr, sizeof authp->in.hdr);
usr.sbin/ppp/auth.c
452
return bp;
usr.sbin/ppp/auth.c
462
m_freem(bp);
usr.sbin/ppp/auth.c
467
auth_ReadName(struct authinfo *authp, struct mbuf *bp, size_t len)
usr.sbin/ppp/auth.c
472
size_t mlen = m_length(bp);
usr.sbin/ppp/auth.c
478
bp = mbuf_Read(bp, (u_char *)authp->in.name, len);
usr.sbin/ppp/auth.c
480
return bp;
usr.sbin/ppp/auth.c
485
m_freem(bp);
usr.sbin/ppp/cbcp.c
199
struct mbuf *bp;
usr.sbin/ppp/cbcp.c
201
bp = m_get(sizeof *head + data->length, MB_CBCPOUT);
usr.sbin/ppp/cbcp.c
202
head = (struct cbcp_header *)MBUF_CTOP(bp);
usr.sbin/ppp/cbcp.c
206
memcpy(MBUF_CTOP(bp) + sizeof *head, data, data->length);
usr.sbin/ppp/cbcp.c
207
log_DumpBp(LogDEBUG, "cbcp_Output", bp);
usr.sbin/ppp/cbcp.c
208
link_PushPacket(&cbcp->p->link, bp, cbcp->p->dl->bundle,
usr.sbin/ppp/cbcp.c
622
cbcp_Input(struct bundle *bundle __unused, struct link *l, struct mbuf *bp)
usr.sbin/ppp/cbcp.c
632
m_freem(bp);
usr.sbin/ppp/cbcp.c
636
bp = m_pullup(bp);
usr.sbin/ppp/cbcp.c
637
len = m_length(bp);
usr.sbin/ppp/cbcp.c
639
m_freem(bp);
usr.sbin/ppp/cbcp.c
642
head = (struct cbcp_header *)MBUF_CTOP(bp);
usr.sbin/ppp/cbcp.c
646
m_freem(bp);
usr.sbin/ppp/cbcp.c
649
m_settype(bp, MB_CBCPIN);
usr.sbin/ppp/cbcp.c
653
bp->m_offset += sizeof(struct cbcp_header);
usr.sbin/ppp/cbcp.c
654
bp->m_len -= sizeof(struct cbcp_header);
usr.sbin/ppp/cbcp.c
655
data = (struct cbcp_data *)MBUF_CTOP(bp);
usr.sbin/ppp/cbcp.c
741
m_freem(bp);
usr.sbin/ppp/ccp.c
674
ccp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/ccp.c
677
m_settype(bp, MB_CCPIN);
usr.sbin/ppp/ccp.c
679
fsm_Input(&l->ccp.fsm, bp);
usr.sbin/ppp/ccp.c
684
m_freem(bp);
usr.sbin/ppp/ccp.c
718
ccp_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/ccp.c
727
m_freem(bp);
usr.sbin/ppp/ccp.c
728
bp = NULL;
usr.sbin/ppp/ccp.c
731
bp = (*algorithm[l->ccp.out.algorithm]->o.Write)
usr.sbin/ppp/ccp.c
732
(l->ccp.out.state, &l->ccp, l, pri, proto, bp);
usr.sbin/ppp/ccp.c
735
m_settype(bp, MB_ICOMPDOUT);
usr.sbin/ppp/ccp.c
738
m_settype(bp, MB_COMPDOUT);
usr.sbin/ppp/ccp.c
744
return bp;
usr.sbin/ppp/ccp.c
748
ccp_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/ccp.c
763
bp = (*algorithm[l->ccp.in.algorithm]->i.Read)
usr.sbin/ppp/ccp.c
764
(l->ccp.in.state, &l->ccp, proto, bp);
usr.sbin/ppp/ccp.c
767
m_settype(bp, MB_ICOMPDIN);
usr.sbin/ppp/ccp.c
770
m_settype(bp, MB_COMPDIN);
usr.sbin/ppp/ccp.c
773
return bp;
usr.sbin/ppp/ccp.c
775
m_freem(bp);
usr.sbin/ppp/ccp.c
776
bp = NULL;
usr.sbin/ppp/ccp.c
780
(l->ccp.in.state, &l->ccp, *proto, bp);
usr.sbin/ppp/ccp.c
784
return bp;
usr.sbin/ppp/chap.c
105
struct mbuf *bp;
usr.sbin/ppp/chap.c
111
bp = m_get(plen, MB_CHAPOUT);
usr.sbin/ppp/chap.c
112
memcpy(MBUF_CTOP(bp), &lh, sizeof(struct fsmheader));
usr.sbin/ppp/chap.c
114
memcpy(MBUF_CTOP(bp) + sizeof(struct fsmheader), ptr, count);
usr.sbin/ppp/chap.c
115
log_DumpBp(LogDEBUG, "ChapOutput", bp);
usr.sbin/ppp/chap.c
120
link_PushPacket(&physical->link, bp, physical->dl->bundle,
usr.sbin/ppp/chap.c
693
chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/chap.c
707
m_freem(bp);
usr.sbin/ppp/chap.c
714
m_freem(bp);
usr.sbin/ppp/chap.c
718
m_settype(bp, MB_CHAPIN);
usr.sbin/ppp/chap.c
719
if ((bp = auth_ReadHeader(&chap->auth, bp)) == NULL &&
usr.sbin/ppp/chap.c
726
len = m_length(bp);
usr.sbin/ppp/chap.c
736
m_freem(bp);
usr.sbin/ppp/chap.c
746
bp = mbuf_Read(bp, &alen, 1);
usr.sbin/ppp/chap.c
750
m_freem(bp);
usr.sbin/ppp/chap.c
754
bp = mbuf_Read(bp, chap->challenge.peer + 1, alen);
usr.sbin/ppp/chap.c
755
bp = auth_ReadName(&chap->auth, bp, len);
usr.sbin/ppp/chap.c
768
bp = mbuf_Read(bp, &alen, 1);
usr.sbin/ppp/chap.c
772
m_freem(bp);
usr.sbin/ppp/chap.c
777
m_freem(bp);
usr.sbin/ppp/chap.c
781
bp = mbuf_Read(bp, ans + 1, alen);
usr.sbin/ppp/chap.c
782
bp = auth_ReadName(&chap->auth, bp, len);
usr.sbin/ppp/chap.c
794
m_freem(bp);
usr.sbin/ppp/chap.c
797
bp = mbuf_Read(bp, ans, len);
usr.sbin/ppp/chap.c
970
m_freem(bp);
usr.sbin/ppp/fsm.c
1001
bp = m_pullup(m_append(bp, "", 1));
usr.sbin/ppp/fsm.c
1002
cp = MBUF_CTOP(bp);
usr.sbin/ppp/fsm.c
1011
m_freem(bp);
usr.sbin/ppp/fsm.c
1016
struct mbuf *bp)
usr.sbin/ppp/fsm.c
1018
m_freem(bp);
usr.sbin/ppp/fsm.c
1022
FsmRecvResetReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1033
m_freem(bp);
usr.sbin/ppp/fsm.c
1037
FsmRecvResetAck(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1040
m_freem(bp);
usr.sbin/ppp/fsm.c
1044
fsm_Input(struct fsm *fp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
1050
len = m_length(bp);
usr.sbin/ppp/fsm.c
1052
m_freem(bp);
usr.sbin/ppp/fsm.c
1055
bp = mbuf_Read(bp, &lh, sizeof lh);
usr.sbin/ppp/fsm.c
1060
m_freem(bp);
usr.sbin/ppp/fsm.c
1072
bp = m_prepend(bp, &lh, sizeof lh, 0);
usr.sbin/ppp/fsm.c
1073
bp = m_pullup(bp);
usr.sbin/ppp/fsm.c
1074
fsm_Output(fp, CODE_CODEREJ, id++, MBUF_CTOP(bp), bp->m_len, MB_UNKNOWN);
usr.sbin/ppp/fsm.c
1075
m_freem(bp);
usr.sbin/ppp/fsm.c
1094
(*codep->recv)(fp, &lh, bp);
usr.sbin/ppp/fsm.c
193
struct mbuf *bp;
usr.sbin/ppp/fsm.c
214
bp = m_get(plen, mtype);
usr.sbin/ppp/fsm.c
215
memcpy(MBUF_CTOP(bp), &lh, sizeof(struct fsmheader));
usr.sbin/ppp/fsm.c
217
memcpy(MBUF_CTOP(bp) + sizeof(struct fsmheader), ptr, count);
usr.sbin/ppp/fsm.c
218
log_DumpBp(LogDEBUG, "fsm_Output", bp);
usr.sbin/ppp/fsm.c
219
link_PushPacket(fp->link, bp, fp->bundle, LINK_QUEUES(fp->link) - 1,
usr.sbin/ppp/fsm.c
466
FsmRecvConfigReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
474
bp = m_pullup(bp);
usr.sbin/ppp/fsm.c
475
plen = m_length(bp);
usr.sbin/ppp/fsm.c
480
m_freem(bp);
usr.sbin/ppp/fsm.c
493
cp = MBUF_CTOP(bp);
usr.sbin/ppp/fsm.c
509
bp = m_prepend(bp, lhp, sizeof *lhp, 2);
usr.sbin/ppp/fsm.c
510
bp = proto_Prepend(bp, fp->proto, 0, 0);
usr.sbin/ppp/fsm.c
511
bp = m_pullup(bp);
usr.sbin/ppp/fsm.c
512
lcp_SendProtoRej(&fp->link->lcp, MBUF_CTOP(bp), bp->m_len);
usr.sbin/ppp/fsm.c
513
m_freem(bp);
usr.sbin/ppp/fsm.c
520
m_freem(bp);
usr.sbin/ppp/fsm.c
524
m_freem(bp);
usr.sbin/ppp/fsm.c
530
m_freem(bp);
usr.sbin/ppp/fsm.c
591
m_freem(bp);
usr.sbin/ppp/fsm.c
609
FsmRecvConfigAck(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
616
plen = m_length(bp);
usr.sbin/ppp/fsm.c
619
m_freem(bp);
usr.sbin/ppp/fsm.c
623
bp = m_pullup(bp);
usr.sbin/ppp/fsm.c
627
cp = MBUF_CTOP(bp);
usr.sbin/ppp/fsm.c
668
m_freem(bp);
usr.sbin/ppp/fsm.c
672
FsmRecvConfigNak(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
679
plen = m_length(bp);
usr.sbin/ppp/fsm.c
682
m_freem(bp);
usr.sbin/ppp/fsm.c
694
m_freem(bp);
usr.sbin/ppp/fsm.c
699
m_freem(bp);
usr.sbin/ppp/fsm.c
703
m_freem(bp);
usr.sbin/ppp/fsm.c
707
bp = m_pullup(bp);
usr.sbin/ppp/fsm.c
711
cp = MBUF_CTOP(bp);
usr.sbin/ppp/fsm.c
734
m_freem(bp);
usr.sbin/ppp/fsm.c
738
FsmRecvTermReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
770
m_freem(bp);
usr.sbin/ppp/fsm.c
774
FsmRecvTermAck(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
798
m_freem(bp);
usr.sbin/ppp/fsm.c
802
FsmRecvConfigRej(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
810
plen = m_length(bp);
usr.sbin/ppp/fsm.c
813
m_freem(bp);
usr.sbin/ppp/fsm.c
827
m_freem(bp);
usr.sbin/ppp/fsm.c
832
m_freem(bp);
usr.sbin/ppp/fsm.c
836
m_freem(bp);
usr.sbin/ppp/fsm.c
840
bp = m_pullup(bp);
usr.sbin/ppp/fsm.c
844
cp = MBUF_CTOP(bp);
usr.sbin/ppp/fsm.c
866
m_freem(bp);
usr.sbin/ppp/fsm.c
871
struct mbuf *bp)
usr.sbin/ppp/fsm.c
873
m_freem(bp);
usr.sbin/ppp/fsm.c
877
FsmRecvProtoRej(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
882
if (m_length(bp) < 2) {
usr.sbin/ppp/fsm.c
883
m_freem(bp);
usr.sbin/ppp/fsm.c
886
bp = mbuf_Read(bp, &proto, 2);
usr.sbin/ppp/fsm.c
945
m_freem(bp);
usr.sbin/ppp/fsm.c
949
FsmRecvEchoReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/fsm.c
955
bp = m_pullup(bp);
usr.sbin/ppp/fsm.c
956
m_settype(bp, MB_ECHOIN);
usr.sbin/ppp/fsm.c
959
cp = MBUF_CTOP(bp);
usr.sbin/ppp/fsm.c
973
m_freem(bp);
usr.sbin/ppp/fsm.c
977
FsmRecvEchoRep(struct fsm *fp, struct fsmheader *lhp __unused, struct mbuf *bp)
usr.sbin/ppp/fsm.c
980
bp = lqr_RecvEcho(fp, bp);
usr.sbin/ppp/fsm.c
982
m_freem(bp);
usr.sbin/ppp/fsm.c
987
struct mbuf *bp)
usr.sbin/ppp/fsm.c
989
m_freem(bp);
usr.sbin/ppp/fsm.c
993
FsmRecvIdent(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
usr.sbin/ppp/hdlc.c
142
struct mbuf *bp, int pri __unused, u_short *proto __unused)
usr.sbin/ppp/hdlc.c
148
m_settype(bp, MB_HDLCOUT);
usr.sbin/ppp/hdlc.c
149
fcs = HdlcFcsBuf(INITFCS, bp);
usr.sbin/ppp/hdlc.c
152
for (last = bp; last->m_next; last = last->m_next)
usr.sbin/ppp/hdlc.c
167
log_DumpBp(LogHDLC, "hdlc_Output", bp);
usr.sbin/ppp/hdlc.c
169
return bp;
usr.sbin/ppp/hdlc.c
301
hdlc_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/hdlc.c
310
return bp;
usr.sbin/ppp/hdlc.c
313
log_DumpBp(LogHDLC, "hdlc_LayerPull:", bp);
usr.sbin/ppp/hdlc.c
315
bp = m_pullup(bp);
usr.sbin/ppp/hdlc.c
316
len = m_length(bp);
usr.sbin/ppp/hdlc.c
317
fcs = hdlc_Fcs(MBUF_CTOP(bp), len);
usr.sbin/ppp/hdlc.c
327
m_freem(bp);
usr.sbin/ppp/hdlc.c
336
m_freem(bp);
usr.sbin/ppp/hdlc.c
337
bp = NULL;
usr.sbin/ppp/hdlc.c
340
bp = m_adj(bp, -2); /* discard the FCS */
usr.sbin/ppp/hdlc.c
341
m_settype(bp, MB_HDLCIN);
usr.sbin/ppp/hdlc.c
343
return bp;
usr.sbin/ppp/ip.c
908
ip_Input(struct bundle *bundle, struct link *l, struct mbuf *bp, u_int32_t af)
usr.sbin/ppp/ip.c
916
nb = m_length(bp);
usr.sbin/ppp/ip.c
920
m_freem(bp);
usr.sbin/ppp/ip.c
923
mbuf_Read(bp, tun.data, nb);
usr.sbin/ppp/ip.c
958
ipv4_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/ip.c
964
m_freem(bp);
usr.sbin/ppp/ip.c
968
m_settype(bp, MB_IPIN);
usr.sbin/ppp/ip.c
970
nb = ip_Input(bundle, l, bp, AF_INET);
usr.sbin/ppp/ip.c
978
ipv6_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/ip.c
984
m_freem(bp);
usr.sbin/ppp/ip.c
988
m_settype(bp, MB_IPV6IN);
usr.sbin/ppp/ip.c
990
nb = ip_Input(bundle, l, bp, AF_INET6);
usr.sbin/ppp/ipcp.c
1341
ipcp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/ipcp.c
1344
m_settype(bp, MB_IPCPIN);
usr.sbin/ppp/ipcp.c
1346
fsm_Input(&bundle->ncp.ipcp.fsm, bp);
usr.sbin/ppp/ipcp.c
1351
m_freem(bp);
usr.sbin/ppp/ipcp.c
1446
struct mbuf *bp;
usr.sbin/ppp/ipcp.c
1465
bp = m_dequeue(queue);
usr.sbin/ppp/ipcp.c
1466
bp = mbuf_Read(bp, &secs, sizeof secs);
usr.sbin/ppp/ipcp.c
1467
bp = m_pullup(bp);
usr.sbin/ppp/ipcp.c
1468
m_len = m_length(bp);
usr.sbin/ppp/ipcp.c
1469
if (!FilterCheck(MBUF_CTOP(bp), AF_INET, &bundle->filter.alive,
usr.sbin/ppp/ipcp.c
1475
link_PushPacket(l, bp, bundle, 0, PROTO_IP);
usr.sbin/ppp/ipv6cp.c
351
ipv6cp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/ipv6cp.c
354
m_settype(bp, MB_IPV6CPIN);
usr.sbin/ppp/ipv6cp.c
356
fsm_Input(&bundle->ncp.ipv6cp.fsm, bp);
usr.sbin/ppp/ipv6cp.c
361
m_freem(bp);
usr.sbin/ppp/ipv6cp.c
425
struct mbuf *bp;
usr.sbin/ppp/ipv6cp.c
444
bp = m_dequeue(queue);
usr.sbin/ppp/ipv6cp.c
445
bp = mbuf_Read(bp, &secs, sizeof secs);
usr.sbin/ppp/ipv6cp.c
446
bp = m_pullup(bp);
usr.sbin/ppp/ipv6cp.c
447
m_len = m_length(bp);
usr.sbin/ppp/ipv6cp.c
448
if (!FilterCheck(MBUF_CTOP(bp), AF_INET6, &bundle->filter.alive,
usr.sbin/ppp/ipv6cp.c
454
link_PushPacket(l, bp, bundle, 0, PROTO_IPV6);
usr.sbin/ppp/lcp.c
1299
lcp_Input(struct bundle *bundle __unused, struct link *l, struct mbuf *bp)
usr.sbin/ppp/lcp.c
1302
m_settype(bp, MB_LCPIN);
usr.sbin/ppp/lcp.c
1303
fsm_Input(&l->lcp.fsm, bp);
usr.sbin/ppp/link.c
182
struct mbuf *bp;
usr.sbin/ppp/link.c
184
for (bp = NULL, pri = LINK_QUEUES(l) - 1; pri >= 0; pri--)
usr.sbin/ppp/link.c
186
bp = m_dequeue(l->Queue + pri);
usr.sbin/ppp/link.c
193
return bp;
usr.sbin/ppp/link.c
248
link_PushPacket(struct link *l, struct mbuf *bp, struct bundle *b, int pri,
usr.sbin/ppp/link.c
263
bp->priv = 0; /* Adjusted by the async layer ! */
usr.sbin/ppp/link.c
264
for (layer = l->nlayers; layer && bp; layer--)
usr.sbin/ppp/link.c
266
bp = (*l->layer[layer - 1]->push)(b, l, bp, pri, &proto);
usr.sbin/ppp/link.c
268
if (bp) {
usr.sbin/ppp/link.c
269
link_AddOutOctets(l, m_length(bp));
usr.sbin/ppp/link.c
271
m_enqueue(l->Queue + pri, m_pullup(bp));
usr.sbin/ppp/link.c
278
struct mbuf *bp, *lbp[LAYER_MAX], *next;
usr.sbin/ppp/link.c
307
bp = lbp[layer];
usr.sbin/ppp/link.c
308
lbp[layer] = bp->m_nextpkt;
usr.sbin/ppp/link.c
309
bp->m_nextpkt = NULL;
usr.sbin/ppp/link.c
313
bp = (*l->layer[layer]->pull)(b, l, bp, &proto);
usr.sbin/ppp/link.c
317
while (bp) {
usr.sbin/ppp/link.c
318
next = bp->m_nextpkt;
usr.sbin/ppp/link.c
319
bp->m_nextpkt = NULL;
usr.sbin/ppp/link.c
321
Despatch(b, l, bp, proto);
usr.sbin/ppp/link.c
322
bp = next;
usr.sbin/ppp/link.c
325
lbp[++layer] = bp;
usr.sbin/ppp/link.c
373
Despatch(struct bundle *bundle, struct link *l, struct mbuf *bp, u_short proto)
usr.sbin/ppp/link.c
379
bp = (*despatcher[f].fn)(bundle, l, bp);
usr.sbin/ppp/link.c
383
if (bp) {
usr.sbin/ppp/link.c
389
bp = m_pullup(proto_Prepend(bp, proto, 0, 0));
usr.sbin/ppp/link.c
390
lcp_SendProtoRej(&l->lcp, MBUF_CTOP(bp), bp->m_len);
usr.sbin/ppp/link.c
395
m_freem(bp);
usr.sbin/ppp/log.c
363
log_DumpBp(int lev, const char *hdr, const struct mbuf *bp)
usr.sbin/ppp/log.c
377
f = bp->m_len;
usr.sbin/ppp/log.c
378
ptr = CONST_MBUF_CTOP(bp);
usr.sbin/ppp/log.c
392
} while ((bp = bp->m_next) != NULL);
usr.sbin/ppp/lqr.c
123
m_length(bp), (long)sizeof(struct echolqr));
usr.sbin/ppp/lqr.c
124
return bp;
usr.sbin/ppp/lqr.c
142
struct mbuf *bp;
usr.sbin/ppp/lqr.c
147
bp = m_get(sizeof(struct lqrdata) + extra, MB_LQROUT);
usr.sbin/ppp/lqr.c
148
bp->m_len -= extra;
usr.sbin/ppp/lqr.c
149
bp->m_offset += extra;
usr.sbin/ppp/lqr.c
158
link_PushPacket(lcp->fsm.link, bp, lcp->fsm.bundle,
usr.sbin/ppp/lqr.c
202
lqr_Input(struct bundle *bundle __unused, struct link *l, struct mbuf *bp)
usr.sbin/ppp/lqr.c
210
m_freem(bp);
usr.sbin/ppp/lqr.c
214
len = m_length(bp);
usr.sbin/ppp/lqr.c
219
bp = m_pullup(proto_Prepend(bp, PROTO_LQR, 0, 0));
usr.sbin/ppp/lqr.c
220
lcp_SendProtoRej(lcp, MBUF_CTOP(bp), bp->m_len);
usr.sbin/ppp/lqr.c
224
bp = m_pullup(bp);
usr.sbin/ppp/lqr.c
225
lqr = (struct lqrdata *)MBUF_CTOP(bp);
usr.sbin/ppp/lqr.c
260
m_freem(bp);
usr.sbin/ppp/lqr.c
417
lqr_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/lqr.c
425
m_freem(bp);
usr.sbin/ppp/lqr.c
429
bp = m_pullup(bp);
usr.sbin/ppp/lqr.c
430
len = m_length(bp);
usr.sbin/ppp/lqr.c
506
lqr_ChangeOrder(&lqr, (struct lqrdata *)MBUF_CTOP(bp));
usr.sbin/ppp/lqr.c
509
return bp;
usr.sbin/ppp/lqr.c
514
struct mbuf *bp, u_short *proto)
usr.sbin/ppp/lqr.c
523
m_settype(bp, MB_LQRIN);
usr.sbin/ppp/lqr.c
524
return bp;
usr.sbin/ppp/lqr.c
88
lqr_RecvEcho(struct fsm *fp, struct mbuf *bp)
usr.sbin/ppp/lqr.c
94
if (m_length(bp) >= sizeof lqr) {
usr.sbin/ppp/lqr.c
95
m_freem(mbuf_Read(bp, &lqr, sizeof lqr));
usr.sbin/ppp/lqr.c
96
bp = NULL;
usr.sbin/ppp/mbuf.c
107
struct mbuf *bp;
usr.sbin/ppp/mbuf.c
126
bp = &(*mb)->u.m;
usr.sbin/ppp/mbuf.c
145
bp = &(*mb)->u.m;
usr.sbin/ppp/mbuf.c
153
memset(bp, '\0', sizeof(struct mbuf));
usr.sbin/ppp/mbuf.c
154
bp->m_size = size - sizeof *bp;
usr.sbin/ppp/mbuf.c
155
bp->m_len = m_len;
usr.sbin/ppp/mbuf.c
156
bp->m_type = type;
usr.sbin/ppp/mbuf.c
159
MemMap[type].octets += bp->m_size;
usr.sbin/ppp/mbuf.c
161
return bp;
usr.sbin/ppp/mbuf.c
165
m_free(struct mbuf *bp)
usr.sbin/ppp/mbuf.c
170
if ((f = (struct mbucket *)bp) != NULL) {
usr.sbin/ppp/mbuf.c
171
MemMap[bp->m_type].fragments--;
usr.sbin/ppp/mbuf.c
172
MemMap[bp->m_type].octets -= bp->m_size;
usr.sbin/ppp/mbuf.c
174
nbp = bp->m_next;
usr.sbin/ppp/mbuf.c
175
mb = M_BUCKET(bp->m_size);
usr.sbin/ppp/mbuf.c
181
bp = nbp;
usr.sbin/ppp/mbuf.c
184
return bp;
usr.sbin/ppp/mbuf.c
188
m_freem(struct mbuf *bp)
usr.sbin/ppp/mbuf.c
190
while (bp)
usr.sbin/ppp/mbuf.c
191
bp = m_free(bp);
usr.sbin/ppp/mbuf.c
195
mbuf_Read(struct mbuf *bp, void *v, size_t len)
usr.sbin/ppp/mbuf.c
200
while (bp && len > 0) {
usr.sbin/ppp/mbuf.c
201
if (len > bp->m_len)
usr.sbin/ppp/mbuf.c
202
nb = bp->m_len;
usr.sbin/ppp/mbuf.c
206
memcpy(ptr, MBUF_CTOP(bp), nb);
usr.sbin/ppp/mbuf.c
208
bp->m_len -= nb;
usr.sbin/ppp/mbuf.c
210
bp->m_offset += nb;
usr.sbin/ppp/mbuf.c
212
if (bp->m_len == 0)
usr.sbin/ppp/mbuf.c
213
bp = m_free(bp);
usr.sbin/ppp/mbuf.c
216
while (bp && bp->m_len == 0)
usr.sbin/ppp/mbuf.c
217
bp = m_free(bp);
usr.sbin/ppp/mbuf.c
219
return bp;
usr.sbin/ppp/mbuf.c
223
mbuf_View(struct mbuf *bp, void *v, size_t len)
usr.sbin/ppp/mbuf.c
228
while (bp && l > 0) {
usr.sbin/ppp/mbuf.c
229
if (l > bp->m_len)
usr.sbin/ppp/mbuf.c
230
nb = bp->m_len;
usr.sbin/ppp/mbuf.c
233
memcpy(ptr, MBUF_CTOP(bp), nb);
usr.sbin/ppp/mbuf.c
236
bp = bp->m_next;
usr.sbin/ppp/mbuf.c
243
m_prepend(struct mbuf *bp, const void *ptr, size_t len, u_short extra)
usr.sbin/ppp/mbuf.c
247
if (bp && bp->m_offset) {
usr.sbin/ppp/mbuf.c
248
if (bp->m_offset >= len) {
usr.sbin/ppp/mbuf.c
249
bp->m_offset -= len;
usr.sbin/ppp/mbuf.c
250
bp->m_len += len;
usr.sbin/ppp/mbuf.c
252
memcpy(MBUF_CTOP(bp), ptr, len);
usr.sbin/ppp/mbuf.c
253
return bp;
usr.sbin/ppp/mbuf.c
255
len -= bp->m_offset;
usr.sbin/ppp/mbuf.c
257
memcpy(bp + 1, (const char *)ptr + len, bp->m_offset);
usr.sbin/ppp/mbuf.c
258
bp->m_len += bp->m_offset;
usr.sbin/ppp/mbuf.c
259
bp->m_offset = 0;
usr.sbin/ppp/mbuf.c
262
head = m_get(len + extra, bp ? bp->m_type : MB_UNKNOWN);
usr.sbin/ppp/mbuf.c
267
head->m_next = bp;
usr.sbin/ppp/mbuf.c
273
m_adj(struct mbuf *bp, ssize_t n)
usr.sbin/ppp/mbuf.c
276
while (bp) {
usr.sbin/ppp/mbuf.c
277
if ((size_t)n < bp->m_len) {
usr.sbin/ppp/mbuf.c
278
bp->m_len = n;
usr.sbin/ppp/mbuf.c
279
bp->m_offset += n;
usr.sbin/ppp/mbuf.c
280
return bp;
usr.sbin/ppp/mbuf.c
282
n -= bp->m_len;
usr.sbin/ppp/mbuf.c
283
bp = m_free(bp);
usr.sbin/ppp/mbuf.c
286
if ((n = m_length(bp) + n) <= 0) {
usr.sbin/ppp/mbuf.c
287
m_freem(bp);
usr.sbin/ppp/mbuf.c
290
for (; bp; bp = bp->m_next, n -= bp->m_len)
usr.sbin/ppp/mbuf.c
291
if ((size_t)n < bp->m_len) {
usr.sbin/ppp/mbuf.c
292
bp->m_len = n;
usr.sbin/ppp/mbuf.c
293
m_freem(bp->m_next);
usr.sbin/ppp/mbuf.c
294
bp->m_next = NULL;
usr.sbin/ppp/mbuf.c
299
return bp;
usr.sbin/ppp/mbuf.c
303
mbuf_Write(struct mbuf *bp, const void *ptr, size_t m_len)
usr.sbin/ppp/mbuf.c
308
plen = m_length(bp);
usr.sbin/ppp/mbuf.c
313
nb = (m_len < bp->m_len) ? m_len : bp->m_len;
usr.sbin/ppp/mbuf.c
314
memcpy(MBUF_CTOP(bp), ptr, nb);
usr.sbin/ppp/mbuf.c
315
m_len -= bp->m_len;
usr.sbin/ppp/mbuf.c
316
bp = bp->m_next;
usr.sbin/ppp/mbuf.c
347
struct mbuf *bp;
usr.sbin/ppp/mbuf.c
350
bp = q->top;
usr.sbin/ppp/mbuf.c
351
if (bp) {
usr.sbin/ppp/mbuf.c
360
bp->m_nextpkt = NULL;
usr.sbin/ppp/mbuf.c
363
return bp;
usr.sbin/ppp/mbuf.c
367
m_enqueue(struct mqueue *queue, struct mbuf *bp)
usr.sbin/ppp/mbuf.c
369
if (bp != NULL) {
usr.sbin/ppp/mbuf.c
371
queue->last->m_nextpkt = bp;
usr.sbin/ppp/mbuf.c
372
queue->last = bp;
usr.sbin/ppp/mbuf.c
374
queue->last = queue->top = bp;
usr.sbin/ppp/mbuf.c
381
m_pullup(struct mbuf *bp)
usr.sbin/ppp/mbuf.c
385
if (bp != NULL) {
usr.sbin/ppp/mbuf.c
386
if (bp->m_next != NULL) {
usr.sbin/ppp/mbuf.c
390
nbp = m_get(m_length(bp), bp->m_type);
usr.sbin/ppp/mbuf.c
392
for (cp = MBUF_CTOP(nbp); bp; bp = m_free(bp)) {
usr.sbin/ppp/mbuf.c
393
memcpy(cp, MBUF_CTOP(bp), bp->m_len);
usr.sbin/ppp/mbuf.c
394
cp += bp->m_len;
usr.sbin/ppp/mbuf.c
396
bp = nbp;
usr.sbin/ppp/mbuf.c
399
else if ((bp->m_offset & (sizeof(long) - 1)) != 0) {
usr.sbin/ppp/mbuf.c
400
bcopy(MBUF_CTOP(bp), bp + 1, bp->m_len);
usr.sbin/ppp/mbuf.c
401
bp->m_offset = 0;
usr.sbin/ppp/mbuf.c
406
return bp;
usr.sbin/ppp/mbuf.c
410
m_settype(struct mbuf *bp, int type)
usr.sbin/ppp/mbuf.c
412
for (; bp; bp = bp->m_next)
usr.sbin/ppp/mbuf.c
413
if (type != bp->m_type) {
usr.sbin/ppp/mbuf.c
414
MemMap[bp->m_type].fragments--;
usr.sbin/ppp/mbuf.c
415
MemMap[bp->m_type].octets -= bp->m_size;
usr.sbin/ppp/mbuf.c
416
bp->m_type = type;
usr.sbin/ppp/mbuf.c
418
MemMap[type].octets += bp->m_size;
usr.sbin/ppp/mbuf.c
423
m_append(struct mbuf *bp, const void *v, size_t sz)
usr.sbin/ppp/mbuf.c
425
struct mbuf *m = bp;
usr.sbin/ppp/mbuf.c
437
bp = m_prepend(NULL, v, sz, 0);
usr.sbin/ppp/mbuf.c
439
return bp;
usr.sbin/ppp/mbuf.c
78
m_length(struct mbuf *bp)
usr.sbin/ppp/mbuf.c
82
for (len = 0; bp; bp = bp->m_next)
usr.sbin/ppp/mbuf.c
83
len += bp->m_len;
usr.sbin/ppp/mbuf.h
48
#define MBUF_CTOP(bp) \
usr.sbin/ppp/mbuf.h
49
((bp) ? (u_char *)((bp)+1) + (bp)->m_offset : (u_char *)bp)
usr.sbin/ppp/mbuf.h
51
#define CONST_MBUF_CTOP(bp) \
usr.sbin/ppp/mbuf.h
52
((bp) ? (const u_char *)((bp)+1) + (bp)->m_offset : (const u_char *)bp)
usr.sbin/ppp/mp.c
612
mp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/mp.c
618
return bp;
usr.sbin/ppp/mp.c
622
m_freem(bp);
usr.sbin/ppp/mp.c
624
m_settype(bp, MB_MPIN);
usr.sbin/ppp/mp.c
625
mp_Assemble(&bundle->ncp.mp, bp, p);
usr.sbin/ppp/nat_cmd.c
498
nat_LayerPush(struct bundle *bundle, struct link *l __unused, struct mbuf *bp,
usr.sbin/ppp/nat_cmd.c
502
return bp;
usr.sbin/ppp/nat_cmd.c
505
m_settype(bp, MB_NATOUT);
usr.sbin/ppp/nat_cmd.c
507
bp = m_pullup(m_append(bp, NULL, NAT_EXTRABUF));
usr.sbin/ppp/nat_cmd.c
508
LibAliasOut(la, MBUF_CTOP(bp), bp->m_len);
usr.sbin/ppp/nat_cmd.c
509
bp->m_len = ntohs(((struct ip *)MBUF_CTOP(bp))->ip_len);
usr.sbin/ppp/nat_cmd.c
511
return bp;
usr.sbin/ppp/nat_cmd.c
515
nat_LayerPull(struct bundle *bundle, struct link *l __unused, struct mbuf *bp,
usr.sbin/ppp/nat_cmd.c
524
return bp;
usr.sbin/ppp/nat_cmd.c
527
m_settype(bp, MB_NATIN);
usr.sbin/ppp/nat_cmd.c
529
bp = m_pullup(m_append(bp, NULL, NAT_EXTRABUF));
usr.sbin/ppp/nat_cmd.c
530
ret = LibAliasIn(la, MBUF_CTOP(bp), bp->m_len);
usr.sbin/ppp/nat_cmd.c
532
bp->m_len = ntohs(((struct ip *)MBUF_CTOP(bp))->ip_len);
usr.sbin/ppp/nat_cmd.c
533
if (bp->m_len > MAX_MRU) {
usr.sbin/ppp/nat_cmd.c
535
(unsigned long)bp->m_len);
usr.sbin/ppp/nat_cmd.c
536
m_freem(bp);
usr.sbin/ppp/nat_cmd.c
546
if ((fptr = malloc(bp->m_len)) == NULL) {
usr.sbin/ppp/nat_cmd.c
549
m_freem(bp);
usr.sbin/ppp/nat_cmd.c
550
bp = NULL;
usr.sbin/ppp/nat_cmd.c
552
bp = mbuf_Read(bp, fptr, bp->m_len);
usr.sbin/ppp/nat_cmd.c
561
last = &bp->m_nextpkt;
usr.sbin/ppp/nat_cmd.c
563
while ((fptr = LibAliasGetFragment(la, MBUF_CTOP(bp))) != NULL) {
usr.sbin/ppp/nat_cmd.c
565
LibAliasFragmentIn(la, MBUF_CTOP(bp), fptr);
usr.sbin/ppp/nat_cmd.c
574
"w %d)\n", (unsigned long)((struct ip *)MBUF_CTOP(bp))->ip_id,
usr.sbin/ppp/nat_cmd.c
581
m_freem(bp);
usr.sbin/ppp/nat_cmd.c
582
bp = NULL;
usr.sbin/ppp/nat_cmd.c
585
PacketCheck(bundle, AF_INET, MBUF_CTOP(bp), bp->m_len, NULL,
usr.sbin/ppp/nat_cmd.c
592
m_freem(bp);
usr.sbin/ppp/nat_cmd.c
593
bp = NULL;
usr.sbin/ppp/nat_cmd.c
597
return bp;
usr.sbin/ppp/ncp.c
218
struct mbuf *bp;
usr.sbin/ppp/ncp.c
234
bp = m_get(count + 6, MB_IPOUT);
usr.sbin/ppp/ncp.c
235
bp->m_offset += 4;
usr.sbin/ppp/ncp.c
236
bp->m_len -= 6;
usr.sbin/ppp/ncp.c
237
memcpy(MBUF_CTOP(bp), ptr, count);
usr.sbin/ppp/ncp.c
238
m_enqueue(ipcp->Queue + pri, bp);
usr.sbin/ppp/ncp.c
248
bp = m_get(count + 6, MB_IPOUT);
usr.sbin/ppp/ncp.c
249
bp->m_offset += 4;
usr.sbin/ppp/ncp.c
250
bp->m_len -= 6;
usr.sbin/ppp/ncp.c
251
memcpy(MBUF_CTOP(bp), ptr, count);
usr.sbin/ppp/ncp.c
252
m_enqueue(ipv6cp->Queue + pri, bp);
usr.sbin/ppp/pap.c
101
bp = m_get(plen + sizeof(struct fsmheader), MB_PAPOUT);
usr.sbin/ppp/pap.c
102
memcpy(MBUF_CTOP(bp), &lh, sizeof(struct fsmheader));
usr.sbin/ppp/pap.c
103
cp = MBUF_CTOP(bp) + sizeof(struct fsmheader);
usr.sbin/ppp/pap.c
109
link_PushPacket(&authp->physical->link, bp, bundle,
usr.sbin/ppp/pap.c
117
struct mbuf *bp;
usr.sbin/ppp/pap.c
126
bp = m_get(plen + sizeof(struct fsmheader), MB_PAPOUT);
usr.sbin/ppp/pap.c
127
memcpy(MBUF_CTOP(bp), &lh, sizeof(struct fsmheader));
usr.sbin/ppp/pap.c
128
cp = MBUF_CTOP(bp) + sizeof(struct fsmheader);
usr.sbin/ppp/pap.c
138
link_PushPacket(&authp->physical->link, bp, authp->physical->dl->bundle,
usr.sbin/ppp/pap.c
180
pap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
usr.sbin/ppp/pap.c
190
m_freem(bp);
usr.sbin/ppp/pap.c
197
m_freem(bp);
usr.sbin/ppp/pap.c
201
if ((bp = auth_ReadHeader(authp, bp)) == NULL &&
usr.sbin/ppp/pap.c
209
m_freem(bp);
usr.sbin/ppp/pap.c
218
m_freem(bp);
usr.sbin/ppp/pap.c
221
m_settype(bp, MB_PAPIN);
usr.sbin/ppp/pap.c
224
if (bp) {
usr.sbin/ppp/pap.c
225
bp = mbuf_Read(bp, &nlen, 1);
usr.sbin/ppp/pap.c
232
bp = m_pullup(bp);
usr.sbin/ppp/pap.c
233
txt = MBUF_CTOP(bp);
usr.sbin/ppp/pap.c
234
txtlen = m_length(bp);
usr.sbin/ppp/pap.c
236
bp = auth_ReadName(authp, bp, nlen);
usr.sbin/ppp/pap.c
250
if (bp == NULL) {
usr.sbin/ppp/pap.c
254
bp = mbuf_Read(bp, &klen, 1);
usr.sbin/ppp/pap.c
255
if (m_length(bp) < klen) {
usr.sbin/ppp/pap.c
263
bp = mbuf_Read(bp, key, klen);
usr.sbin/ppp/pap.c
301
m_freem(bp);
usr.sbin/ppp/pap.c
87
struct mbuf *bp;
usr.sbin/ppp/pred.c
175
int pri __unused, u_short *proto, struct mbuf *bp)
usr.sbin/ppp/pred.c
184
orglen = m_length(bp) + 2; /* add count of proto */
usr.sbin/ppp/pred.c
192
mbuf_Read(bp, cp, orglen - 2);
usr.sbin/ppp/pred.c
217
Pred1Input(void *v, struct ccp *ccp, u_short *proto, struct mbuf *bp)
usr.sbin/ppp/pred.c
227
cp = MBUF_CTOP(bp);
usr.sbin/ppp/pred.c
228
olen = m_length(bp);
usr.sbin/ppp/pred.c
242
m_freem(bp);
usr.sbin/ppp/pred.c
252
m_freem(bp);
usr.sbin/ppp/pred.c
276
m_freem(bp);
usr.sbin/ppp/pred.c
279
const char *pre = *MBUF_CTOP(bp) & 0x80 ? "" : "un";
usr.sbin/ppp/pred.c
287
m_freem(bp);
usr.sbin/ppp/pred.c
293
u_short proto __unused, struct mbuf *bp __unused)
usr.sbin/ppp/proto.c
102
bp = mbuf_Read(bp, cp, 2);
usr.sbin/ppp/proto.c
105
bp = mbuf_Read(bp, cp, 1);
usr.sbin/ppp/proto.c
108
m_settype(bp, MB_PROTOIN);
usr.sbin/ppp/proto.c
111
return bp;
usr.sbin/ppp/proto.c
56
proto_Prepend(struct mbuf *bp, u_short proto, unsigned comp, int extra)
usr.sbin/ppp/proto.c
64
bp = m_prepend(bp, cp + 1, 1, extra);
usr.sbin/ppp/proto.c
66
bp = m_prepend(bp, cp, 2, extra);
usr.sbin/ppp/proto.c
68
return bp;
usr.sbin/ppp/proto.c
72
proto_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/proto.c
76
bp = proto_Prepend(bp, *proto, l->lcp.his_protocomp,
usr.sbin/ppp/proto.c
78
m_settype(bp, MB_PROTOOUT);
usr.sbin/ppp/proto.c
81
return bp;
usr.sbin/ppp/proto.c
85
proto_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/proto.c
91
if ((got = mbuf_View(bp, cp, 2)) == 0) {
usr.sbin/ppp/proto.c
92
m_freem(bp);
usr.sbin/ppp/proto.c
99
m_freem(bp);
usr.sbin/ppp/slcompress.c
436
u_short *bp;
usr.sbin/ppp/slcompress.c
569
bp = (u_short *)&cs->cs_ip;
usr.sbin/ppp/slcompress.c
571
changes += *bp++;
usr.sbin/ppp/sync.c
53
struct mbuf *bp, int pri __unused, u_short *proto __unused)
usr.sbin/ppp/sync.c
55
log_DumpBp(LogSYNC, "Write", bp);
usr.sbin/ppp/sync.c
56
m_settype(bp, MB_SYNCOUT);
usr.sbin/ppp/sync.c
57
bp->priv = 0;
usr.sbin/ppp/sync.c
58
return bp;
usr.sbin/ppp/sync.c
62
sync_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp,
usr.sbin/ppp/sync.c
71
log_DumpBp(LogSYNC, "Read", bp);
usr.sbin/ppp/sync.c
74
len = m_length(bp);
usr.sbin/ppp/sync.c
78
m_settype(bp, MB_SYNCIN);
usr.sbin/ppp/sync.c
81
return bp;
usr.sbin/ppp/tcpmss.c
149
tcpmss_Check(struct bundle *bundle, struct mbuf *bp)
usr.sbin/ppp/tcpmss.c
159
return bp;
usr.sbin/ppp/tcpmss.c
161
bp = m_pullup(bp);
usr.sbin/ppp/tcpmss.c
162
plen = m_length(bp);
usr.sbin/ppp/tcpmss.c
164
return bp;
usr.sbin/ppp/tcpmss.c
165
pip = (struct ip *)MBUF_CTOP(bp);
usr.sbin/ppp/tcpmss.c
177
MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen,
usr.sbin/ppp/tcpmss.c
189
pip6 = (struct ip6_hdr *)MBUF_CTOP(bp);
usr.sbin/ppp/tcpmss.c
199
pfrag = (struct ip6_frag *)(MBUF_CTOP(bp) + sizeof(struct ip6_hdr));
usr.sbin/ppp/tcpmss.c
207
MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen,
usr.sbin/ppp/tcpmss.c
215
return bp;
usr.sbin/ppp/tcpmss.c
220
struct mbuf *bp, int pri __unused, u_short *proto __unused)
usr.sbin/ppp/tcpmss.c
222
return tcpmss_Check(bundle, bp);
usr.sbin/ppp/tcpmss.c
227
struct mbuf *bp, u_short *proto __unused)
usr.sbin/ppp/tcpmss.c
229
return tcpmss_Check(bundle, bp);
usr.sbin/ppp/vjcomp.c
101
m_settype(bp, MB_VJOUT);
usr.sbin/ppp/vjcomp.c
106
m_freem(bp);
usr.sbin/ppp/vjcomp.c
111
return bp;
usr.sbin/ppp/vjcomp.c
115
VjUncompressTcp(struct ipcp *ipcp, struct mbuf *bp, u_char type)
usr.sbin/ppp/vjcomp.c
121
bp = m_pullup(bp);
usr.sbin/ppp/vjcomp.c
122
olen = len = m_length(bp);
usr.sbin/ppp/vjcomp.c
128
bufp = MBUF_CTOP(bp);
usr.sbin/ppp/vjcomp.c
132
m_freem(bp);
usr.sbin/ppp/vjcomp.c
133
bp = NULL;
usr.sbin/ppp/vjcomp.c
135
m_settype(bp, MB_VJIN);
usr.sbin/ppp/vjcomp.c
136
return bp;
usr.sbin/ppp/vjcomp.c
148
bp = mbuf_Read(bp, bufp, rlen);
usr.sbin/ppp/vjcomp.c
152
m_freem(bp);
usr.sbin/ppp/vjcomp.c
158
bp = m_prepend(bp, bufp, len, 0);
usr.sbin/ppp/vjcomp.c
159
m_settype(bp, MB_VJIN);
usr.sbin/ppp/vjcomp.c
161
return bp;
usr.sbin/ppp/vjcomp.c
165
vj_LayerPull(struct bundle *bundle, struct link *l __unused, struct mbuf *bp,
usr.sbin/ppp/vjcomp.c
180
return bp;
usr.sbin/ppp/vjcomp.c
184
return VjUncompressTcp(&bundle->ncp.ipcp, bp, type);
usr.sbin/ppp/vjcomp.c
73
vj_LayerPush(struct bundle *bundle, struct link *l __unused, struct mbuf *bp,
usr.sbin/ppp/vjcomp.c
80
bp = m_pullup(bp);
usr.sbin/ppp/vjcomp.c
81
pip = (struct ip *)MBUF_CTOP(bp);
usr.sbin/ppp/vjcomp.c
84
type = sl_compress_tcp(bp, pip, &bundle->ncp.ipcp.vj.cslc,
usr.sbin/ppp/vjcomp.c
95
m_settype(bp, MB_VJOUT);
usr.sbin/rarpd/rarpd.c
505
u_char *buf, *bp, *ep;
usr.sbin/rarpd/rarpd.c
555
#define bhp ((struct bpf_hdr *)bp)
usr.sbin/rarpd/rarpd.c
556
bp = buf;
usr.sbin/rarpd/rarpd.c
557
ep = bp + cc;
usr.sbin/rarpd/rarpd.c
558
while (bp < ep) {
usr.sbin/rarpd/rarpd.c
563
if (rarp_check(bp + hdrlen, caplen))
usr.sbin/rarpd/rarpd.c
564
rarp_process(ii, bp + hdrlen, caplen);
usr.sbin/rarpd/rarpd.c
565
bp += BPF_WORDALIGN(hdrlen + caplen);
usr.sbin/rmt/rmt.c
199
getstring(char *bp)
usr.sbin/rmt/rmt.c
202
char *cp = bp;
usr.sbin/rtadvd/advcap.c
103
tgetent(char *bp, char *name)
usr.sbin/rtadvd/advcap.c
105
return (getent(bp, name, conffile));
usr.sbin/rtadvd/advcap.c
109
getent(char *bp, char *name, const char *cfile)
usr.sbin/rtadvd/advcap.c
117
tbuf = bp;
usr.sbin/rtadvd/advcap.c
135
cp = bp;
usr.sbin/rtadvd/advcap.c
147
if (cp > bp && cp[-1] == '\\') {
usr.sbin/rtadvd/advcap.c
153
if (cp >= bp + BUFSIZ - 1) {
usr.sbin/rtadvd/advcap.c
255
tskip(char *bp)
usr.sbin/rtadvd/advcap.c
260
while (*bp) {
usr.sbin/rtadvd/advcap.c
261
switch (*bp) {
usr.sbin/rtadvd/advcap.c
266
bp++;
usr.sbin/rtadvd/advcap.c
269
bp++;
usr.sbin/rtadvd/advcap.c
270
if (isdigit(*bp)) {
usr.sbin/rtadvd/advcap.c
271
while (isdigit(*bp++))
usr.sbin/rtadvd/advcap.c
274
bp++;
usr.sbin/rtadvd/advcap.c
277
bp++;
usr.sbin/rtadvd/advcap.c
280
bp++;
usr.sbin/rtadvd/advcap.c
285
if (*bp == ':')
usr.sbin/rtadvd/advcap.c
286
bp++;
usr.sbin/rtadvd/advcap.c
287
return (bp);
usr.sbin/rtadvd/advcap.c
303
char *bp = tbuf;
usr.sbin/rtadvd/advcap.c
306
bp = tskip(bp);
usr.sbin/rtadvd/advcap.c
307
if (*bp == 0)
usr.sbin/rtadvd/advcap.c
309
if (strncmp(bp, id, strlen(id)) != 0)
usr.sbin/rtadvd/advcap.c
311
bp += strlen(id);
usr.sbin/rtadvd/advcap.c
312
if (*bp == '@')
usr.sbin/rtadvd/advcap.c
314
if (*bp != '#')
usr.sbin/rtadvd/advcap.c
316
bp++;
usr.sbin/rtadvd/advcap.c
318
if (*bp == '0')
usr.sbin/rtadvd/advcap.c
321
while (isdigit(*bp))
usr.sbin/rtadvd/advcap.c
322
i *= base, i += *bp++ - '0';
usr.sbin/rtadvd/advcap.c
336
char *bp = tbuf;
usr.sbin/rtadvd/advcap.c
339
bp = tskip(bp);
usr.sbin/rtadvd/advcap.c
340
if (!*bp)
usr.sbin/rtadvd/advcap.c
342
if (strncmp(bp, id, strlen(id)) == 0) {
usr.sbin/rtadvd/advcap.c
343
bp += strlen(id);
usr.sbin/rtadvd/advcap.c
344
if (!*bp || *bp == ':')
usr.sbin/rtadvd/advcap.c
346
else if (*bp == '@')
usr.sbin/rtadvd/advcap.c
363
char *bp = tbuf;
usr.sbin/rtadvd/advcap.c
366
bp = tskip(bp);
usr.sbin/rtadvd/advcap.c
367
if (!*bp)
usr.sbin/rtadvd/advcap.c
369
if (strncmp(bp, id, strlen(id)) != 0)
usr.sbin/rtadvd/advcap.c
371
bp += strlen(id);
usr.sbin/rtadvd/advcap.c
372
if (*bp == '@')
usr.sbin/rtadvd/advcap.c
374
if (*bp != '=')
usr.sbin/rtadvd/advcap.c
376
bp++;
usr.sbin/rtadvd/advcap.c
377
return (tdecode(bp, area));
usr.sbin/rtadvd/config.c
350
char *bp = buf;
usr.sbin/rtadvd/config.c
429
if ((flagstr = (char *)agetstr("raflags", &bp))) {
usr.sbin/rtadvd/config.c
519
addr = (char *)agetstr(entbuf, &bp);
usr.sbin/rtadvd/config.c
558
if ((flagstr = (char *)agetstr(entbuf, &bp))) {
usr.sbin/rtadvd/config.c
632
if ((mtustr = (char *)agetstr("mtu", &bp)) &&
usr.sbin/rtadvd/config.c
680
addr = (char *)agetstr(entbuf, &bp);
usr.sbin/rtadvd/config.c
683
addr = (char *)agetstr(oentbuf, &bp);
usr.sbin/rtadvd/config.c
744
if ((flagstr = (char *)agetstr(entbuf, &bp))) {
usr.sbin/rtadvd/config.c
824
addr = (char *)agetstr(entbuf, &bp);
usr.sbin/rtadvd/config.c
875
addr = (char *)agetstr(entbuf, &bp);
usr.sbin/rtadvd/config.c
929
addr = (char *)agetstr(entbuf, &bp);
usr.sbin/syslogd/syslogd.c
2889
char *bp, buf[LINE_MAX];
usr.sbin/syslogd/syslogd.c
2922
for (bp = buf; *q != '\0' && !strchr("\t,; ", *q); )
usr.sbin/syslogd/syslogd.c
2923
*bp++ = *q++;
usr.sbin/syslogd/syslogd.c
2924
*bp = '\0';
usr.sbin/syslogd/syslogd.c
2953
for (bp = buf; *p != '\0' && !strchr("\t,;. ", *p); )
usr.sbin/syslogd/syslogd.c
2954
*bp++ = *p++;
usr.sbin/syslogd/syslogd.c
2955
*bp = '\0';
usr.sbin/vidcontrol/decode.c
38
char *bp, *p;
usr.sbin/vidcontrol/decode.c
49
bp = buffer;
usr.sbin/vidcontrol/decode.c
86
bcopy(tbuffer, bp, tpos);
usr.sbin/vidcontrol/decode.c
88
bp += tpos;
usr.sbin/ypldap/yp.c
321
char *bp, *cp;
usr.sbin/ypldap/yp.c
398
bp = cp = key;
usr.sbin/ypldap/yp.c
400
if (strncmp(bp, "unix.", strlen("unix.")) != 0) {
usr.sbin/ypldap/yp.c
405
bp += strlen("unix.");
usr.sbin/ypldap/yp.c
407
if (*bp == '\0') {
usr.sbin/ypldap/yp.c
412
if (!(cp = strsep(&bp, "@"))) {
usr.sbin/ypldap/yp.c
417
if (strcmp(bp, arg->domain) != 0) {
usr.sbin/ypldap/ypldap.c
183
char *bp, *cp;
usr.sbin/ypldap/ypldap.c
189
bp = cp = ue->ue_line;
usr.sbin/ypldap/ypldap.c
192
bp += strlen(bp) + 1;
usr.sbin/ypldap/ypldap.c
195
bp += strcspn(bp, ":") + 1;
usr.sbin/ypldap/ypldap.c
198
bp += strcspn(bp, ":") + 1;
usr.sbin/ypldap/ypldap.c
201
bp[strcspn(bp, ":")] = '\0';
usr.sbin/ypldap/ypldap.c
203
pw_gid = (gid_t)strtonum(bp, 0, GID_MAX, &errstr);
usr.sbin/ypldap/ypldap.c
210
bp[strlen(bp)] = ':';
usr.sbin/ypldap/ypldap.c
225
bp = cp = ge->ge_line;
usr.sbin/ypldap/ypldap.c
228
bp += strlen(bp) + 1;
usr.sbin/ypldap/ypldap.c
231
bp += strcspn(bp, ":") + 1;
usr.sbin/ypldap/ypldap.c
234
bp += strcspn(bp, ":") + 1;
usr.sbin/ypldap/ypldap.c
236
cp = bp;
usr.sbin/ypldap/ypldap.c
237
if (*bp == '\0')
usr.sbin/ypldap/ypldap.c
239
bp = cp;
usr.sbin/ypldap/ypldap.c
241
if (!(cp = strsep(&bp, ",")))
usr.sbin/ypldap/ypldap.c
249
if (bp != NULL)
usr.sbin/ypldap/ypldap.c
250
*(bp-1) = ',';
usr.sbin/ypldap/ypldap.c
253
if (bp != NULL)
usr.sbin/ypldap/ypldap.c
254
*(bp-1) = ',';