Skip to content

Commit

Permalink
Merge pull request #19 from eugkoira/fix_chunks_calc
Browse files Browse the repository at this point in the history
Fix EBS snapshot creation for non-512KiB aligned file sizes
  • Loading branch information
kdavyd authored Dec 11, 2024
2 parents 92abf0f + cd2250c commit 8d13706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def upload(file_path, parent_snapshot_id):
f.seek(0, os.SEEK_END)
size = f.tell()
gbsize = math.ceil(size / GIGABYTE)
chunks = size // CHUNK_SIZE
chunks = math.ceil(size / CHUNK_SIZE)
split = np.array_split(range(chunks), singleton.NUM_JOBS)
count = Counter(Manager(), 0)
print("Size of", file_path, "is", size, "bytes and", chunks, "chunks")
Expand Down

0 comments on commit 8d13706

Please sign in to comment.