From: Stefan Hajnoczi <stefanha@gmail.com>
To: Peter Krempa <pkrempa@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] gluster: Correctly propagate errors when volume isn't accessible
Date: Fri, 9 May 2014 13:39:46 +0200 [thread overview]
Message-ID: <20140509113946.GA26017@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <9fb5771060b4b87b8a2f58689fdf58550a82d11f.1399630065.git.pkrempa@redhat.com>
On Fri, May 09, 2014 at 12:08:10PM +0200, Peter Krempa wrote:
> The docs for glfs_init suggest that the function sets errno on every
> failure. In fact it doesn't. As other functions such as
> qemu_gluster_open() in the gluster block code report their errors based
> on this fact we need to make sure that errno is set on each failure.
>
> This fixes a crash of qemu-img/qemu when a gluster brick isn't
> accessible from given host while the server serving the volume
> description is.
>
> Thread 1 (Thread 0x7ffff7fba740 (LWP 203880)):
> #0 0x00007ffff77673f8 in glfs_lseek () from /usr/lib64/libgfapi.so.0
> #1 0x0000555555574a68 in qemu_gluster_getlength ()
> #2 0x0000555555565742 in refresh_total_sectors ()
> #3 0x000055555556914f in bdrv_open_common ()
> #4 0x000055555556e8e8 in bdrv_open ()
> #5 0x000055555556f02f in bdrv_open_image ()
> #6 0x000055555556e5f6 in bdrv_open ()
> #7 0x00005555555c5775 in bdrv_new_open ()
> #8 0x00005555555c5b91 in img_info ()
> #9 0x00007ffff62c9c05 in __libc_start_main () from /lib64/libc.so.6
> #10 0x00005555555648ad in _start ()
> ---
>
> Notes:
> I'm also going to report a bug in libgfapi too.
>
> block/gluster.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Please use scripts/checkpatch.pl to check coding style in the future. I
added {} around the if statement body. QEMU always uses curlies even
for 1-statement bodies.
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
next prev parent reply other threads:[~2014-05-09 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 10:08 [Qemu-devel] [PATCH] gluster: Correctly propagate errors when volume isn't accessible Peter Krempa
2014-05-09 11:39 ` Stefan Hajnoczi [this message]
2014-05-09 12:55 ` Peter Krempa
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=20140509113946.GA26017@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=pkrempa@redhat.com \
--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).