Closed emillynge closed 5 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
Dear maintainers
Please accept this PR which fixes a couple of issues that has arisen due to the introduction of
--blocksize_kb
option.In general these issue stem from the previous assumption that a block is 1MB.
MBps
andMB
are wrong whenbz!=1MB
bz>1MB
can lead to a PKT file larger than 4Gb which causes a fatal error.To fix the issue, i've introduced a new variable
blocks_per_file
which is determined by the valuesflag_filesize_mb
andflag_blocksize_kb
.I'm not entirely sure whether the pattern of calculating
blocks_per_file
in the switch block is the right way to go.