xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH 3/4] tools/libxl: Identify copywhat in stream v2 datacopiers
Date: Fri, 17 Jul 2015 17:51:17 +0100	[thread overview]
Message-ID: <1437151878-11792-4-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1437151878-11792-1-git-send-email-andrew.cooper3@citrix.com>

This is an aid to debugging

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxl/libxl_stream_read.c  |   18 ++++++++++--------
 tools/libxl/libxl_stream_write.c |    4 +++-
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/tools/libxl/libxl_stream_read.c b/tools/libxl/libxl_stream_read.c
index 2d17403..3e1cd2a 100644
--- a/tools/libxl/libxl_stream_read.c
+++ b/tools/libxl/libxl_stream_read.c
@@ -223,9 +223,10 @@ void libxl__stream_read_start(libxl__egc *egc,
     }
     /* stream->fd is now a v2 stream. */
 
-    dc->ao      = stream->ao;
-    dc->readfd  = stream->fd;
-    dc->writefd = -1;
+    dc->ao       = stream->ao;
+    dc->copywhat = "restore v2 stream";
+    dc->readfd   = stream->fd;
+    dc->writefd  = -1;
 
     /* Start reading the stream header. */
     rc = setup_read(stream, "stream header",
@@ -606,11 +607,12 @@ static void write_emulator_blob(libxl__egc *egc,
     }
 
     FILLZERO(*dc);
-    dc->ao = stream->ao;
-    dc->writewhat = "qemu save file";
-    dc->writefd = writefd;
-    dc->maxsz = -1;
-    dc->callback = write_emulator_done;
+    dc->ao         = stream->ao;
+    dc->writewhat  = "qemu save file";
+    dc->copywhat   = "restore v2 stream";
+    dc->writefd    = writefd;
+    dc->maxsz      = -1;
+    dc->callback   = write_emulator_done;
 
     rc = libxl__datacopier_start(dc);
     if (rc)
diff --git a/tools/libxl/libxl_stream_write.c b/tools/libxl/libxl_stream_write.c
index 944a87b..94f681b 100644
--- a/tools/libxl/libxl_stream_write.c
+++ b/tools/libxl/libxl_stream_write.c
@@ -180,7 +180,8 @@ void libxl__stream_write_start(libxl__egc *egc,
 
     dc->ao        = ao;
     dc->readfd    = -1;
-    dc->writewhat = "save/migration stream";
+    dc->writewhat = "stream header";
+    dc->copywhat  = "save v2 stream";
     dc->writefd   = stream->fd;
     dc->maxsz     = -1;
     dc->callback  = stream_header_done;
@@ -386,6 +387,7 @@ static void write_emulator_record(libxl__egc *egc,
     FILLZERO(*dc);
     dc->ao            = stream->ao;
     dc->readwhat      = "qemu save file";
+    dc->copywhat      = "save v2 stream";
     dc->readfd        = readfd;
     dc->maxsz         = -1;
     dc->readbuf       = stream->emu_body + sizeof(*ehdr);
-- 
1.7.10.4

  parent reply	other threads:[~2015-07-17 16:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 16:51 [PATCH 0/4] Fix to libxl migration v2 issue blocking OSSTest Andrew Cooper
2015-07-17 16:51 ` [PATCH 1/4] tools/libxc: Identify the path of the kernel image which cannot be found Andrew Cooper
2015-07-17 16:53   ` Ian Campbell
2015-07-17 16:55   ` Wei Liu
2015-07-17 16:51 ` [PATCH 2/4] tools/libxl: Log the subject fd in datacopier messages Andrew Cooper
2015-07-20  9:54   ` Wei Liu
2015-07-17 16:51 ` Andrew Cooper [this message]
2015-07-20  9:55   ` [PATCH 3/4] tools/libxl: Identify copywhat in stream v2 datacopiers Wei Liu
2015-07-17 16:51 ` [PATCH 4/4] tools/libxl: Initialise the fd of the unused half of a datacopier Andrew Cooper
2015-07-17 16:55   ` Ian Campbell
2015-07-17 16:55   ` Wei Liu
2015-07-17 16:56     ` Andrew Cooper
2015-07-17 16:59     ` [PATCH v2 " Andrew Cooper
2015-07-17 17:01       ` Wei Liu
2015-07-17 17:11         ` Ian Campbell
2015-07-17 17:11           ` Andrew Cooper
2015-07-20  9:56 ` [PATCH 0/4] Fix to libxl migration v2 issue blocking OSSTest Wei Liu
2015-07-20 10:11   ` Andrew Cooper
2015-07-21 12:49     ` Wei Liu
2015-07-21 14:51       ` Ian Campbell
2015-07-21 15:05         ` Ian Campbell

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=1437151878-11792-4-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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).