mirror of
https://github.com/versity/scoutfs.git
synced 2026-05-02 19:05:43 +00:00
Search all merge range items for next
When searching for the next least merge range we need to sweep all the stored items because they're interleaved with respect to key sorting because we've clobbered the zone. To search all of them we need to start from 0, not from the caller's start key after setting the zone. If the caller happens to provide a start key with a small zone but large other fields (totl keys with sufficiently large identifiers) we can miss ranges. Signed-off-by: Zach Brown <zab@zabbo.net>
This commit is contained in:
@@ -1077,8 +1077,7 @@ static int next_log_merge_range(struct super_block *sb, struct scoutfs_btree_roo
|
||||
struct scoutfs_key key;
|
||||
int ret;
|
||||
|
||||
key = *start;
|
||||
key.sk_zone = SCOUTFS_LOG_MERGE_RANGE_ZONE;
|
||||
init_log_merge_key(&key, SCOUTFS_LOG_MERGE_RANGE_ZONE, 0, 0);
|
||||
scoutfs_key_set_ones(&rng->start);
|
||||
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user