From: Markus Armbruster <armbru@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] Add 'blockdev-del' command
Date: Wed, 21 Oct 2015 10:57:32 +0200 [thread overview]
Message-ID: <87lhawsio3.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <cover.1444743418.git.berto@igalia.com> (Alberto Garcia's message of "Tue, 13 Oct 2015 16:48:49 +0300")
Alberto Garcia <berto@igalia.com> writes:
> Here's my first attempt at the 'blockdev-del' command.
>
> This series goes on top of Max's "BlockBackend and media" v6:
>
> https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg02810.html
>
> With Max's code, 'blockdev-add' can now create a BlockDriverState with
> or without a BlockBackend (depending on whether the 'id' parameter is
> passed).
>
> Therefore, 'blockdev-del' can be used to delete a backend and/or a
> BDS.
>
> The way it works is simple: it receives a single 'device' parameter
> which can refer to a block backend or a node name.
>
> - If it's a block backend, it will delete it along with its attached
> BDS (if any).
>
> - If it's a node name, it will delete the BDS along with the backend
> it is attached to (if any).
>
> - If you're wondering whether it's possible to delete the BDS but not
> the backend it is attached to, there is already eject or
> blockdev-remove-medium for that.
>
> If either the backend or the BDS are being used (refcount > 1, or if
> the BDS has any parents) the command fails.
>
> The series includes bunch of test cases with different scenarios
> (nodes with and without backend, empty backend, backing images, block
> jobs, Quorum).
I almost certainly won't have the time to review this series, but I can
still indulge in a little drive-by shooting :)
blockdev-add is a big & hairy feature that has taken considerable time
to develop, spanning multiple releases, and still isn't quite done
(never been closer, though). As such, it's a textbook example of an
experimental interface, and should have been x-blockdev-add. We messed
that up, and it's probably not worth renaming now.
Quite a few users have been trying to use blockdev-add, and ran into
roadblocks sooner or later. Inevitable, given its incomplete state.
Perhaps an x- prefix providing fair warning would've saved them trouble,
but that's water under the bridge now. We tried to warn them off with
scary documentation instead (commit da2cf4e).
Naturally, running into an obvious roadblock early is less bad than
running into a subtle one late. The lack of blockdev-del has served as
an obvious early one.
Mind, that's not an objection to implementing it now. I think the
time's ripe, actually. I just want us to try to erect a proper warning
sign where the "no blockdev-del" roadblock used to be. Naming it
x-blockdev-del together with a note explaining why it's experimental
should do the trick.
next prev parent reply other threads:[~2015-10-21 8:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 13:48 [Qemu-devel] [PATCH 0/3] Add 'blockdev-del' command Alberto Garcia
2015-10-13 13:48 ` [Qemu-devel] [PATCH 1/3] block: Add blk_get_refcnt() Alberto Garcia
2015-10-17 18:06 ` Max Reitz
2015-10-13 13:48 ` [Qemu-devel] [PATCH 2/3] block: Add 'blockdev-del' QMP command Alberto Garcia
2015-10-17 18:06 ` Max Reitz
2015-10-19 14:20 ` Alberto Garcia
2015-10-17 18:23 ` Max Reitz
2015-10-17 18:32 ` Alberto Garcia
2015-10-13 13:48 ` [Qemu-devel] [PATCH 3/3] iotests: Add test for the blockdev-del command Alberto Garcia
2015-10-19 11:27 ` [Qemu-devel] [PATCH 0/3] Add 'blockdev-del' command Kevin Wolf
2015-10-19 14:15 ` Alberto Garcia
2015-10-19 15:04 ` Kevin Wolf
2015-10-20 15:02 ` Alberto Garcia
2015-10-22 10:38 ` Kevin Wolf
2015-10-22 11:08 ` Alberto Garcia
2015-10-22 11:25 ` Kevin Wolf
2015-10-22 11:31 ` Alberto Garcia
2015-10-22 11:47 ` Kevin Wolf
2015-10-19 14:38 ` Max Reitz
2015-10-21 8:57 ` Markus Armbruster [this message]
2015-10-21 9:06 ` 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=87lhawsio3.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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.