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