Lines Matching defs:out

50 static void bch2_journal_buf_to_text(struct printbuf *out, struct journal *j, u64 seq)
56 prt_printf(out, "seq:\t%llu\n", seq);
57 printbuf_indent_add(out, 2);
59 prt_printf(out, "refcount:\t%u\n", journal_state_count(s, i));
61 prt_printf(out, "size:\t");
62 prt_human_readable_u64(out, vstruct_bytes(buf->data));
63 prt_newline(out);
65 prt_printf(out, "expires:\t");
66 prt_printf(out, "%li jiffies\n", buf->expires - jiffies);
68 prt_printf(out, "flags:\t");
70 prt_str(out, "noflush ");
72 prt_str(out, "must_flush ");
74 prt_str(out, "separate_flush ");
76 prt_str(out, "need_flush_to_write_buffer ");
78 prt_str(out, "write_started ");
80 prt_str(out, "write_allocated ");
82 prt_str(out, "write_done");
83 prt_newline(out);
85 printbuf_indent_sub(out, 2);
88 static void bch2_journal_bufs_to_text(struct printbuf *out, struct journal *j)
90 if (!out->nr_tabstops)
91 printbuf_tabstop_push(out, 24);
96 bch2_journal_buf_to_text(out, j, seq);
97 prt_printf(out, "last buf %s\n", journal_entry_is_open(j) ? "open" : "closed");
254 /* Close out old buffer: */
513 goto out;
518 goto out;
549 out:
626 goto out;
642 out:
674 goto out;
679 goto out;
684 goto out;
744 out:
800 goto out;
809 goto out;
815 out:
1411 void __bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
1418 if (!out->nr_tabstops)
1419 printbuf_tabstop_push(out, 28);
1420 out->atomic++;
1425 prt_printf(out, "flags:\t");
1426 prt_bitflags(out, bch2_journal_flags_strs, j->flags);
1427 prt_newline(out);
1428 prt_printf(out, "dirty journal entries:\t%llu/%llu\n", fifo_used(&j->pin), j->pin.size);
1429 prt_printf(out, "seq:\t%llu\n", journal_cur_seq(j));
1430 prt_printf(out, "seq_ondisk:\t%llu\n", j->seq_ondisk);
1431 prt_printf(out, "last_seq:\t%llu\n", journal_last_seq(j));
1432 prt_printf(out, "last_seq_ondisk:\t%llu\n", j->last_seq_ondisk);
1433 prt_printf(out, "flushed_seq_ondisk:\t%llu\n", j->flushed_seq_ondisk);
1434 prt_printf(out, "watermark:\t%s\n", bch2_watermarks[j->watermark]);
1435 prt_printf(out, "each entry reserved:\t%u\n", j->entry_u64s_reserved);
1436 prt_printf(out, "nr flush writes:\t%llu\n", j->nr_flush_writes);
1437 prt_printf(out, "nr noflush writes:\t%llu\n", j->nr_noflush_writes);
1438 prt_printf(out, "average write size:\t");
1439 prt_human_readable_u64(out, nr_writes ? div64_u64(j->entry_bytes_written, nr_writes) : 0);
1440 prt_newline(out);
1441 prt_printf(out, "nr direct reclaim:\t%llu\n", j->nr_direct_reclaim);
1442 prt_printf(out, "nr background reclaim:\t%llu\n", j->nr_background_reclaim);
1443 prt_printf(out, "reclaim kicked:\t%u\n", j->reclaim_kicked);
1444 prt_printf(out, "reclaim runs in:\t%u ms\n", time_after(j->next_reclaim, now)
1446 prt_printf(out, "blocked:\t%u\n", j->blocked);
1447 prt_printf(out, "current entry sectors:\t%u\n", j->cur_entry_sectors);
1448 prt_printf(out, "current entry error:\t%s\n", bch2_journal_errors[j->cur_entry_error]);
1449 prt_printf(out, "current entry:\t");
1453 prt_printf(out, "error\n");
1456 prt_printf(out, "closed\n");
1459 prt_printf(out, "%u/%u\n", s.cur_entry_offset, j->cur_entry_u64s);
1463 prt_printf(out, "unwritten entries:\n");
1464 bch2_journal_bufs_to_text(out, j);
1466 prt_printf(out, "space:\n");
1467 printbuf_indent_add(out, 2);
1468 prt_printf(out, "discarded\t%u:%u\n",
1471 prt_printf(out, "clean ondisk\t%u:%u\n",
1474 prt_printf(out, "clean\t%u:%u\n",
1477 prt_printf(out, "total\t%u:%u\n",
1480 printbuf_indent_sub(out, 2);
1491 prt_printf(out, "dev %u:\n", ca->dev_idx);
1492 printbuf_indent_add(out, 2);
1493 prt_printf(out, "nr\t%u\n", ja->nr);
1494 prt_printf(out, "bucket size\t%u\n", ca->mi.bucket_size);
1495 prt_printf(out, "available\t%u:%u\n", bch2_journal_dev_buckets_available(j, ja, journal_space_discarded), ja->sectors_free);
1496 prt_printf(out, "discard_idx\t%u\n", ja->discard_idx);
1497 prt_printf(out, "dirty_ondisk\t%u (seq %llu)\n",ja->dirty_idx_ondisk, ja->bucket_seq[ja->dirty_idx_ondisk]);
1498 prt_printf(out, "dirty_idx\t%u (seq %llu)\n", ja->dirty_idx, ja->bucket_seq[ja->dirty_idx]);
1499 prt_printf(out, "cur_idx\t%u (seq %llu)\n", ja->cur_idx, ja->bucket_seq[ja->cur_idx]);
1500 printbuf_indent_sub(out, 2);
1505 --out->atomic;
1508 void bch2_journal_debug_to_text(struct printbuf *out, struct journal *j)
1511 __bch2_journal_debug_to_text(out, j);
1515 bool bch2_journal_seq_pins_to_text(struct printbuf *out, struct journal *j, u64 *seq)
1528 out->atomic++;
1532 prt_printf(out, "%llu: count %u\n", *seq, atomic_read(&pin_list->count));
1533 printbuf_indent_add(out, 2);
1537 prt_printf(out, "\t%px %ps\n", pin, pin->flush);
1540 prt_printf(out, "flushed:\n");
1543 prt_printf(out, "\t%px %ps\n", pin, pin->flush);
1545 printbuf_indent_sub(out, 2);
1547 --out->atomic;
1553 void bch2_journal_pins_to_text(struct printbuf *out, struct journal *j)
1557 while (!bch2_journal_seq_pins_to_text(out, j, &seq))