[pve-devel] [PATCH] qemu-img convert : use default cache=unsafe instead writeback

Alexandre DERUMIER aderumier at odiso.com
Mon Aug 1 09:44:09 CEST 2016


>>Answering myself, 'close' does not issue flush/fsync. 

close send a flush

block.c

static void bdrv_close(BlockDriverState *bs)
{   
    BdrvAioNotifier *ban, *ban_next;

    assert(!bs->job);

    /* Disable I/O limits and drain all pending throttled requests */
    if (bs->throttle_state) {
        bdrv_io_limits_disable(bs);
    }

    bdrv_drained_begin(bs); /* complete I/O */
    bdrv_flush(bs);



It's was introduce by this commit

[Qemu-devel] [PATCH v3] qemu-img: let 'qemu-img convert' flush data
https://lists.nongnu.org/archive/html/qemu-devel/2012-04/msg02936.html



----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "Dominik Csapak" <d.csapak at proxmox.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Lundi 1 Août 2016 09:37:20
Objet: Re: [pve-devel] [PATCH] qemu-img convert : use default cache=unsafe instead writeback

> > is this really safe? 
> > 
> > this also impacts cloning and the "move disk" function. 
> > what if i clone a vm to an nfs share and immediately move the vm to 
> > another host, then start it? 
> 
> I guess qemu-img does a flush before closing (or flush is automatic on 
> close?)? 

Answering myself, 'close' does not issue flush/fsync. So I wonder if qemu-img 
issue a flush? 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 




More information about the pve-devel mailing list