)
and (incomplete_edge.end_off - slab.entity_offset) %% %(sector_size)s = 0
where disk_id = %(disk_id)s
- order by slab.entity_id, entity_offset, slab_id
+ order by disk_blocks
;
"""
with self.conn.cursor() as cursor:
pass
-def do_verify(conn, disk_id: int, sector_size: int, disk_file: io.BufferedIOBase, read_size: int, read_tries: int) -> None:
+def do_verify_v1(conn, disk_id: int, sector_size: int, disk_file: io.BufferedIOBase, read_size: int, read_tries: int) -> None:
db = DbWrapper(conn)
tasks = []
slab_plus.entity_id = elh.entity_id
and slab_plus.entity_blocks && elh.block_range
)
- left outer join public.entity on elh.entity_id=entity.entity_id
+ left outer join public.entity on elh.entity_id = entity.entity_id
)
where slab_plus.disk_id = %(disk_id)s
order by sector
conn.autocommit = True
path = f"/dev/mapper/diskjumble-{args.disk_id}"
with open(path, "rb", buffering = _READ_BUFFER_SIZE) as disk_file:
- do_verify(conn, args.disk_id, SECTOR_SIZE, disk_file, _READ_BUFFER_SIZE, args.read_tries)
+ do_verify_v1(conn, args.disk_id, SECTOR_SIZE, disk_file, _READ_BUFFER_SIZE, args.read_tries)
do_verify_v2(conn, args.disk_id, disk_file, _READ_BUFFER_SIZE, args.read_tries)