Correct upper end rounding in output sector ranges
authorJakob Cornell <jakob+gpg@jcornell.net>
Sat, 6 Nov 2021 20:23:59 +0000 (15:23 -0500)
committerJakob Cornell <jakob+gpg@jcornell.net>
Sat, 6 Nov 2021 20:23:59 +0000 (15:23 -0500)
src/disk_jumble/verify.py

index e427c48af792fa7371c9da0971b8fea32f545a51..f160a963e2d25f7e9e73e0ff6450f8b9f445c279 100644 (file)
@@ -124,7 +124,7 @@ if __name__ == "__main__":
                                sector_ranges = [
                                        range(
                                                chunk.slab.sectors.start + chunk.slice.start // disk.sector_size,
-                                               chunk.slab.sectors.start + chunk.slice.stop // disk.sector_size
+                                               chunk.slab.sectors.start + math.ceil(chunk.slice.stop / disk.sector_size)
                                        )
                                        for chunk in task.chunks
                                ]