Lines Matching full:out

58 	struct printbuf out = PRINTBUF;					\
59 ssize_t ret = fn ## _to_text(&out, kobj, attr); \
61 if (out.pos && out.buf[out.pos - 1] != '\n') \
62 prt_newline(&out); \
64 if (!ret && out.allocation_failure) \
68 ret = min_t(size_t, out.pos, PAGE_SIZE - 1); \
69 memcpy(buf, out.buf, ret); \
71 printbuf_exit(&out); \
75 static ssize_t fn ## _to_text(struct printbuf *out, struct kobject *kobj,\
102 prt_printf(out, fmt "\n", __VA_ARGS__); \
108 snprint(out, var); \
114 prt_human_readable_s64(out, val); \
188 static void bch2_write_refs_to_text(struct printbuf *out, struct bch_fs *c) in bch2_write_refs_to_text() argument
190 bch2_printbuf_tabstop_push(out, 24); in bch2_write_refs_to_text()
193 prt_str(out, bch2_write_refs[i]); in bch2_write_refs_to_text()
194 prt_tab(out); in bch2_write_refs_to_text()
195 prt_printf(out, "%li", atomic_long_read(&c->writes[i])); in bch2_write_refs_to_text()
196 prt_newline(out); in bch2_write_refs_to_text()
257 static int bch2_compression_stats_to_text(struct printbuf *out, struct bch_fs *c) in bch2_compression_stats_to_text() argument
316 prt_str(out, "type"); in bch2_compression_stats_to_text()
317 printbuf_tabstop_push(out, 12); in bch2_compression_stats_to_text()
318 prt_tab(out); in bch2_compression_stats_to_text()
320 prt_str(out, "compressed"); in bch2_compression_stats_to_text()
321 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
322 prt_tab_rjust(out); in bch2_compression_stats_to_text()
324 prt_str(out, "uncompressed"); in bch2_compression_stats_to_text()
325 printbuf_tabstop_push(out, 16); in bch2_compression_stats_to_text()
326 prt_tab_rjust(out); in bch2_compression_stats_to_text()
328 prt_str(out, "average extent size"); in bch2_compression_stats_to_text()
329 printbuf_tabstop_push(out, 24); in bch2_compression_stats_to_text()
330 prt_tab_rjust(out); in bch2_compression_stats_to_text()
331 prt_newline(out); in bch2_compression_stats_to_text()
334 bch2_prt_compression_type(out, i); in bch2_compression_stats_to_text()
335 prt_tab(out); in bch2_compression_stats_to_text()
337 prt_human_readable_u64(out, s[i].sectors_compressed << 9); in bch2_compression_stats_to_text()
338 prt_tab_rjust(out); in bch2_compression_stats_to_text()
340 prt_human_readable_u64(out, s[i].sectors_uncompressed << 9); in bch2_compression_stats_to_text()
341 prt_tab_rjust(out); in bch2_compression_stats_to_text()
343 prt_human_readable_u64(out, s[i].nr_extents in bch2_compression_stats_to_text()
346 prt_tab_rjust(out); in bch2_compression_stats_to_text()
347 prt_newline(out); in bch2_compression_stats_to_text()
351 prt_printf(out, "%llu compressed & incompressible extents", compressed_incompressible); in bch2_compression_stats_to_text()
352 prt_newline(out); in bch2_compression_stats_to_text()
358 static void bch2_gc_gens_pos_to_text(struct printbuf *out, struct bch_fs *c) in bch2_gc_gens_pos_to_text() argument
360 prt_printf(out, "%s: ", bch2_btree_id_str(c->gc_gens_btree)); in bch2_gc_gens_pos_to_text()
361 bch2_bpos_to_text(out, c->gc_gens_pos); in bch2_gc_gens_pos_to_text()
362 prt_printf(out, "\n"); in bch2_gc_gens_pos_to_text()
388 prt_bitflags(out, bch2_fs_flag_strs, c->flags); in SHOW()
393 bch2_btree_write_stats_to_text(out, c); in SHOW()
398 bch2_gc_gens_pos_to_text(out, c); in SHOW()
406 bch2_copygc_wait_to_text(out, c); in SHOW()
409 bch2_rebalance_status_to_text(out, c); in SHOW()
416 bch2_journal_debug_to_text(out, &c->journal); in SHOW()
419 bch2_btree_updates_to_text(out, c); in SHOW()
422 bch2_btree_cache_to_text(out, c); in SHOW()
425 bch2_btree_key_cache_to_text(out, &c->btree_key_cache); in SHOW()
428 bch2_stripes_heap_to_text(out, c); in SHOW()
431 bch2_open_buckets_to_text(out, c); in SHOW()
434 bch2_open_buckets_partial_to_text(out, c); in SHOW()
437 bch2_write_points_to_text(out, c); in SHOW()
440 bch2_compression_stats_to_text(out, c); in SHOW()
443 bch2_new_stripes_to_text(out, c); in SHOW()
446 bch2_io_timers_to_text(out, &c->io_clock[READ]); in SHOW()
449 bch2_io_timers_to_text(out, &c->io_clock[WRITE]); in SHOW()
452 bch2_fs_moving_ctxts_to_text(out, c); in SHOW()
456 bch2_write_refs_to_text(out, c); in SHOW()
460 bch2_nocow_locks_to_text(out, &c->nocow_locks); in SHOW()
463 bch2_disk_groups_to_text(out, c); in SHOW()
588 printbuf_tabstop_push(out, 32); in SHOW()
594 prt_printf(out, "since mount:"); \ in SHOW()
595 prt_tab(out); \ in SHOW()
596 prt_human_readable_u64(out, counter_since_mount); \ in SHOW()
597 prt_newline(out); \ in SHOW()
599 prt_printf(out, "since filesystem creation:"); \ in SHOW()
600 prt_tab(out); \ in SHOW()
601 prt_human_readable_u64(out, counter); \ in SHOW()
602 prt_newline(out); \ in SHOW()
628 return bch2_fs_to_text(out, &c->kobj, attr); in SHOW()
689 bch2_opt_to_text(out, c, c->disk_sb.sb, opt, v, OPT_SHOW_FULL_LIST); in SHOW()
690 prt_char(out, '\n'); in SHOW()
771 bch2_time_stats_to_text(out, &c->times[BCH_TIME_##name]); in SHOW()
792 static void dev_alloc_debug_to_text(struct printbuf *out, struct bch_dev *ca) in dev_alloc_debug_to_text() argument
803 printbuf_tabstop_push(out, 8); in dev_alloc_debug_to_text()
804 printbuf_tabstop_push(out, 16); in dev_alloc_debug_to_text()
805 printbuf_tabstop_push(out, 16); in dev_alloc_debug_to_text()
806 printbuf_tabstop_push(out, 16); in dev_alloc_debug_to_text()
807 printbuf_tabstop_push(out, 16); in dev_alloc_debug_to_text()
809 bch2_dev_usage_to_text(out, &stats); in dev_alloc_debug_to_text()
811 prt_newline(out); in dev_alloc_debug_to_text()
813 prt_printf(out, "reserves:"); in dev_alloc_debug_to_text()
814 prt_newline(out); in dev_alloc_debug_to_text()
816 prt_str(out, bch2_watermarks[i]); in dev_alloc_debug_to_text()
817 prt_tab(out); in dev_alloc_debug_to_text()
818 prt_u64(out, bch2_dev_buckets_reserved(ca, i)); in dev_alloc_debug_to_text()
819 prt_tab_rjust(out); in dev_alloc_debug_to_text()
820 prt_newline(out); in dev_alloc_debug_to_text()
823 prt_newline(out); in dev_alloc_debug_to_text()
825 printbuf_tabstops_reset(out); in dev_alloc_debug_to_text()
826 printbuf_tabstop_push(out, 24); in dev_alloc_debug_to_text()
828 prt_str(out, "freelist_wait"); in dev_alloc_debug_to_text()
829 prt_tab(out); in dev_alloc_debug_to_text()
830 prt_str(out, c->freelist_wait.list.first ? "waiting" : "empty"); in dev_alloc_debug_to_text()
831 prt_newline(out); in dev_alloc_debug_to_text()
833 prt_str(out, "open buckets allocated"); in dev_alloc_debug_to_text()
834 prt_tab(out); in dev_alloc_debug_to_text()
835 prt_u64(out, OPEN_BUCKETS_COUNT - c->open_buckets_nr_free); in dev_alloc_debug_to_text()
836 prt_newline(out); in dev_alloc_debug_to_text()
838 prt_str(out, "open buckets this dev"); in dev_alloc_debug_to_text()
839 prt_tab(out); in dev_alloc_debug_to_text()
840 prt_u64(out, ca->nr_open_buckets); in dev_alloc_debug_to_text()
841 prt_newline(out); in dev_alloc_debug_to_text()
843 prt_str(out, "open buckets total"); in dev_alloc_debug_to_text()
844 prt_tab(out); in dev_alloc_debug_to_text()
845 prt_u64(out, OPEN_BUCKETS_COUNT); in dev_alloc_debug_to_text()
846 prt_newline(out); in dev_alloc_debug_to_text()
848 prt_str(out, "open_buckets_wait"); in dev_alloc_debug_to_text()
849 prt_tab(out); in dev_alloc_debug_to_text()
850 prt_str(out, c->open_buckets_wait.list.first ? "waiting" : "empty"); in dev_alloc_debug_to_text()
851 prt_newline(out); in dev_alloc_debug_to_text()
853 prt_str(out, "open_buckets_btree"); in dev_alloc_debug_to_text()
854 prt_tab(out); in dev_alloc_debug_to_text()
855 prt_u64(out, nr[BCH_DATA_btree]); in dev_alloc_debug_to_text()
856 prt_newline(out); in dev_alloc_debug_to_text()
858 prt_str(out, "open_buckets_user"); in dev_alloc_debug_to_text()
859 prt_tab(out); in dev_alloc_debug_to_text()
860 prt_u64(out, nr[BCH_DATA_user]); in dev_alloc_debug_to_text()
861 prt_newline(out); in dev_alloc_debug_to_text()
863 prt_str(out, "buckets_to_invalidate"); in dev_alloc_debug_to_text()
864 prt_tab(out); in dev_alloc_debug_to_text()
865 prt_u64(out, should_invalidate_buckets(ca, stats)); in dev_alloc_debug_to_text()
866 prt_newline(out); in dev_alloc_debug_to_text()
868 prt_str(out, "btree reserve cache"); in dev_alloc_debug_to_text()
869 prt_tab(out); in dev_alloc_debug_to_text()
870 prt_u64(out, c->btree_reserve_cache_nr); in dev_alloc_debug_to_text()
871 prt_newline(out); in dev_alloc_debug_to_text()
880 static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) in dev_io_done_to_text() argument
885 prt_printf(out, "%s:\n", bch2_rw[rw]); in dev_io_done_to_text()
888 prt_printf(out, "%-12s:%12llu\n", in dev_io_done_to_text()
909 bch2_disk_path_to_text(out, c, ca->mi.group - 1); in SHOW()
910 prt_char(out, '\n'); in SHOW()
914 prt_bitflags(out, __bch2_data_types, bch2_dev_has_data(c, ca)); in SHOW()
915 prt_char(out, '\n'); in SHOW()
919 prt_string_option(out, bch2_member_states, ca->mi.state); in SHOW()
920 prt_char(out, '\n'); in SHOW()
924 dev_io_done_to_text(out, ca); in SHOW()
927 bch2_dev_io_errors_to_text(out, ca); in SHOW()
933 bch2_time_stats_to_text(out, &ca->io_latency[READ]); in SHOW()
936 bch2_time_stats_to_text(out, &ca->io_latency[WRITE]); in SHOW()
943 dev_alloc_debug_to_text(out, ca); in SHOW()