From: Kevin Wolf <kwolf@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] Reopen files after migration
Date: Thu, 10 Nov 2011 12:30:55 +0100 [thread overview]
Message-ID: <4EBBB5EF.7020500@redhat.com> (raw)
In-Reply-To: <4EBAED97.2000100@codemonkey.ws>
Am 09.11.2011 22:16, schrieb Anthony Liguori:
> On 11/09/2011 03:10 PM, Juan Quintela wrote:
>> Anthony Liguori<anthony@codemonkey.ws> wrote:
>>> On 11/09/2011 01:16 PM, Juan Quintela wrote:
>>>> We need to invalidate the Read Cache on the destination, otherwise we
>>>> have corruption. Easy way to reproduce it is:
>>>>
>>>> - create an qcow2 images
>>>> - start qemu on destination of migration (qemu .... -incoming tcp:...)
>>>> - start qemu on source of migration and do one install.
>>>> - migrate at the end of install (when lot of disk IO has happened).
>>>>
>>>> Destination of migration has a local copy of the L1/L2 tables that existed
>>>> at the beginning, before the install started. We have disk corruption at
>>>> this point. The solution (for NFS) is to just re-open the file. Operations
>>>> have to happen in this order:
>>>>
>>>> - source of migration: flush()
>>>> - destination: close(file);
>>>> - destination: open(file)
>>>>
>>>> it is not necesary that source of migration close the file.
>>>>
>>>> Signed-off-by: Juan Quintela<quintela@redhat.com>
>>>
>>> Couple thoughts:
>>>
>>> 1) Pretty sure this would break -snapshot. I do test migration with
>>> -snapshot so please don't break it.
>>
>> Can you give me one example? I don't know how to use -snapshot with migration.
>
> This is totally unsafe but has always worked for me. On the same box:
>
> $ qemu -hda foo.img -snapshot
>
> $ qemu -hda foo.img -snapshot -incoming tcp:localhost:1025
It's always amazing to see how people depend on insane things like this. :-)
> This is not the *only* way I test migration but it's very convenient for sniff
> testing. The problem with your patch is that it assumes that once you've opened
> a file, the name still exists. But that is not universally true. It needs to
> degrade in a useful way.
>
> I think just deferring open is probably the best strategy.
One of the problems with deferring open was that we want to detect
simple errors (typo in the file name, or whatever) before doing the real
live migration. The proposed solution was a read-only open/close
sequence at the start, but I believe this would break your use of
-snapshot as well.
Kevin
next prev parent reply other threads:[~2011-11-10 11:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 19:16 [Qemu-devel] [RFC PATCH 0/2] Fix migration with NFS & iscsi/Fiber channel Juan Quintela
2011-11-09 19:16 ` [Qemu-devel] [PATCH 1/2] Reopen files after migration Juan Quintela
2011-11-09 20:00 ` Anthony Liguori
2011-11-09 21:10 ` Juan Quintela
2011-11-09 21:16 ` Anthony Liguori
2011-11-10 11:30 ` Kevin Wolf [this message]
2011-11-09 23:30 ` Lucas Meneghel Rodrigues
2011-11-23 23:32 ` Anthony Liguori
2011-11-09 19:16 ` [Qemu-devel] [PATCH 2/2] drive_open: Add invalidate option for block devices Juan Quintela
2011-11-10 11:33 ` Kevin Wolf
2011-11-10 16:45 ` Juan Quintela
2011-11-10 10:34 ` [Qemu-devel] [RFC PATCH 0/2] Fix migration with NFS & iscsi/Fiber channel Stefan Hajnoczi
2011-11-23 15:46 ` Juan Quintela
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=4EBBB5EF.7020500@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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).