[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] block: flush backing_hd in the right place
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] block: flush backing_hd in the right place |
Date: |
Tue, 12 Jan 2010 18:44:38 +0100 |
User-agent: |
Mutt/1.3.28i |
On Tue, Jan 12, 2010 at 06:42:20PM +0100, Kevin Wolf wrote:
> > @@ -623,6 +623,12 @@ int bdrv_commit(BlockDriverState *bs)
> > if (drv->bdrv_make_empty)
> > return drv->bdrv_make_empty(bs);
> >
> > + /*
> > + * Make sure all data we wrote to the backing device is actually
> > + * stable on disk.
> > + */
> > + if (bs->backing_hd)
> > + bdrv_flush(bs->backing_hd);
> > return 0;
> > }
>
> Format drivers with a bdrv_make_empty return before the flush, so it
> won't work for qcow1. Looks good otherwise.
Oh, okay.
> If it has done a bdrv_make_empty we might also want to flush bs?
Indeed. I'll spin a new version.