The call to the macro below will step on the variable chunk, which is used later on in the function.
uint32_t stripe = do_div(chunk, sc->stripes); The following is a very simple solution: sector_t chunk2 = chunk; uint32_t stripe = do_div(chunk2, sc->stripes); Bart -- dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel