We don't send any flush here, so we need to open with cache=unsafe.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Error *local_err = NULL;
- int bdrv_oflags = BDRV_O_CACHE_WB | BDRV_O_RDWR;
-+ int bdrv_oflags = BDRV_O_RDWR;
++ int bdrv_oflags = BDRV_O_RDWR | BDRV_O_NO_FLUSH;
int ret;
if (snap_state.state != SAVE_STATE_DONE) {
char *devfn = NULL;
const char *format = NULL;
- int flags = BDRV_O_RDWR|BDRV_O_CACHE_WB;
-+ int flags = BDRV_O_RDWR;
++ int flags = BDRV_O_RDWR|BDRV_O_NO_FLUSH;
bool write_zero = true;
if (readmap) {