From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message
Date: Fri, 1 Jun 2018 07:32:49 -0500 [thread overview]
Message-ID: <7d3be270-d50a-fb9d-a194-be1b7f48f3d4@redhat.com> (raw)
In-Reply-To: <20180601091835.21620-1-famz@redhat.com>
On 06/01/2018 04:18 AM, Fam Zheng wrote:
> When hot-plugging a block device fails due to image locking errors,
> users won't see the helpful 'Is another process using the image?'
> message in QMP because currently the error hint is not carried over
> there.
>
> Even though extending QMP to include hint is a conceivably easy task,
> Libvirt will need some change to consume that data.
>
> Before that is fully sorted out, let's just do the easy fix by joining
> the two lines.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> block/file-posix.c | 10 ++--
> tests/qemu-iotests/153.out | 99 +++++++++++++-------------------------
> tests/qemu-iotests/182.out | 3 +-
> 3 files changed, 38 insertions(+), 74 deletions(-)
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 5a602cfe37..03776e13b1 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -699,11 +699,10 @@ static int raw_check_lock_bytes(BDRVRawState *s,
> if (ret) {
> char *perm_name = bdrv_perm_names(p);
> error_setg(errp,
> - "Failed to get \"%s\" lock",
> + "Failed to get \"%s\" lock. "
> + "Is another process using the image?",
Except that this goes against the error message recommendations that
Markus has tried to remind people of (in general, using a full-stop in
error_setg() is frowned on). Markus, do you have any suggestions?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-06-01 12:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 9:18 [Qemu-devel] [PATCH] file-posix: Consolidate the locking error message Fam Zheng
2018-06-01 12:32 ` Eric Blake [this message]
2018-06-01 13:38 ` Fam Zheng
2018-06-01 12:43 ` Daniel P. Berrangé
2018-06-01 13:33 ` Fam Zheng
2018-06-01 14:00 ` Daniel P. Berrangé
2018-06-01 14:17 ` Fam Zheng
2018-06-07 13:20 ` Markus Armbruster
2018-06-07 13:22 ` Daniel P. Berrangé
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=7d3be270-d50a-fb9d-a194-be1b7f48f3d4@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).