All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID
@ 2016-08-16 14:02 Kevin Wolf
  2016-08-16 14:10 ` [Qemu-devel] [Qemu-block] " Jeff Cody
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kevin Wolf @ 2016-08-16 14:02 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-devel

If a block job is started with a node name rather than a device name and
no explicit job ID is passed, it was reported that '' isn't a
well-formed ID. Which is correct, but we can make the message a little
bit nicer.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 blockjob.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/blockjob.c b/blockjob.c
index a5ba3be..a167f96 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -132,6 +132,10 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver,
 
     if (job_id == NULL) {
         job_id = bdrv_get_device_name(bs);
+        if (!*job_id) {
+            error_setg(errp, "An explicit job ID is required for this node");
+            return NULL;
+        }
     }
 
     if (!id_wellformed(job_id)) {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH] block jobs: Improve error message for missing job ID
  2016-08-16 14:02 [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID Kevin Wolf
@ 2016-08-16 14:10 ` Jeff Cody
  2016-08-16 14:11 ` Alberto Garcia
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jeff Cody @ 2016-08-16 14:10 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-block, qemu-devel

On Tue, Aug 16, 2016 at 04:02:10PM +0200, Kevin Wolf wrote:
> If a block job is started with a node name rather than a device name and
> no explicit job ID is passed, it was reported that '' isn't a
> well-formed ID. Which is correct, but we can make the message a little
> bit nicer.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  blockjob.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/blockjob.c b/blockjob.c
> index a5ba3be..a167f96 100644
> --- a/blockjob.c
> +++ b/blockjob.c
> @@ -132,6 +132,10 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver,
>  
>      if (job_id == NULL) {
>          job_id = bdrv_get_device_name(bs);
> +        if (!*job_id) {
> +            error_setg(errp, "An explicit job ID is required for this node");
> +            return NULL;
> +        }
>      }
>  
>      if (!id_wellformed(job_id)) {
> -- 
> 1.8.3.1
> 
> 

Reviewed-by: Jeff Cody <jcody@redhat.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH] block jobs: Improve error message for missing job ID
  2016-08-16 14:02 [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID Kevin Wolf
  2016-08-16 14:10 ` [Qemu-devel] [Qemu-block] " Jeff Cody
@ 2016-08-16 14:11 ` Alberto Garcia
  2016-08-17  8:28 ` Stefan Hajnoczi
  2016-08-17  9:08 ` [Qemu-devel] " Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Alberto Garcia @ 2016-08-16 14:11 UTC (permalink / raw)
  To: Kevin Wolf, qemu-block; +Cc: qemu-devel

On Tue 16 Aug 2016 04:02:10 PM CEST, Kevin Wolf wrote:
> If a block job is started with a node name rather than a device name and
> no explicit job ID is passed, it was reported that '' isn't a

"it was" ?

> well-formed ID. Which is correct, but we can make the message a little
> bit nicer.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Reviewed-by: Alberto Garcia <berto@igalia.com>

Berto

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH] block jobs: Improve error message for missing job ID
  2016-08-16 14:02 [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID Kevin Wolf
  2016-08-16 14:10 ` [Qemu-devel] [Qemu-block] " Jeff Cody
  2016-08-16 14:11 ` Alberto Garcia
@ 2016-08-17  8:28 ` Stefan Hajnoczi
  2016-08-17  9:08 ` [Qemu-devel] " Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2016-08-17  8:28 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-block, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

On Tue, Aug 16, 2016 at 04:02:10PM +0200, Kevin Wolf wrote:
> If a block job is started with a node name rather than a device name and
> no explicit job ID is passed, it was reported that '' isn't a
> well-formed ID. Which is correct, but we can make the message a little
> bit nicer.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  blockjob.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID
  2016-08-16 14:02 [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID Kevin Wolf
                   ` (2 preceding siblings ...)
  2016-08-17  8:28 ` Stefan Hajnoczi
@ 2016-08-17  9:08 ` Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2016-08-17  9:08 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel

Am 16.08.2016 um 16:02 hat Kevin Wolf geschrieben:
> If a block job is started with a node name rather than a device name and
> no explicit job ID is passed, it was reported that '' isn't a
> well-formed ID. Which is correct, but we can make the message a little
> bit nicer.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Applied to block-next.

Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-17  9:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 14:02 [Qemu-devel] [PATCH] block jobs: Improve error message for missing job ID Kevin Wolf
2016-08-16 14:10 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2016-08-16 14:11 ` Alberto Garcia
2016-08-17  8:28 ` Stefan Hajnoczi
2016-08-17  9:08 ` [Qemu-devel] " Kevin Wolf

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.