From: Kevin Wolf <kwolf@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Lieven <pl@kamp.de>,
Ilya Dryomov <idryomov@gmail.com>,
Hanna Reitz <hreitz@redhat.com>, Tingting Mao <timao@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [PATCH v2] block/rbd: report a better error when namespace does not exist
Date: Mon, 30 May 2022 13:21:26 +0200 [thread overview]
Message-ID: <YpSotiJdS6MEwwyT@redhat.com> (raw)
In-Reply-To: <20220517071012.6120-1-sgarzare@redhat.com>
Am 17.05.2022 um 09:10 hat Stefano Garzarella geschrieben:
> If the namespace does not exist, rbd_create() fails with -ENOENT and
> QEMU reports a generic "error rbd create: No such file or directory":
>
> $ qemu-img create rbd:rbd/namespace/image 1M
> Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
> qemu-img: rbd:rbd/namespace/image: error rbd create: No such file or directory
>
> Unfortunately rados_ioctx_set_namespace() does not fail if the namespace
> does not exist, so let's use rbd_namespace_exists() in qemu_rbd_connect()
> to check if the namespace exists, reporting a more understandable error:
>
> $ qemu-img create rbd:rbd/namespace/image 1M
> Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
> qemu-img: rbd:rbd/namespace/image: namespace 'namespace' does not exist
>
> Reported-by: Tingting Mao <timao@redhat.com>
> Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2022-05-30 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 7:10 [PATCH v2] block/rbd: report a better error when namespace does not exist Stefano Garzarella
2022-05-30 8:32 ` Stefano Garzarella
2022-05-30 11:21 ` Kevin Wolf [this message]
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=YpSotiJdS6MEwwyT@redhat.com \
--to=kwolf@redhat.com \
--cc=hreitz@redhat.com \
--cc=idryomov@gmail.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=timao@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.