Lines Matching refs:buf
35 bch2_print_str(c, KERN_ERR, out->buf); in __bch2_inconsistent_error()
45 struct printbuf buf = PRINTBUF; in bch2_inconsistent_error() local
46 buf.atomic++; in bch2_inconsistent_error()
48 printbuf_indent_add_nextline(&buf, 2); in bch2_inconsistent_error()
50 bool ret = __bch2_inconsistent_error(c, &buf); in bch2_inconsistent_error()
52 bch_err(c, "%s", buf.buf); in bch2_inconsistent_error()
53 printbuf_exit(&buf); in bch2_inconsistent_error()
61 struct printbuf buf = PRINTBUF; in bch2_fs_trans_inconsistent() local
62 buf.atomic++; in bch2_fs_trans_inconsistent()
64 bch2_log_msg_start(c, &buf); in bch2_fs_trans_inconsistent()
66 prt_vprintf(&buf, fmt, args); in bch2_fs_trans_inconsistent()
67 prt_newline(&buf); in bch2_fs_trans_inconsistent()
70 bch2_trans_updates_to_text(&buf, trans); in bch2_fs_trans_inconsistent()
71 bool ret = __bch2_inconsistent_error(c, &buf); in bch2_fs_trans_inconsistent()
72 bch2_print_str(c, KERN_ERR, buf.buf); in bch2_fs_trans_inconsistent()
74 printbuf_exit(&buf); in bch2_fs_trans_inconsistent()
112 struct printbuf buf = PRINTBUF; in bch2_fs_topology_error() local
114 bch2_log_msg_start(c, &buf); in bch2_fs_topology_error()
118 prt_vprintf(&buf, fmt, args); in bch2_fs_topology_error()
121 int ret = __bch2_topology_error(c, &buf); in bch2_fs_topology_error()
122 bch2_print_str(c, KERN_ERR, buf.buf); in bch2_fs_topology_error()
124 printbuf_exit(&buf); in bch2_fs_topology_error()
152 struct printbuf buf = PRINTBUF; in bch2_io_error_work() local
153 __bch2_log_msg_start(ca->name, &buf); in bch2_io_error_work()
155 prt_printf(&buf, "writes erroring for %u seconds, setting %s ro", in bch2_io_error_work()
159 bch2_fs_emergency_read_only2(c, &buf); in bch2_io_error_work()
161 bch2_print_str(c, KERN_ERR, buf.buf); in bch2_io_error_work()
162 printbuf_exit(&buf); in bch2_io_error_work()
185 static enum ask_yn parse_yn_response(char *buf) in parse_yn_response() argument
187 buf = strim(buf); in parse_yn_response()
189 if (strlen(buf) == 1) in parse_yn_response()
190 switch (buf[0]) { in parse_yn_response()
253 char *buf = NULL; in bch2_fsck_ask_yn() local
261 if (getline(&buf, &buflen, stdin) < 0) in bch2_fsck_ask_yn()
263 } while ((ret = parse_yn_response(buf)) < 0); in bch2_fsck_ask_yn()
265 free(buf); in bch2_fsck_ask_yn()
330 bch2_print(c, "%s", question->buf); in do_fsck_ask_yn()
332 bch2_print_str(c, KERN_ERR, question->buf); in do_fsck_ask_yn()
388 count_fsck_err_locked(c, id, msg->buf, &repeat, &print, &suppress); in __bch2_count_fsck_err()
446 struct printbuf buf = PRINTBUF, *out = &buf; in __bch2_fsck_err() local
492 if (out->buf[out->pos - 1] == '?') { in __bch2_fsck_err()
493 const char *p = strrchr(out->buf, ','); in __bch2_fsck_err()
495 out->pos = p - out->buf; in __bch2_fsck_err()
508 count_fsck_err_locked(c, err, buf.buf, &repeat, &print, &suppress); in __bch2_fsck_err()
611 while (out->pos && out->buf[out->pos - 1] == ' ') in __bch2_fsck_err()
616 bch2_print(c, "%s", out->buf); in __bch2_fsck_err()
618 bch2_print_str(c, KERN_ERR, out->buf); in __bch2_fsck_err()
647 printbuf_exit(&buf); in __bch2_fsck_err()
679 struct printbuf buf = PRINTBUF; in __bch2_bkey_fsck_err() local
680 prt_printf(&buf, "invalid bkey in %s", in __bch2_bkey_fsck_err()
684 prt_printf(&buf, " journal seq=%llu offset=%u", in __bch2_bkey_fsck_err()
687 prt_str(&buf, " btree="); in __bch2_bkey_fsck_err()
688 bch2_btree_id_to_text(&buf, from.btree); in __bch2_bkey_fsck_err()
689 prt_printf(&buf, " level=%u: ", from.level); in __bch2_bkey_fsck_err()
691 bch2_bkey_val_to_text(&buf, c, k); in __bch2_bkey_fsck_err()
692 prt_newline(&buf); in __bch2_bkey_fsck_err()
696 prt_vprintf(&buf, fmt, args); in __bch2_bkey_fsck_err()
699 int ret = __bch2_fsck_err(c, NULL, fsck_flags, err, "%s, delete?", buf.buf); in __bch2_bkey_fsck_err()
700 printbuf_exit(&buf); in __bch2_bkey_fsck_err()