serve: Fix calulation of server_mirror_bytes_remaining
Previously, we didn't count the number of bytes represented by events in the stream; we just counted each pending event as one byte. Whoops.
This commit is contained in:
@@ -860,7 +860,7 @@ uint64_t server_mirror_bytes_remaining( struct server * serve )
|
|||||||
{
|
{
|
||||||
if ( server_is_mirroring( serve ) ) {
|
if ( server_is_mirroring( serve ) ) {
|
||||||
uint64_t bytes_to_xfer =
|
uint64_t bytes_to_xfer =
|
||||||
bitset_stream_size( serve->allocation_map ) +
|
bitset_stream_queued_bytes( serve->allocation_map, BITSET_STREAM_SET ) +
|
||||||
( serve->size - serve->mirror->offset );
|
( serve->size - serve->mirror->offset );
|
||||||
|
|
||||||
return bytes_to_xfer;
|
return bytes_to_xfer;
|
||||||
|
Reference in New Issue
Block a user