summaryrefslogtreecommitdiff
path: root/libbcachefs/quota.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-05-12 18:00:32 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-05-12 20:29:32 -0400
commit7142075fdac05c8ed3adc51cf39d985171ca9105 (patch)
tree4f9311464f6d7247577214d45eafadfbfa160e0a /libbcachefs/quota.c
parent6e897639569207885257ac744019b7e5c340fb74 (diff)
Update bcachefs sources to ed4d21711d bcachefs: Replace a BUG_ON() with fatal errorsnapshot_tree_fix
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/quota.c')
-rw-r--r--libbcachefs/quota.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbcachefs/quota.c b/libbcachefs/quota.c
index cc0db72c..310eb9d2 100644
--- a/libbcachefs/quota.c
+++ b/libbcachefs/quota.c
@@ -2,6 +2,7 @@
#include "bcachefs.h"
#include "btree_update.h"
#include "errcode.h"
+#include "error.h"
#include "inode.h"
#include "quota.h"
#include "subvolume.h"
@@ -561,6 +562,9 @@ static int bch2_fs_quota_read_inode(struct btree_trans *trans,
ret = bch2_snapshot_tree_lookup(trans,
snapshot_t(c, k.k->p.snapshot)->tree, &s_t);
+ bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), c,
+ "%s: snapshot tree %u not found", __func__,
+ snapshot_t(c, k.k->p.snapshot)->tree);
if (ret)
return ret;