[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 1/1] dump.c: allow fd_write_vmcore to return
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 1/1] dump.c: allow fd_write_vmcore to return errno on failure |
Date: |
Mon, 12 Feb 2018 11:47:29 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/12/2018 08:25 AM, Daniel Henrique Barboza wrote:
From: Yasmin Beatriz <address@hidden>
fd_write_vmcore can fail to execute for a lot of reasons that can be
retrieved by errno, but it only returns -1. This makes difficult for
the caller to know what happened and only a generic error message is
propagated back to the user. This is an example using dump-guest-memory:
(qemu) dump-guest-memory /home/yasmin/mnt/test.dump
dump: failed to save memory
...
This is the same dump-guest-memory example with this patch applied:
(qemu) dump-guest-memory /home/yasmin/mnt/test.dump
dump: failed to save memory: No space left on device
(qemu)
This example illustrates an error of fd_write_vmcore when called
from write_data. All other callers will benefit from better
error messages as well.
Reported-by: address@hidden
Cc: Jose Ricardo Ziviani <address@hidden>
Signed-off-by: Yasmin Beatriz <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
dump.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org