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); \
189 static void bch2_write_refs_to_text(struct printbuf *out, struct bch_fs *c) in bch2_write_refs_to_text() argument
191 bch2_printbuf_tabstop_push(out, 24); in bch2_write_refs_to_text()
194 prt_printf(out, "%s\t%li\n", bch2_write_refs[i], atomic_long_read(&c->writes[i])); in bch2_write_refs_to_text()
250 static int bch2_compression_stats_to_text(struct printbuf *out, struct bch_fs *c) in bch2_compression_stats_to_text() argument
252 prt_str(out, "type"); in bch2_compression_stats_to_text()
253 printbuf_tabstop_push(out, 12); in bch2_compression_stats_to_text()
254 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
255 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
256 printbuf_tabstop_push(out, 24); in bch2_compression_stats_to_text()
257 prt_printf(out, "type\tcompressed\runcompressed\raverage extent size\r\n"); in bch2_compression_stats_to_text()
270 bch2_prt_compression_type(out, i); in bch2_compression_stats_to_text()
271 prt_tab(out); in bch2_compression_stats_to_text()
273 prt_human_readable_u64(out, sectors_compressed << 9); in bch2_compression_stats_to_text()
274 prt_tab_rjust(out); in bch2_compression_stats_to_text()
276 prt_human_readable_u64(out, sectors_uncompressed << 9); in bch2_compression_stats_to_text()
277 prt_tab_rjust(out); in bch2_compression_stats_to_text()
279 prt_human_readable_u64(out, nr_extents in bch2_compression_stats_to_text()
282 prt_tab_rjust(out); in bch2_compression_stats_to_text()
283 prt_newline(out); in bch2_compression_stats_to_text()
289 static void bch2_gc_gens_pos_to_text(struct printbuf *out, struct bch_fs *c) in bch2_gc_gens_pos_to_text() argument
291 bch2_btree_id_to_text(out, c->gc_gens_btree); in bch2_gc_gens_pos_to_text()
292 prt_printf(out, ": "); in bch2_gc_gens_pos_to_text()
293 bch2_bpos_to_text(out, c->gc_gens_pos); in bch2_gc_gens_pos_to_text()
294 prt_printf(out, "\n"); in bch2_gc_gens_pos_to_text()
297 static void bch2_fs_usage_base_to_text(struct printbuf *out, struct bch_fs *c) in bch2_fs_usage_base_to_text() argument
303 prt_printf(out, "hidden:\t\t%llu\n", b.hidden); in bch2_fs_usage_base_to_text()
304 prt_printf(out, "btree:\t\t%llu\n", b.btree); in bch2_fs_usage_base_to_text()
305 prt_printf(out, "data:\t\t%llu\n", b.data); in bch2_fs_usage_base_to_text()
306 prt_printf(out, "cached:\t%llu\n", b.cached); in bch2_fs_usage_base_to_text()
307 prt_printf(out, "reserved:\t\t%llu\n", b.reserved); in bch2_fs_usage_base_to_text()
308 prt_printf(out, "nr_inodes:\t%llu\n", b.nr_inodes); in bch2_fs_usage_base_to_text()
319 prt_bitflags(out, bch2_fs_flag_strs, c->flags); in SHOW()
324 bch2_btree_write_stats_to_text(out, c); in SHOW()
327 bch2_gc_gens_pos_to_text(out, c); in SHOW()
332 bch2_copygc_wait_to_text(out, c); in SHOW()
335 bch2_rebalance_status_to_text(out, c); in SHOW()
340 bch2_journal_debug_to_text(out, &c->journal); in SHOW()
343 bch2_btree_cache_to_text(out, &c->btree_cache); in SHOW()
346 bch2_btree_key_cache_to_text(out, &c->btree_key_cache); in SHOW()
349 bch2_btree_reserve_cache_to_text(out, c); in SHOW()
352 bch2_open_buckets_to_text(out, c, NULL); in SHOW()
355 bch2_open_buckets_partial_to_text(out, c); in SHOW()
358 bch2_compression_stats_to_text(out, c); in SHOW()
361 bch2_new_stripes_to_text(out, c); in SHOW()
364 bch2_io_timers_to_text(out, &c->io_clock[READ]); in SHOW()
367 bch2_io_timers_to_text(out, &c->io_clock[WRITE]); in SHOW()
370 bch2_fs_moving_ctxts_to_text(out, c); in SHOW()
374 bch2_write_refs_to_text(out, c); in SHOW()
378 bch2_nocow_locks_to_text(out, &c->nocow_locks); in SHOW()
381 bch2_disk_groups_to_text(out, c); in SHOW()
384 bch2_fs_alloc_debug_to_text(out, c); in SHOW()
387 bch2_fs_usage_base_to_text(out, c); in SHOW()
496 printbuf_tabstop_push(out, 32); in SHOW()
507 prt_printf(out, "since mount:\t"); \ in SHOW()
508 (f & TYPE_COUNTER) ? prt_u64(out, counter_since_mount) :\ in SHOW()
509 prt_human_readable_u64(out, counter_since_mount); \ in SHOW()
510 prt_newline(out); \ in SHOW()
512 prt_printf(out, "since filesystem creation:\t"); \ in SHOW()
513 (f & TYPE_COUNTER) ? prt_u64(out, counter) : \ in SHOW()
514 prt_human_readable_u64(out, counter); \ in SHOW()
515 prt_newline(out); \ in SHOW()
541 return bch2_fs_to_text(out, &c->kobj, attr); in SHOW()
599 struct printbuf *out) in sysfs_opt_show() argument
612 bch2_opt_to_text(out, c, c->disk_sb.sb, opt, v, OPT_SHOW_FULL_LIST); in sysfs_opt_show()
613 prt_char(out, '\n'); in sysfs_opt_show()
684 return sysfs_opt_show(c, NULL, id, out); in SHOW()
726 bch2_time_stats_to_text(out, &c->times[BCH_TIME_##name]); in SHOW()
760 static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) in dev_io_done_to_text() argument
765 prt_printf(out, "%s:\n", bch2_rw[rw]); in dev_io_done_to_text()
768 prt_printf(out, "%-12s:%12llu\n", in dev_io_done_to_text()
786 bch2_disk_path_to_text(out, c, ca->mi.group - 1); in SHOW()
787 prt_char(out, '\n'); in SHOW()
791 prt_bitflags(out, __bch2_data_types, bch2_dev_has_data(c, ca)); in SHOW()
792 prt_char(out, '\n'); in SHOW()
796 dev_io_done_to_text(out, ca); in SHOW()
799 bch2_dev_io_errors_to_text(out, ca); in SHOW()
805 bch2_time_stats_to_text(out, &ca->io_latency[READ].stats); in SHOW()
808 bch2_time_stats_to_text(out, &ca->io_latency[WRITE].stats); in SHOW()
815 bch2_dev_alloc_debug_to_text(out, ca); in SHOW()
818 bch2_open_buckets_to_text(out, c, ca); in SHOW()
822 return sysfs_opt_show(c, ca, opt_id, out); in SHOW()