diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-10-29 16:29:13 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:15 -0400 |
commit | 961b2d62821f23f9f963ee069b64eb8806f05e40 (patch) | |
tree | 4f78fc755bc7252ef9bb870fa1f73cb8c6a8e360 /fs/bcachefs/buckets.c | |
parent | 37f72492f401671f1f773cc62dddf742e7fc553b (diff) | |
download | lwn-961b2d62821f23f9f963ee069b64eb8806f05e40.tar.gz lwn-961b2d62821f23f9f963ee069b64eb8806f05e40.zip |
bcachefs: Assorted ec fixes
- The backpointer that ec_stripe_update_ptrs() uses now needs to include
the snapshot ID, which means we have to change where we add the
backpointer to after getting the snapshot ID for the new extents
- ec_stripe_update_ptrs() needs to be calling bch2_trans_begin()
- improve error message in bch2_mark_stripe()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/buckets.c')
-rw-r--r-- | fs/bcachefs/buckets.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 48687a70411e..4cd44a50beab 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -1007,8 +1007,13 @@ static int bch2_mark_stripe(struct bch_fs *c, BUG_ON(gc && old_s); if (!m || (old_s && !m->alive)) { - bch_err_ratelimited(c, "error marking nonexistent stripe %zu", - idx); + char buf1[200], buf2[200]; + + bch2_bkey_val_to_text(&PBUF(buf1), c, old); + bch2_bkey_val_to_text(&PBUF(buf2), c, new); + bch_err_ratelimited(c, "error marking nonexistent stripe %zu while marking\n" + "old %s\n" + "new %s", idx, buf1, buf2); bch2_inconsistent_error(c); return -1; } |