Skip to content

Fix migration with NFS & iscsi/Fiber channel

Juan Quintela qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5migration: exit with error codemigration.c vl.c+2 -20 replies
2/5blockdev: don't leak id on removalblockdev.c+1 -00 replies
3/5blockdev: release resources in the error caseblockdev.c+6 -30 replies
4/5Reopen files after migrationblockdev.c blockdev.h migration.c+49 -52 replies
5/5drive_open: Add invalidate option for block devicesblock.h block/raw-posix.c blockdev.c+31 -43 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/5] Fix migration with NFS & iscsi/Fiber channel

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(-)
Signature · 1 line
1.7.3.4