All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kaveh Razavi <kaveh@cs.vu.nl>
To: Eric Blake <eblake@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Introduce cache images for the QCOW2 format
Date: Wed, 14 Aug 2013 13:13:42 +0200	[thread overview]
Message-ID: <520B6666.6030104@cs.vu.nl> (raw)
In-Reply-To: <520AA71E.1080502@redhat.com>

On 08/13/2013 11:37 PM, Eric Blake wrote:
> What is the QMP counterpart for hot-plugging a disk with the cache
> attached?  Is this something that can integrate nicely with Kevin's
> planned blockdev-add for 1.7?
> 

I do not know the details of this, but as long as it has proper support
for backing files, integration should be straightforward. I can take a
look if you point me to the right path.

> Please post this as a series, with patch 1 of the series being a doc
> patch to docs/specs/qcow2.txt fully documenting this extension.  No one
> else can be expected to interoperate with your extension if you don't
> document it upstream.  I want to make sure that there are no races where
> two competing processes both open a file read-write, and where the first
> process requests to modify metadata (possibly by adding the cache
> designation header, but also by making some other modification), but
> where before that completes, the other process sees an incomplete
> picture of the metadata.  We already document that qemu-img is liable to
> misbehave, even when operating in read-only mode, on an image held
> read-write by one qemu process; and I want to see in the formal docs
> (without having to chase a link to the pdf) how you guarantee that this
> is safe.

I can repost this later on, updating the document and fixing the race.
The way we intended it, only a single qemu process at each host should
write to the cache. Once this is done, the cache should be marked as
ready. Subsequent boots on that host can reuse this read-only cache,
only if it is ready. For this, we likely need a variable in the header
extension that defines whether the cache image is ready/cold/dirty. If
the image is not ready, it should be discarded and the cache's backing
file be used instead. If the image is cold, a VM can set the variable to
dirty, start warming it, and set it back to ready on shutdown.

Kaveh

  reply	other threads:[~2013-08-14 11:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 17:03 [Qemu-devel] [PATCH] Introduce cache images for the QCOW2 format Kaveh Razavi
2013-08-13 21:37 ` Eric Blake
2013-08-14 11:13   ` Kaveh Razavi [this message]
2013-08-13 22:53 ` Alex Bligh
2013-08-14 11:28   ` Kaveh Razavi
2013-08-14 11:52     ` Fam Zheng
2013-08-14 12:03       ` Alex Bligh
2013-08-14 15:58         ` Richard W.M. Jones
2013-08-15  0:53         ` Fam Zheng
2013-08-15  5:51           ` Alex Bligh
2013-08-14 11:57     ` Alex Bligh
2013-08-14 13:37       ` Kaveh Razavi
2013-08-13 23:16 ` Alex Bligh
2013-08-14 11:42   ` Kaveh Razavi
2013-08-14 12:02     ` Alex Bligh
2013-08-14 13:43       ` Kaveh Razavi
2013-08-14 13:50         ` Alex Bligh
2013-08-14 14:26           ` Kaveh Razavi
2013-08-14 15:02             ` Alex Bligh
2013-08-14 15:32             ` Kevin Wolf
2013-08-15  7:50               ` Wenchao Xia
2013-08-15  8:11               ` Stefan Hajnoczi
2013-08-14  9:29 ` Stefan Hajnoczi
2013-08-14 14:20   ` Kaveh Razavi
2013-08-15  8:32     ` Stefan Hajnoczi
2013-08-15 12:25       ` Kaveh Razavi

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=520B6666.6030104@cs.vu.nl \
    --to=kaveh@cs.vu.nl \
    --cc=eblake@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.