Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
nb_sectors = total_sectors;
local_progress = (float)100 /
nb_sectors = total_sectors;
local_progress = (float)100 /
- (nb_sectors / MIN(nb_sectors, (cluster_sectors)));
+ (nb_sectors / MIN(nb_sectors, cluster_sectors));
for(;;) {
int64_t bs_num;
for(;;) {
int64_t bs_num;
sector_num = 0; // total number of sectors converted so far
nb_sectors = total_sectors - sector_num;
local_progress = (float)100 /
sector_num = 0; // total number of sectors converted so far
nb_sectors = total_sectors - sector_num;
local_progress = (float)100 /
- (nb_sectors / MIN(nb_sectors, (IO_BUF_SIZE / 512)));
+ (nb_sectors / MIN(nb_sectors, IO_BUF_SIZE / 512));
for(;;) {
nb_sectors = total_sectors - sector_num;
for(;;) {
nb_sectors = total_sectors - sector_num;
bdrv_get_geometry(bs, &num_sectors);
local_progress = (float)100 /
bdrv_get_geometry(bs, &num_sectors);
local_progress = (float)100 /
- (num_sectors / MIN(num_sectors, (IO_BUF_SIZE / 512)));
+ (num_sectors / MIN(num_sectors, IO_BUF_SIZE / 512));
for (sector = 0; sector < num_sectors; sector += n) {
/* How many sectors can we handle with the next read? */
for (sector = 0; sector < num_sectors; sector += n) {
/* How many sectors can we handle with the next read? */