Lines Matching full:out
60 struct printbuf out = PRINTBUF; \
61 ssize_t ret = fn ## _to_text(&out, kobj, attr); \
63 if (out.pos && out.buf[out.pos - 1] != '\n') \
64 prt_newline(&out); \
66 if (!ret && out.allocation_failure) \
70 ret = min_t(size_t, out.pos, PAGE_SIZE - 1); \
71 memcpy(buf, out.buf, ret); \
73 printbuf_exit(&out); \
77 static ssize_t fn ## _to_text(struct printbuf *out, struct kobject *kobj,\
104 prt_printf(out, fmt "\n", __VA_ARGS__); \
110 snprint(out, var); \
116 prt_human_readable_s64(out, val); \
192 static void bch2_write_refs_to_text(struct printbuf *out, struct bch_fs *c) in bch2_write_refs_to_text() argument
194 bch2_printbuf_tabstop_push(out, 24); in bch2_write_refs_to_text()
197 prt_printf(out, "%s\t%li\n", bch2_write_refs[i], atomic_long_read(&c->writes[i])); in bch2_write_refs_to_text()
255 static int bch2_compression_stats_to_text(struct printbuf *out, struct bch_fs *c) in bch2_compression_stats_to_text() argument
257 prt_str(out, "type"); in bch2_compression_stats_to_text()
258 printbuf_tabstop_push(out, 12); in bch2_compression_stats_to_text()
259 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
260 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
261 printbuf_tabstop_push(out, 24); in bch2_compression_stats_to_text()
262 prt_printf(out, "type\tcompressed\runcompressed\raverage extent size\r\n"); in bch2_compression_stats_to_text()
277 bch2_prt_compression_type(out, i); in bch2_compression_stats_to_text()
278 prt_tab(out); in bch2_compression_stats_to_text()
280 prt_human_readable_u64(out, sectors_compressed << 9); in bch2_compression_stats_to_text()
281 prt_tab_rjust(out); in bch2_compression_stats_to_text()
283 prt_human_readable_u64(out, sectors_uncompressed << 9); in bch2_compression_stats_to_text()
284 prt_tab_rjust(out); in bch2_compression_stats_to_text()
286 prt_human_readable_u64(out, nr_extents in bch2_compression_stats_to_text()
289 prt_tab_rjust(out); in bch2_compression_stats_to_text()
290 prt_newline(out); in bch2_compression_stats_to_text()
296 static void bch2_gc_gens_pos_to_text(struct printbuf *out, struct bch_fs *c) in bch2_gc_gens_pos_to_text() argument
298 bch2_btree_id_to_text(out, c->gc_gens_btree); in bch2_gc_gens_pos_to_text()
299 prt_printf(out, ": "); in bch2_gc_gens_pos_to_text()
300 bch2_bpos_to_text(out, c->gc_gens_pos); in bch2_gc_gens_pos_to_text()
301 prt_printf(out, "\n"); in bch2_gc_gens_pos_to_text()
304 static void bch2_fs_usage_base_to_text(struct printbuf *out, struct bch_fs *c) in bch2_fs_usage_base_to_text() argument
310 prt_printf(out, "hidden:\t\t%llu\n", b.hidden); in bch2_fs_usage_base_to_text()
311 prt_printf(out, "btree:\t\t%llu\n", b.btree); in bch2_fs_usage_base_to_text()
312 prt_printf(out, "data:\t\t%llu\n", b.data); in bch2_fs_usage_base_to_text()
313 prt_printf(out, "cached:\t%llu\n", b.cached); in bch2_fs_usage_base_to_text()
314 prt_printf(out, "reserved:\t\t%llu\n", b.reserved); in bch2_fs_usage_base_to_text()
315 prt_printf(out, "nr_inodes:\t%llu\n", b.nr_inodes); in bch2_fs_usage_base_to_text()
326 prt_bitflags(out, bch2_fs_flag_strs, c->flags); in SHOW()
331 bch2_btree_write_stats_to_text(out, c); in SHOW()
334 bch2_gc_gens_pos_to_text(out, c); in SHOW()
339 bch2_copygc_wait_to_text(out, c); in SHOW()
342 bch2_rebalance_status_to_text(out, c); in SHOW()
347 bch2_journal_debug_to_text(out, &c->journal); in SHOW()
350 bch2_btree_cache_to_text(out, &c->btree_cache); in SHOW()
353 bch2_btree_key_cache_to_text(out, &c->btree_key_cache); in SHOW()
356 bch2_btree_reserve_cache_to_text(out, c); in SHOW()
359 bch2_stripes_heap_to_text(out, c); in SHOW()
362 bch2_open_buckets_to_text(out, c, NULL); in SHOW()
365 bch2_open_buckets_partial_to_text(out, c); in SHOW()
368 bch2_write_points_to_text(out, c); in SHOW()
371 bch2_compression_stats_to_text(out, c); in SHOW()
374 bch2_new_stripes_to_text(out, c); in SHOW()
377 bch2_io_timers_to_text(out, &c->io_clock[READ]); in SHOW()
380 bch2_io_timers_to_text(out, &c->io_clock[WRITE]); in SHOW()
383 bch2_fs_moving_ctxts_to_text(out, c); in SHOW()
387 bch2_write_refs_to_text(out, c); in SHOW()
391 bch2_nocow_locks_to_text(out, &c->nocow_locks); in SHOW()
394 bch2_disk_groups_to_text(out, c); in SHOW()
397 bch2_fs_alloc_debug_to_text(out, c); in SHOW()
400 bch2_fs_usage_base_to_text(out, c); in SHOW()
506 printbuf_tabstop_push(out, 32); in SHOW()
517 prt_printf(out, "since mount:\t"); \ in SHOW()
518 (f & TYPE_COUNTER) ? prt_u64(out, counter_since_mount) :\ in SHOW()
519 prt_human_readable_u64(out, counter_since_mount); \ in SHOW()
520 prt_newline(out); \ in SHOW()
522 prt_printf(out, "since filesystem creation:\t"); \ in SHOW()
523 (f & TYPE_COUNTER) ? prt_u64(out, counter) : \ in SHOW()
524 prt_human_readable_u64(out, counter); \ in SHOW()
525 prt_newline(out); \ in SHOW()
551 return bch2_fs_to_text(out, &c->kobj, attr); in SHOW()
614 bch2_opt_to_text(out, c, c->disk_sb.sb, opt, v, OPT_SHOW_FULL_LIST); in SHOW()
615 prt_char(out, '\n'); in SHOW()
703 bch2_time_stats_to_text(out, &c->times[BCH_TIME_##name]); in SHOW()
737 static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) in dev_io_done_to_text() argument
742 prt_printf(out, "%s:\n", bch2_rw[rw]); in dev_io_done_to_text()
745 prt_printf(out, "%-12s:%12llu\n", in dev_io_done_to_text()
766 bch2_disk_path_to_text(out, c, ca->mi.group - 1); in SHOW()
767 prt_char(out, '\n'); in SHOW()
771 prt_bitflags(out, __bch2_data_types, bch2_dev_has_data(c, ca)); in SHOW()
772 prt_char(out, '\n'); in SHOW()
776 prt_string_option(out, bch2_member_states, ca->mi.state); in SHOW()
777 prt_char(out, '\n'); in SHOW()
781 dev_io_done_to_text(out, ca); in SHOW()
784 bch2_dev_io_errors_to_text(out, ca); in SHOW()
790 bch2_time_stats_to_text(out, &ca->io_latency[READ].stats); in SHOW()
793 bch2_time_stats_to_text(out, &ca->io_latency[WRITE].stats); in SHOW()
800 bch2_dev_alloc_debug_to_text(out, ca); in SHOW()
803 bch2_open_buckets_to_text(out, c, ca); in SHOW()