qemu-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v6 10/20] block: vhdx - add log write support
Date: Tue, 1 Oct 2013 15:30:51 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 25, 2013 at 05:02:55PM -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 } };
> +
> +
> +    ret = vhdx_log_write(bs, s, data, length, offset);
> +    if (ret < 0) {
> +        goto exit;
> +    }
> +    logs.log = s->log;

I don't see a bdrv_co_flush() that ensures the log has been persisted
before we begin applying log entries to the file.

Without the flush there is no guarantee that the log entries will be
accessible in case of power failure during vhdx_log_write_and_flush().

Stefan



reply via email to

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