All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Shriram Rajagopalan <rshriram@cs.ubc.ca>,
	Jim Fehlig <jfehlig@novell.com>
Subject: [PATCH 4 of 8] libxc: save: noncached write doesn't use live parameter
Date: Tue, 24 May 2011 10:14:30 +0100	[thread overview]
Message-ID: <d6eb4fc290ba248e6830.1306228470@cosworth.uk.xensource.com> (raw)
In-Reply-To: <patchbomb.1306228466@cosworth.uk.xensource.com>

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1306228450 -3600
# Node ID d6eb4fc290ba248e6830c5df11c8cb511bfd6db9
# Parent  0d97d90876b0e59648bd403794812941bcb8d13e
libxc: save: noncached write doesn't use live parameter.

so drop it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 0d97d90876b0 -r d6eb4fc290ba tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c	Tue May 24 10:14:10 2011 +0100
+++ b/tools/libxc/xc_domain_save.c	Tue May 24 10:14:10 2011 +0100
@@ -152,7 +152,7 @@ static uint64_t tv_delta(struct timeval 
 }
 
 static int noncached_write(xc_interface *xch,
-                           int fd, int live, void *buffer, int len) 
+                           int fd, void *buffer, int len) 
 {
     static int write_count = 0;
     int rc = (write_exact(fd, buffer, len) == 0) ? len : -1;
@@ -255,12 +255,12 @@ static inline int write_buffer(xc_interf
 /* like write_buffer for noncached, which returns number of bytes written */
 static inline int write_uncached(xc_interface *xch,
                                    int dobuf, struct outbuf* ob, int fd,
-                                   int live, void* buf, size_t len)
+                                   void* buf, size_t len)
 {
     if ( dobuf )
         return outbuf_hardwrite(xch, ob, fd, buf, len) ? -1 : len;
     else
-        return noncached_write(xch, fd, live, buf, len);
+        return noncached_write(xch, fd, buf, len);
 }
 
 static int print_stats(xc_interface *xch, uint32_t domid, int pages_sent,
@@ -1066,7 +1066,7 @@ int xc_domain_save(xc_interface *xch, in
 
   copypages:
 #define wrexact(fd, buf, len) write_buffer(xch, last_iter, &ob, (fd), (buf), (len))
-#define ratewrite(fd, live, buf, len) write_uncached(xch, last_iter, &ob, (fd), (live), (buf), (len))
+#define wruncached(fd, live, buf, len) write_uncached(xch, last_iter, &ob, (fd), (buf), (len))
 
     /* Now write out each data page, canonicalising page tables as we go... */
     for ( ; ; )
@@ -1300,7 +1300,7 @@ int xc_domain_save(xc_interface *xch, in
                        run of pages we may have previously acumulated */
                     if ( run )
                     {
-                        if ( ratewrite(io_fd, live, 
+                        if ( wruncached(io_fd, live,
                                        (char*)region_base+(PAGE_SIZE*(j-run)), 
                                        PAGE_SIZE*run) != PAGE_SIZE*run )
                         {
@@ -1332,7 +1332,7 @@ int xc_domain_save(xc_interface *xch, in
                         goto out;
                     }
 
-                    if ( ratewrite(io_fd, live, page, PAGE_SIZE) != PAGE_SIZE )
+                    if ( wruncached(io_fd, live, page, PAGE_SIZE) != PAGE_SIZE )
                     {
                         PERROR("Error when writing to state file (4b)"
                               " (errno %d)", errno);
@@ -1349,7 +1349,7 @@ int xc_domain_save(xc_interface *xch, in
             if ( run )
             {
                 /* write out the last accumulated run of pages */
-                if ( ratewrite(io_fd, live, 
+                if ( wruncached(io_fd, live,
                                (char*)region_base+(PAGE_SIZE*(j-run)), 
                                PAGE_SIZE*run) != PAGE_SIZE*run )
                 {

  parent reply	other threads:[~2011-05-24  9:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24  9:14 [PATCH 0 of 8] Remove static variables from xc_domain_{save, restore}.c Ian Campbell
2011-05-24  9:14 ` [PATCH 1 of 8] libxc: save/restore: remove static context variables Ian Campbell
2011-05-24 10:33   ` Vincent Hanquez
2011-05-24  9:14 ` [PATCH 2 of 8] libxc: save: drop code under ADAPTIVE_SAVE ifdef Ian Campbell
2011-05-24  9:14 ` [PATCH 3 of 8] libxc: save: rename ratewrite to uncached Ian Campbell
2011-05-24  9:14 ` Ian Campbell [this message]
2011-05-24  9:14 ` [PATCH 5 of 8] libxc: save: move static "write_count" variable into outbuf Ian Campbell
2011-05-24  9:14 ` [PATCH 6 of 8] libxc: save: encapsulate time stats in a struct Ian Campbell
2011-05-24  9:14 ` [PATCH 7 of 8] libxc: save: don't bother calculating stat's deltas unless we are going to print them Ian Campbell
2011-05-24  9:14 ` [PATCH 8 of 8] libxc: save: move static stats variable to stack variable Ian Campbell
2011-05-24 16:45   ` Ian Jackson
2011-05-24 13:47 ` [PATCH 0 of 8] Remove static variables from xc_domain_{save, restore}.c Shriram Rajagopalan
2011-05-24 17:02   ` Ian Jackson
2011-05-24 17:52     ` Ian Campbell
2011-05-24 18:57       ` Shriram Rajagopalan

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=d6eb4fc290ba248e6830.1306228470@cosworth.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=jfehlig@novell.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=xen-devel@lists.xensource.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.