Skip to content

Commit a4b7a0c

Browse files
author
Kent Overstreet
committed
bcachefs: ec_stripe_head.nr_created
additional debug stat Signed-off-by: Kent Overstreet <[email protected]>
1 parent fa85c47 commit a4b7a0c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

fs/bcachefs/ec.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,6 +1703,7 @@ static int ec_new_stripe_alloc(struct bch_fs *c, struct ec_stripe_head *h)
17031703
h->blocksize, h->disk_label);
17041704

17051705
h->s = s;
1706+
h->nr_created++;
17061707
return 0;
17071708
}
17081709

@@ -2278,9 +2279,10 @@ void bch2_new_stripes_to_text(struct printbuf *out, struct bch_fs *c)
22782279

22792280
mutex_lock(&c->ec_stripe_head_lock);
22802281
list_for_each_entry(h, &c->ec_stripe_head_list, list) {
2281-
prt_printf(out, "disk label %u algo %u redundancy %u %s:\n",
2282+
prt_printf(out, "disk label %u algo %u redundancy %u %s nr created %llu:\n",
22822283
h->disk_label, h->algo, h->redundancy,
2283-
bch2_watermarks[h->watermark]);
2284+
bch2_watermarks[h->watermark],
2285+
h->nr_created);
22842286

22852287
if (h->s)
22862288
bch2_new_stripe_to_text(out, c, h->s);

fs/bcachefs/ec.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ struct ec_stripe_head {
193193
unsigned redundancy;
194194
enum bch_watermark watermark;
195195

196+
u64 nr_created;
197+
196198
struct bch_devs_mask devs;
197199
unsigned nr_active_devs;
198200

0 commit comments

Comments
 (0)