flexnbd status: display mirror->max_bytes_per_second as mirror_speed_limit
This commit is contained in:
@@ -28,14 +28,10 @@ struct status * status_create( struct server * serve )
|
||||
status->migration_duration = 0;
|
||||
}
|
||||
status->migration_duration /= 1000;
|
||||
|
||||
status->migration_speed = serve->mirror->all_dirty / ( status->migration_duration + 1 );
|
||||
|
||||
|
||||
status->migration_speed_limit = serve->mirror->max_bytes_per_second;
|
||||
}
|
||||
|
||||
|
||||
|
||||
server_unlock_start_mirror( serve );
|
||||
|
||||
return status;
|
||||
@@ -63,6 +59,9 @@ int status_write( struct status * status, int fd )
|
||||
PRINT_UINT64( pass_clean_bytes );
|
||||
PRINT_UINT64( migration_speed );
|
||||
PRINT_UINT64( migration_duration );
|
||||
if ( status->migration_speed_limit < UINT64_MAX ) {
|
||||
PRINT_UINT64( migration_speed_limit );
|
||||
};
|
||||
}
|
||||
|
||||
dprintf(fd, "\n");
|
||||
|
@@ -80,6 +80,7 @@ struct status {
|
||||
|
||||
uint64_t migration_duration;
|
||||
uint64_t migration_speed;
|
||||
uint64_t migration_speed_limit;
|
||||
};
|
||||
|
||||
/** Create a status object for the given server. */
|
||||
|
Reference in New Issue
Block a user