Commit a4b7a0c0 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: ec_stripe_head.nr_created

additional debug stat
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent fa85c473
...@@ -1703,6 +1703,7 @@ static int ec_new_stripe_alloc(struct bch_fs *c, struct ec_stripe_head *h) ...@@ -1703,6 +1703,7 @@ static int ec_new_stripe_alloc(struct bch_fs *c, struct ec_stripe_head *h)
h->blocksize, h->disk_label); h->blocksize, h->disk_label);
h->s = s; h->s = s;
h->nr_created++;
return 0; return 0;
} }
...@@ -2278,9 +2279,10 @@ void bch2_new_stripes_to_text(struct printbuf *out, struct bch_fs *c) ...@@ -2278,9 +2279,10 @@ void bch2_new_stripes_to_text(struct printbuf *out, struct bch_fs *c)
mutex_lock(&c->ec_stripe_head_lock); mutex_lock(&c->ec_stripe_head_lock);
list_for_each_entry(h, &c->ec_stripe_head_list, list) { list_for_each_entry(h, &c->ec_stripe_head_list, list) {
prt_printf(out, "disk label %u algo %u redundancy %u %s:\n", prt_printf(out, "disk label %u algo %u redundancy %u %s nr created %llu:\n",
h->disk_label, h->algo, h->redundancy, h->disk_label, h->algo, h->redundancy,
bch2_watermarks[h->watermark]); bch2_watermarks[h->watermark],
h->nr_created);
if (h->s) if (h->s)
bch2_new_stripe_to_text(out, c, h->s); bch2_new_stripe_to_text(out, c, h->s);
......
...@@ -193,6 +193,8 @@ struct ec_stripe_head { ...@@ -193,6 +193,8 @@ struct ec_stripe_head {
unsigned redundancy; unsigned redundancy;
enum bch_watermark watermark; enum bch_watermark watermark;
u64 nr_created;
struct bch_devs_mask devs; struct bch_devs_mask devs;
unsigned nr_active_devs; unsigned nr_active_devs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment