zfscheck wip

This commit is contained in:
Edwin Eefting
2022-02-23 21:31:00 +01:00
parent d99c202e75
commit 1cedea5f5f
2 changed files with 42 additions and 13 deletions

View File

@ -12,10 +12,14 @@ class BlockHasher():
Input and output generators are in the format ( chunk_nr, hexdigest )
"""
def __init__(self, count=10000, bs=4096, hash_class=hashlib.sha1):
def __init__(self, count=10000, bs=4096, hash_class=hashlib.sha1, coverage=1):
self.count = count
self.bs = bs
self.hash_class = hash_class
self.coverage=1
self.stats_total=0
self.stats_checked=0
def generate(self, fname):
"""Generates checksums