Lines Matching refs:out
64 struct printbuf out = PRINTBUF; \
65 ssize_t ret = fn ## _to_text(&out, kobj, attr); \
67 if (out.pos && out.buf[out.pos - 1] != '\n') \
68 prt_newline(&out); \
70 if (!ret && out.allocation_failure) \
74 ret = min_t(size_t, out.pos, PAGE_SIZE - 1); \
75 memcpy(buf, out.buf, ret); \
77 printbuf_exit(&out); \
81 static ssize_t fn ## _to_text(struct printbuf *out, struct kobject *kobj,\
108 prt_printf(out, fmt "\n", __VA_ARGS__); \
114 snprint(out, var); \
120 prt_human_readable_s64(out, val); \
245 static int bch2_compression_stats_to_text(struct printbuf *out, struct bch_fs *c) in bch2_compression_stats_to_text() argument
247 prt_str(out, "type"); in bch2_compression_stats_to_text()
248 printbuf_tabstop_push(out, 12); in bch2_compression_stats_to_text()
249 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
250 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
251 printbuf_tabstop_push(out, 24); in bch2_compression_stats_to_text()
252 prt_printf(out, "type\tcompressed\runcompressed\raverage extent size\r\n"); in bch2_compression_stats_to_text()
265 bch2_prt_compression_type(out, i); in bch2_compression_stats_to_text()
266 prt_tab(out); in bch2_compression_stats_to_text()
268 prt_human_readable_u64(out, sectors_compressed << 9); in bch2_compression_stats_to_text()
269 prt_tab_rjust(out); in bch2_compression_stats_to_text()
271 prt_human_readable_u64(out, sectors_uncompressed << 9); in bch2_compression_stats_to_text()
272 prt_tab_rjust(out); in bch2_compression_stats_to_text()
274 prt_human_readable_u64(out, nr_extents in bch2_compression_stats_to_text()
277 prt_tab_rjust(out); in bch2_compression_stats_to_text()
278 prt_newline(out); in bch2_compression_stats_to_text()
284 static void bch2_gc_gens_pos_to_text(struct printbuf *out, struct bch_fs *c) in bch2_gc_gens_pos_to_text() argument
286 bch2_btree_id_to_text(out, c->gc_gens_btree); in bch2_gc_gens_pos_to_text()
287 prt_printf(out, ": "); in bch2_gc_gens_pos_to_text()
288 bch2_bpos_to_text(out, c->gc_gens_pos); in bch2_gc_gens_pos_to_text()
289 prt_printf(out, "\n"); in bch2_gc_gens_pos_to_text()
292 static void bch2_fs_usage_base_to_text(struct printbuf *out, struct bch_fs *c) in bch2_fs_usage_base_to_text() argument
298 prt_printf(out, "hidden:\t\t%llu\n", b.hidden); in bch2_fs_usage_base_to_text()
299 prt_printf(out, "btree:\t\t%llu\n", b.btree); in bch2_fs_usage_base_to_text()
300 prt_printf(out, "data:\t\t%llu\n", b.data); in bch2_fs_usage_base_to_text()
301 prt_printf(out, "cached:\t%llu\n", b.cached); in bch2_fs_usage_base_to_text()
302 prt_printf(out, "reserved:\t\t%llu\n", b.reserved); in bch2_fs_usage_base_to_text()
303 prt_printf(out, "nr_inodes:\t%llu\n", b.nr_inodes); in bch2_fs_usage_base_to_text()
314 prt_bitflags(out, bch2_fs_flag_strs, c->flags); in SHOW()
319 bch2_btree_write_stats_to_text(out, c); in SHOW()
322 bch2_gc_gens_pos_to_text(out, c); in SHOW()
327 bch2_copygc_wait_to_text(out, c); in SHOW()
330 bch2_rebalance_status_to_text(out, c); in SHOW()
333 bch2_snapshot_delete_status_to_text(out, c); in SHOW()
336 bch2_recovery_pass_status_to_text(out, c); in SHOW()
341 bch2_journal_debug_to_text(out, &c->journal); in SHOW()
344 bch2_btree_cache_to_text(out, &c->btree_cache); in SHOW()
347 bch2_btree_key_cache_to_text(out, &c->btree_key_cache); in SHOW()
350 bch2_btree_reserve_cache_to_text(out, c); in SHOW()
353 bch2_open_buckets_to_text(out, c, NULL); in SHOW()
356 bch2_open_buckets_partial_to_text(out, c); in SHOW()
359 bch2_compression_stats_to_text(out, c); in SHOW()
362 bch2_fs_errors_to_text(out, c); in SHOW()
365 bch2_new_stripes_to_text(out, c); in SHOW()
368 bch2_io_timers_to_text(out, &c->io_clock[READ]); in SHOW()
371 bch2_io_timers_to_text(out, &c->io_clock[WRITE]); in SHOW()
374 bch2_fs_moving_ctxts_to_text(out, c); in SHOW()
377 enumerated_ref_to_text(out, &c->writes, bch2_write_refs); in SHOW()
380 bch2_nocow_locks_to_text(out, &c->nocow_locks); in SHOW()
383 bch2_disk_groups_to_text(out, c); in SHOW()
386 bch2_fs_alloc_debug_to_text(out, c); in SHOW()
389 bch2_fs_usage_base_to_text(out, c); in SHOW()
523 printbuf_tabstop_push(out, 32); in SHOW()
534 prt_printf(out, "since mount:\t"); \ in SHOW()
535 (f & TYPE_COUNTER) ? prt_u64(out, counter_since_mount) :\ in SHOW()
536 prt_human_readable_u64(out, counter_since_mount); \ in SHOW()
537 prt_newline(out); \ in SHOW()
539 prt_printf(out, "since filesystem creation:\t"); \ in SHOW()
540 (f & TYPE_COUNTER) ? prt_u64(out, counter) : \ in SHOW()
541 prt_human_readable_u64(out, counter); \ in SHOW()
542 prt_newline(out); \ in SHOW()
568 return bch2_fs_to_text(out, &c->kobj, attr); in SHOW()
628 struct printbuf *out) in sysfs_opt_show() argument
641 bch2_opt_to_text(out, c, c->disk_sb.sb, opt, v, OPT_SHOW_FULL_LIST); in sysfs_opt_show()
642 prt_char(out, '\n'); in sysfs_opt_show()
707 return sysfs_opt_show(c, NULL, id, out); in SHOW()
749 bch2_time_stats_to_text(out, &c->times[BCH_TIME_##name]); in SHOW()
783 static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) in dev_io_done_to_text() argument
788 prt_printf(out, "%s:\n", bch2_rw[rw]); in dev_io_done_to_text()
791 prt_printf(out, "%-12s:%12llu\n", in dev_io_done_to_text()
809 bch2_disk_path_to_text(out, c, ca->mi.group - 1); in SHOW()
810 prt_char(out, '\n'); in SHOW()
814 prt_bitflags(out, __bch2_data_types, bch2_dev_has_data(c, ca)); in SHOW()
815 prt_char(out, '\n'); in SHOW()
819 dev_io_done_to_text(out, ca); in SHOW()
822 bch2_dev_io_errors_to_text(out, ca); in SHOW()
828 bch2_time_stats_to_text(out, &ca->io_latency[READ].stats); in SHOW()
831 bch2_time_stats_to_text(out, &ca->io_latency[WRITE].stats); in SHOW()
838 bch2_dev_alloc_debug_to_text(out, ca); in SHOW()
841 bch2_open_buckets_to_text(out, c, ca); in SHOW()
845 return sysfs_opt_show(c, ca, opt_id, out); in SHOW()
848 enumerated_ref_to_text(out, &ca->io_ref[READ], bch2_dev_read_refs); in SHOW()
851 enumerated_ref_to_text(out, &ca->io_ref[WRITE], bch2_dev_write_refs); in SHOW()