All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] Fix migration with NFS & iscsi/Fiber channel
@ 2011-01-04 14:33 Juan Quintela
  2011-01-04 14:33 ` [Qemu-devel] [PATCH 1/5] migration: exit with error code Juan Quintela
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Juan Quintela @ 2011-01-04 14:33 UTC (permalink / raw)
  To: qemu-devel

Hi

This patch set creates infrastructure to invalidate buffers on
migration target machine.  The best way to see the problems is:

# create a new qcow2 image
qemu-img create -f qcow2 foo.img
# start the destination host
qemu .... path=foo.img....
# start the source host with one installation
qemu .... path=foo.img....
# migrate after lots of disk writes

Destination will have "read" the beggining of the blocks of the file
(where the headers are).  There are two bugs here:
a- we need to re-read the image after migration, to have the new values
   (reopening fixes it)
b- we need to be sure that we read the new blocks that are on the server,
   not the buffered ones locally from the start of the run.
   NFS: flush on source and close + open on target invalidates the cache
   Block devices: on linux, BLKFLSBUF invalidates all the buffers for that
   device.  This fixes iSCSI & FiberChannel.

I tested iSCSI & NFS.  NFS patch have been on RHEL5 kvm forever (I just
forget to send the patch upstream).  Our NFS gurus & cluster gurus told
that this is enough for linux to ensure consistence.

Once there, I fixed a couple of minor bugs (the first 3 patches):
- migration should exit with error 1 as everything else.
- memory leak on drive_uninit.
- fix cleanup on error on drive_init()

Later, Juan.

Juan Quintela (5):
  migration: exit with error code
  blockdev: don't leak id on removal
  blockdev: release resources in the error case
  Reopen files after migration
  drive_open: Add invalidate option for block devices

 block.h           |    2 ++
 block/raw-posix.c |   24 ++++++++++++++++++++++++
 blockdev.c        |   53 +++++++++++++++++++++++++++++++++++++++++++++--------
 blockdev.h        |    6 ++++++
 migration.c       |    8 +++++++-
 vl.c              |    2 +-
 6 files changed, 85 insertions(+), 10 deletions(-)

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-01-10 10:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 14:33 [Qemu-devel] [PATCH 0/5] Fix migration with NFS & iscsi/Fiber channel Juan Quintela
2011-01-04 14:33 ` [Qemu-devel] [PATCH 1/5] migration: exit with error code Juan Quintela
2011-01-04 14:33 ` [Qemu-devel] [PATCH 2/5] blockdev: don't leak id on removal Juan Quintela
2011-01-04 14:33 ` [Qemu-devel] [PATCH 3/5] blockdev: release resources in the error case Juan Quintela
2011-01-04 14:33 ` [Qemu-devel] [PATCH 4/5] Reopen files after migration Juan Quintela
2011-01-04 19:05   ` Blue Swirl
2011-01-05 15:52   ` Markus Armbruster
2011-01-04 14:33 ` [Qemu-devel] [PATCH 5/5] drive_open: Add invalidate option for block devices Juan Quintela
2011-01-04 19:06   ` Blue Swirl
2011-01-04 19:23     ` [Qemu-devel] " Juan Quintela
2011-01-07  8:38   ` [Qemu-devel] " Christoph Hellwig
2011-01-10 10:15 ` [Qemu-devel] Re: [PATCH 0/5] Fix migration with NFS & iscsi/Fiber channel Juan Quintela

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.