Sort merged hardware by the starting LBA of the first extent

This commit is contained in:
2026-01-05 02:20:50 +00:00
parent 75a2e4e90a
commit bce5ae0764

View File

@@ -327,7 +327,8 @@ public sealed partial class Merger
EndProgress2?.Invoke();
EndProgress?.Invoke();
return mergedHardware;
// Sort results by the starting LBA of the first extent of each hardware
return mergedHardware.OrderBy(static hw => hw.Extents?.FirstOrDefault()?.Start ?? 0).ToList();
}
static void AddOrUpdateHardware(List<DumpHardware> mergedHardware, DumpHardware originalHardware, ulong start,