qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 10/19] block: vhdx - add log write support


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v7 10/19] block: vhdx - add log write support
Date: Fri, 18 Oct 2013 14:14:09 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Oct 11, 2013 at 02:17:30PM -0400, Jeff Cody wrote:
> +/* Perform a log write, and then immediately flush the entire log */
> +int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
> +                             void *data, uint32_t length, uint64_t offset)
> +{
> +    int ret = 0;
> +    VHDXLogSequence logs = { .valid = true,
> +                             .count = 1,
> +                             .hdr = { 0 } };
> +
> +
> +    bdrv_flush(bs);

It's useful to comment why a flush is necessary.  In this case I think
you're flushing the disk write cache because you want newly allocated
block contents to be stable before writing the BAT update into the
log.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]