mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-29 09:26:55 +00:00
scoutfs: scoutfs_bug_on to show bad append order
Use scoutfs_bug_on() to freak out if we append items to a segment out of order. We don't really return errors from this path, we should, but for now at least share the keys that show the problem. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "key.h"
|
||||
#include "counters.h"
|
||||
#include "triggers.h"
|
||||
#include "msg.h"
|
||||
#include "scoutfs_trace.h"
|
||||
|
||||
/*
|
||||
@@ -664,7 +665,9 @@ bool scoutfs_seg_append_item(struct super_block *sb, struct scoutfs_segment *seg
|
||||
off = le32_to_cpu(sblk->last_item_off);
|
||||
if (off) {
|
||||
item = off_ptr(seg, off);
|
||||
BUG_ON(scoutfs_key_compare(key, &item->key) <= 0);
|
||||
scoutfs_bug_on(sb, scoutfs_key_compare(key, &item->key) <= 0,
|
||||
"key "SK_FMT" item->key "SK_FMT,
|
||||
SK_ARG(key), SK_ARG(&item->key));
|
||||
}
|
||||
|
||||
nr_links = skip_next_nr(le32_to_cpu(sblk->nr_items));
|
||||
|
||||
Reference in New Issue
Block a user