buflen = bsp->bs;
perc += bsp->perc;
- if ((r <= ((frand_max / 100L) * perc)) &&
+ if ((r * 100UL <= frand_max * perc) &&
io_u_fits(td, io_u, buflen))
break;
}
{
__io_u_log_error(td, io_u);
if (td->parent)
- __io_u_log_error(td, io_u);
+ __io_u_log_error(td->parent, io_u);
}
static inline bool gtod_reduce(struct thread_data *td)