qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: qemu-devel@nongnu.org, kwolf@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 5/5] block: add header update capability for VHDX images.
Date: Mon, 29 Apr 2013 13:19:01 -0400	[thread overview]
Message-ID: <20130429171901.GC3525@localhost.localdomain> (raw)
In-Reply-To: <20130428100553.GB28366@localhost.localdomain>

On Sun, Apr 28, 2013 at 06:05:53PM +0800, Fam Zheng wrote:
> On Tue, 04/23 10:24, Jeff Cody wrote:
> >      if (flags & BDRV_O_RDWR) {
> > -        ret = -ENOTSUP;
> > -        goto fail;
> > +        vhdx_update_headers(bs, s, false);
> 
> Do we really have to update the header immediately on RW open? I assume
> when implementing vhdx_co_writev, this is guaranteed to get called
> before other write. In that case we don't need it here, which means we
> don't change anything if no user write, even for RW opened file.
>

There are two file modification GUIDS that need to be generated: a
'file write' guid, and a 'data write' guid.  The data write GUID
encompasses anything visible to the guest.  The file write GUID
includes any modifications to metadata.

This will update the file write GUID in the header, but not the data
write GUID.  According the spec, the file write GUID is for any data
modification, including metadata.   So once the log support is
implemented, we could latch that this has not occurred and do it
during a log write if we wanted (since all metdata updates will go
through the log).

In the vhdx_co_writev patches from the RFC, it does writes the data
guid if it detects it is the first write.

However, the spec says (with regard to the file write guid):

  "The parser can skip updating this field if the storage media on which
   the file is stored is read-only, or if the file is opened in read-only
   mode."

Which I think implies that we should go ahead and update the file
write guid field if the image is opened r/w.  This would also
encompass any modifications to resizing the image, changing backing
files (once differencing files are supported), which would not go
through vhdx_co_writev().

All that said, I am getting ready to submit v3, and I am dropping this
patch from the series for now.

Thanks,
Jeff

      reply	other threads:[~2013-04-29 17:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 14:24 [Qemu-devel] [PATCH v2 0/5] Initial VHDX support Jeff Cody
2013-04-23 14:24 ` [Qemu-devel] [PATCH v2 1/5] qemu: add castagnoli crc32c checksum algorithm Jeff Cody
2013-04-23 14:24 ` [Qemu-devel] [PATCH v2 2/5] block: vhdx header for the QEMU support of VHDX images Jeff Cody
2013-04-23 15:10   ` Kevin Wolf
2013-04-23 16:32     ` Jeff Cody
2013-04-24 12:31   ` Stefan Hajnoczi
2013-04-24 12:34     ` Jeff Cody
2013-04-25 13:05   ` Kevin Wolf
2013-04-25 14:29     ` Jeff Cody
2013-04-23 14:24 ` [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe Jeff Cody
2013-04-23 15:46   ` Kevin Wolf
2013-04-23 16:11     ` Jeff Cody
2013-04-23 16:18       ` Kevin Wolf
2013-04-24 13:21   ` Stefan Hajnoczi
2013-04-24 13:40     ` Jeff Cody
2013-04-25 13:04   ` Kevin Wolf
2013-04-25 15:03     ` Jeff Cody
2013-04-25 16:52       ` Kevin Wolf
2013-04-28  7:29   ` Fam Zheng
2013-04-29 17:25     ` Jeff Cody
2013-04-28  9:58   ` Fam Zheng
2013-04-29 17:24     ` Jeff Cody
2013-04-23 14:24 ` [Qemu-devel] [PATCH v2 4/5] block: add read-only support to VHDX image format Jeff Cody
2013-04-24 14:38   ` Stefan Hajnoczi
2013-04-23 14:24 ` [Qemu-devel] [PATCH v2 5/5] block: add header update capability for VHDX images Jeff Cody
2013-04-24 14:47   ` Stefan Hajnoczi
2013-04-24 14:56     ` Jeff Cody
2013-04-25  7:20       ` Stefan Hajnoczi
2013-04-28 10:05   ` Fam Zheng
2013-04-29 17:19     ` Jeff Cody [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130429171901.GC3525@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).