[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb() |
Date: |
Mon, 17 Jun 2013 14:33:10 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Jun 17, 2013 at 11:46:19AM +0200, Pavel Hrdina wrote:
> On 5.6.2013 15:23, Stefan Hajnoczi wrote:
> >On Wed, May 29, 2013 at 06:18:19PM +0200, Pavel Hrdina wrote:
> >>@@ -1071,14 +1072,18 @@ static void
> >>qmp_bdrv_open_encrypted(BlockDriverState *bs, const char *filename,
> >> if (password) {
> >> if (bdrv_set_key(bs, password) < 0) {
> >> error_set(errp, QERR_INVALID_PASSWORD);
> >>+ return;
> >> }
> >> } else {
> >> error_set(errp, QERR_DEVICE_ENCRYPTED,
> >> bdrv_get_device_name(bs),
> >> bdrv_get_encrypted_filename(bs));
> >>+ return;
> >> }
> >> } else if (password) {
> >> error_set(errp, QERR_DEVICE_NOT_ENCRYPTED,
> >> bdrv_get_device_name(bs));
> >> }
> >>+
> >>+ bdrv_dev_change_media_cb(bs, true);
> >> }
> >
> >Calling bdrv_dev_change_media_cb() after raising
> >QERR_DEVICE_NOT_ENCRYPTED is intentional? It might warrant a comment.
> >
>
> Sorry for my late answer.
>
> It's just a warning, that you used a password for a block device that
> doesn't require it. The device is opened successfully and should be
> handled correctly (call the bdrv_dev_change_media_cb() ).
Yep, IMO it's worth a comment that this isn't an "error" just a
"warning".
Stefan
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Stefan Hajnoczi, 2013/06/05
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Pavel Hrdina, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(),
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Luiz Capitulino, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Pavel Hrdina, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Luiz Capitulino, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Pavel Hrdina, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Luiz Capitulino, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Kevin Wolf, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Luiz Capitulino, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Kevin Wolf, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Luiz Capitulino, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb(), Kevin Wolf, 2013/06/17