summaryrefslogtreecommitdiff
path: root/fs/bcachefs/ec.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-01 16:44:36 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-21 11:39:48 -0400
commita4b7a0c0378a3f73004b5c5263ec2b4e5a476fa8 (patch)
tree247538005e86ac93e5cbc33856a01e148a21945f /fs/bcachefs/ec.c
parentfa85c473977c0afb5104a630f019f593fe33a8b0 (diff)
downloadlwn-a4b7a0c0378a3f73004b5c5263ec2b4e5a476fa8.tar.gz
lwn-a4b7a0c0378a3f73004b5c5263ec2b4e5a476fa8.zip
bcachefs: ec_stripe_head.nr_created
additional debug stat Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r--fs/bcachefs/ec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index 50e5fdc30874..24140c485eee 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -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->s = s;
+ h->nr_created++;
return 0;
}
@@ -2278,9 +2279,10 @@ void bch2_new_stripes_to_text(struct printbuf *out, struct bch_fs *c)
mutex_lock(&c->ec_stripe_head_lock);
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,
- bch2_watermarks[h->watermark]);
+ bch2_watermarks[h->watermark],
+ h->nr_created);
if (h->s)
bch2_new_stripe_to_text(out, c, h->s);