From: Alberto Garcia <berto@igalia.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer
Date: Wed, 18 Mar 2015 13:29:21 +0100 [thread overview]
Message-ID: <20150318122921.GA12024@igalia.com> (raw)
In-Reply-To: <20150312154517.GB7029@noname.redhat.com>
On Thu, Mar 12, 2015 at 04:45:17PM +0100, Kevin Wolf wrote:
> > One issue that I'm finding is that when we move the block-stream
> > job to an intermediate node, where the device name is empty, we
> > get messages like "Device '' is busy".
> My first thought was "then make it 'Source/Target device is busy'
> without mentioning any name". In the context of any given command,
> it would still be clear which BDS is meant. In fact, I have argued
> before that mentioning the device name in an error to a command that
> refers to a specific device is redundant and should be avoided.
>
> The problem here is that it's not stream_start() that generates the
> error, but block_job_create(), which doesn't know which role it's bs
> argument has for the block job. So it can't decide whether to say
> "source device", "target device" or something completely different.
The problem is actually not there. The error message generated by
block_job_create() is "block device is in use by block job: stream".
It's bdrv_op_is_blocked() that adds the extra "Device '' is busy".
error_setg(errp, "Device '%s' is busy: %s",
bdrv_get_device_name(bs),
error_get_pretty(blocker->reason));
I can use the same approach as in the BlockJobInfo case and fall back
to the node name if the device name is empty, but the problem is that
bdrv_get_device_name() is used all over the place, so this probably
needs a more general solution.
Even at the moment the backing blocker set by bdrv_set_backing_hd()
has problems:
error_setg(&bs->backing_blocker,
"device is used as backing hd of '%s'",
bdrv_get_device_name(bs));
This only works if 'bs' is a root node, but if you try to perform an
operation on the backing image of another backing image, you get a
"device is used as backing hd of ''".
Error messages aside, I would probably need to check all uses of
bdrv_get_device_name() because there could be more surprises if the
node is not at the root.
Berto
next prev parent reply other threads:[~2015-03-18 12:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 13:53 [Qemu-devel] [PATCH 0/3] Support streaming to an intermediate layer Alberto Garcia
2015-02-20 13:53 ` [Qemu-devel] [PATCH 1/3] block: " Alberto Garcia
2015-03-05 14:04 ` Kevin Wolf
2015-03-05 14:58 ` Alberto Garcia
2015-03-05 15:15 ` Kevin Wolf
2015-03-05 15:47 ` Alberto Garcia
2015-03-12 13:18 ` Alberto Garcia
2015-02-20 13:53 ` [Qemu-devel] [PATCH 2/3] block: Add QMP support for " Alberto Garcia
2015-02-20 22:38 ` Eric Blake
2015-02-23 12:23 ` Alberto Garcia
2015-02-23 13:04 ` Kevin Wolf
2015-02-24 14:08 ` Markus Armbruster
2015-03-05 14:09 ` Kevin Wolf
2015-03-05 15:12 ` Alberto Garcia
2015-03-11 16:38 ` Alberto Garcia
2015-03-12 15:45 ` Kevin Wolf
2015-03-17 15:00 ` Alberto Garcia
2015-03-17 15:22 ` Eric Blake
2015-03-17 15:40 ` Alberto Garcia
2015-03-17 15:28 ` Kevin Wolf
2015-03-18 12:29 ` Alberto Garcia [this message]
2015-02-20 13:53 ` [Qemu-devel] [PATCH 3/3] docs: Document how to stream " Alberto Garcia
2015-02-20 17:34 ` [Qemu-devel] [PATCH 0/3] Support streaming " Eric Blake
2015-02-20 19:05 ` Alberto Garcia
2015-02-20 22:49 ` Eric Blake
2015-02-22 15:08 ` Alberto Garcia
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=20150318122921.GA12024@igalia.com \
--to=berto@igalia.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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.