qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: peter@gridcentric.ca
To: qemu-devel@nongnu.org, aliguori@us.ibm.com
Cc: andreslc@gridcentric.ca, peter@gridcentric.ca
Subject: [Qemu-devel] [PATCH v2] exec: make -mem-path filenames deterministic
Date: Fri,  1 Mar 2013 12:21:33 -0500	[thread overview]
Message-ID: <1362158493-11907-1-git-send-email-peter@gridcentric.ca> (raw)
In-Reply-To: <876237ebst.fsf@codemonkey.ws>

From: Peter Feiner <peter@gridcentric.ca>

Adds ramblocks' names to their backing files when using -mem-path.  Eases
introspection and debugging.

Signed-off-by: Peter Feiner <peter@gridcentric.ca>
---

On Tue, Jan 8, 2013 at 2:04 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
>
> Yes, please submit the oneliner.

Here it is :)

The commit should probably be called "exec: add ramblocks' names to -mem-path
files" since the paths aren't deterministic.

v1 -> v2: Just add ramblock name to mkstemp template. 

Thanks,
Peter

 exec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/exec.c b/exec.c
index a41bcb8..16a5452 100644
--- a/exec.c
+++ b/exec.c
@@ -865,7 +865,8 @@ static void *file_ram_alloc(RAMBlock *block,
         return NULL;
     }
 
-    filename = g_strdup_printf("%s/qemu_back_mem.XXXXXX", path);
+    filename = g_strdup_printf("%s/qemu_back_mem.%s.XXXXXX", path,
+                               block->mr->name);
 
     fd = mkstemp(filename);
     if (fd < 0) {
-- 
1.7.10.4

  parent reply	other threads:[~2013-03-01 17:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20 12:10 [Qemu-devel] [PATCH 0/1] Exogenous memory management via -mem-path Peter Feiner
2012-11-20 12:10 ` [Qemu-devel] [PATCH 1/1] exec: make -mem-path filenames deterministic Peter Feiner
2012-11-29 16:29   ` Peter Feiner
2013-01-07 19:55   ` Anthony Liguori
2013-01-08 15:59     ` Peter Feiner
2013-01-08 19:04       ` Anthony Liguori
2013-01-08 19:59         ` Peter Maydell
2013-03-01 17:21         ` peter [this message]
2013-03-01 18:47           ` [Qemu-devel] [PATCH v2] " Andreas Färber
2013-03-01 19:20             ` Peter Feiner
2013-01-02 19:34 ` [Qemu-devel] [PATCH 0/1] Exogenous memory management via -mem-path Peter Feiner

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=1362158493-11907-1-git-send-email-peter@gridcentric.ca \
    --to=peter@gridcentric.ca \
    --cc=aliguori@us.ibm.com \
    --cc=andreslc@gridcentric.ca \
    --cc=qemu-devel@nongnu.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).