Make rewrite use writemap and perform only a single sync.