Lines Matching refs:stats

176 	if (ctxt->stats) {  in move_write()
179 &ctxt->stats->sectors_error_uncorrected); in move_write()
182 &ctxt->stats->sectors_error_corrected); in move_write()
297 struct bch_move_stats *stats, in bch2_moving_ctxt_init() argument
306 ctxt->stats = stats; in bch2_moving_ctxt_init()
322 void bch2_move_stats_exit(struct bch_move_stats *stats, struct bch_fs *c) in bch2_move_stats_exit() argument
324 trace_move_data(c, stats); in bch2_move_stats_exit()
327 void bch2_move_stats_init(struct bch_move_stats *stats, const char *name) in bch2_move_stats_init() argument
329 memset(stats, 0, sizeof(*stats)); in bch2_move_stats_init()
330 stats->data_type = BCH_DATA_user; in bch2_move_stats_init()
331 scnprintf(stats->name, sizeof(stats->name), "%s", name); in bch2_move_stats_init()
349 if (ctxt->stats) in bch2_move_extent()
350 ctxt->stats->pos = BBPOS(iter->btree_id, iter->pos); in bch2_move_extent()
402 if (ctxt->stats) { in bch2_move_extent()
403 atomic64_inc(&ctxt->stats->keys_moved); in bch2_move_extent()
404 atomic64_add(k.k->size, &ctxt->stats->sectors_moved); in bch2_move_extent()
650 if (ctxt->stats) { in bch2_move_data_btree()
651 ctxt->stats->data_type = BCH_DATA_user; in bch2_move_data_btree()
652 ctxt->stats->pos = BBPOS(btree_id, start); in bch2_move_data_btree()
727 if (ctxt->stats) in bch2_move_data_btree()
728 ctxt->stats->pos = BBPOS(iter.btree_id, iter.pos); in bch2_move_data_btree()
796 if (ctxt->stats) in bch2_move_data_btree()
797 atomic64_add(k.k->size, &ctxt->stats->sectors_seen); in bch2_move_data_btree()
823 ctxt->stats->pos = BBPOS(id, POS_MIN); in __bch2_move_data()
844 struct bch_move_stats *stats, in bch2_move_data() argument
851 bch2_moving_ctxt_init(&ctxt, c, rate, stats, wp, wait_on_copygc); in bch2_move_data()
933 if (ctxt->stats) in __bch2_move_data_phys()
934 ctxt->stats->offset = bp.k->p.offset >> MAX_EXTENT_COMPRESS_RATIO_SHIFT; in __bch2_move_data_phys()
1004 if (ctxt->stats) in __bch2_move_data_phys()
1005 atomic64_add(sectors, &ctxt->stats->sectors_seen); in __bch2_move_data_phys()
1027 struct bch_move_stats *stats, in bch2_move_data_phys() argument
1036 bch2_moving_ctxt_init(&ctxt, c, rate, stats, wp, wait_on_copygc); in bch2_move_data_phys()
1037 if (ctxt.stats) { in bch2_move_data_phys()
1038 ctxt.stats->phys = true; in bch2_move_data_phys()
1039 ctxt.stats->data_type = (int) DATA_PROGRESS_DATA_TYPE_phys; in bch2_move_data_phys()
1099 struct bch_move_stats *stats) in bch2_move_btree() argument
1111 bch2_moving_ctxt_init(&ctxt, c, NULL, stats, in bch2_move_btree()
1116 stats->data_type = BCH_DATA_btree; in bch2_move_btree()
1121 stats->pos = BBPOS(btree, POS_MIN); in bch2_move_btree()
1140 stats->pos = BBPOS(iter.btree_id, iter.pos); in bch2_move_btree()
1262 int bch2_scan_old_btree_nodes(struct bch_fs *c, struct bch_move_stats *stats) in bch2_scan_old_btree_nodes() argument
1269 rewrite_old_nodes_pred, c, stats); in bch2_scan_old_btree_nodes()
1345 struct bch_move_stats *stats, in bch2_data_job() argument
1355 bch2_move_stats_init(stats, bch2_data_ops_strs[op.op]); in bch2_data_job()
1368 stats, in bch2_data_job()
1375 stats->data_type = BCH_DATA_journal; in bch2_data_job()
1378 rereplicate_btree_pred, c, stats) ?: ret; in bch2_data_job()
1381 stats, in bch2_data_job()
1391 stats->data_type = BCH_DATA_journal; in bch2_data_job()
1396 stats, in bch2_data_job()
1404 ret = bch2_scan_old_btree_nodes(c, stats); in bch2_data_job()
1408 drop_extra_replicas_btree_pred, c, stats) ?: ret; in bch2_data_job()
1409 ret = bch2_move_data(c, start, end, NULL, stats, in bch2_data_job()
1419 bch2_move_stats_exit(stats, c); in bch2_data_job()
1423 void bch2_move_stats_to_text(struct printbuf *out, struct bch_move_stats *stats) in bch2_move_stats_to_text() argument
1425 prt_printf(out, "%s: data type==", stats->name); in bch2_move_stats_to_text()
1426 bch2_prt_data_type(out, stats->data_type); in bch2_move_stats_to_text()
1428 bch2_bbpos_to_text(out, stats->pos); in bch2_move_stats_to_text()
1432 prt_printf(out, "keys moved:\t%llu\n", atomic64_read(&stats->keys_moved)); in bch2_move_stats_to_text()
1433 prt_printf(out, "keys raced:\t%llu\n", atomic64_read(&stats->keys_raced)); in bch2_move_stats_to_text()
1435 prt_human_readable_u64(out, atomic64_read(&stats->sectors_seen) << 9); in bch2_move_stats_to_text()
1439 prt_human_readable_u64(out, atomic64_read(&stats->sectors_moved) << 9); in bch2_move_stats_to_text()
1443 prt_human_readable_u64(out, atomic64_read(&stats->sectors_raced) << 9); in bch2_move_stats_to_text()
1454 bch2_move_stats_to_text(out, ctxt->stats); in bch2_moving_ctxt_to_text()