mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-03 14:47:07 +00:00
Correcly wrap when finding compaction entries
Compaction looks for the next entry at a given level to compact. It only tested for not finding a next entry when it needs to wrap the key and start over in the level, it missed the case where the next entry is at a greater level. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+1
-1
@@ -714,7 +714,7 @@ int scoutfs_manifest_next_compact(struct super_block *sb, void *data)
|
||||
skey.level = level;
|
||||
skey.seq = 0;
|
||||
ment = scoutfs_treap_lookup_next(mani->treap, &skey);
|
||||
if (ment == NULL && scoutfs_kvec_length(skey.key)) {
|
||||
if (ment == NULL || ment->level != level) {
|
||||
/* XXX ugh, these kvecs are the worst */
|
||||
scoutfs_kvec_init(skey.key,
|
||||
skey.key[0].iov_base, 0);
|
||||
|
||||
Reference in New Issue
Block a user