> + if (mdrestore.show_progress) { > + int64_t mb_now = bytes_read >> 20; > + > + if (mb_now != mb_read) { > + print_progress("%lld MB read", mb_now); > + mb_read = mb_now; > + } > + } > if (mdrestore.show_progress) { > + int64_t mb_now = bytes_read >> 20; > > if (mb_now != mb_read) { > + print_progress("%lld mb read", mb_now); > mb_read = mb_now; > } > } Not sure if it's worth the effort, but to my pattern matching eyes this screams for a little helper. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>