Am 11.09.2015 um 17:49 hat Vasiliy Tolstov geschrieben:
> Hi! qcow2 have abilit to store vm state inside qcow2 file in space
> that not allocated to guest, but if i want to store vm state inside
> sheepdog storage with raw image what is the preferred place to store
> memory data?
> I simply can
Signed-off-by: Wen Congyang
Signed-off-by: zhanghailiang
Signed-off-by: Gonglei
---
blockdev.c | 48 ++
qapi/block-core.json | 34
If quorum's child is broken, we can use mirror job to replace it.
But sometimes, the user only need to remove the broken child, and
add it later when the problem is fixed.
It is based on the following patch:
http://lists.nongnu.org/archive/html/qemu-devel/2015-09/msg04579.html
ChangLog:
v4:
1.
In some cases, we want to take a quorum child offline, and take
another child online.
Signed-off-by: Wen Congyang
Signed-off-by: zhanghailiang
Signed-off-by: Gonglei
---
block.c | 50
Signed-off-by: Wen Congyang
Signed-off-by: zhanghailiang
Signed-off-by: Gonglei
Cc: Luiz Capitulino
---
hmp-commands.hx | 28
hmp.c | 20
2015-09-18 12:02 GMT+03:00 Kevin Wolf :
> Doesn't sheepdog already support storing snapshots in the same image?
> I thought it would just work; at least, there's some code there for it.
Yes, qemu and sheepdog have ability to create internal snapshot, i
miss that, but when i'm
Am 18.09.2015 um 11:03 hat Vasiliy Tolstov geschrieben:
> 2015-09-18 12:02 GMT+03:00 Kevin Wolf :
> > Doesn't sheepdog already support storing snapshots in the same image?
> > I thought it would just work; at least, there's some code there for it.
>
> Yes, qemu and sheepdog have
On 09/18/2015 09:22 AM, Max Reitz wrote:
> blk_bs() will not necessarily return a non-NULL value any more (unless
> blk_is_available() is true or it can be assumed to otherwise, e.g.
> because it is called immediately after a successful blk_new_with_bs() or
> blk_new_open()).
>
> Signed-off-by:
On 14.09.2015 18:01, Alberto Garcia wrote:
> One of the limitations of the 'blockdev-snapshot-sync' command is that
> it does not allow passing BlockdevOptions to the newly created
> snapshots, so they are always opened using the default values.
>
> Extending the command to allow passing options
On 14.09.2015 18:01, Alberto Garcia wrote:
> Signed-off-by: Alberto Garcia
> ---
> tests/qemu-iotests/085 | 102
> ++---
> tests/qemu-iotests/085.out | 34 ++-
> 2 files changed, 128 insertions(+), 8 deletions(-)
Looks
On Thu 17 Sep 2015 03:48:04 PM CEST, Kevin Wolf wrote:
> bdrv_swap() has always been an ugly hack that we would rather have
> avoided. When it was introduced, we simply didn't have the
> infrastructure to update pointers instead of transplanting the
> contents of BDS object,
On Thu 17 Sep 2015 03:48:17 PM CEST, Kevin Wolf wrote:
> +static void swap_feature_fields(BlockDriverState *bs_top,
> +BlockDriverState *bs_new)
> +{
> +BlockDriverState tmp;
> +
> +bdrv_move_feature_fields(, bs_top);
> +bdrv_move_feature_fields(bs_top,
Am 18.09.2015 um 13:45 hat Alberto Garcia geschrieben:
> On Thu 17 Sep 2015 03:48:17 PM CEST, Kevin Wolf wrote:
>
> > +static void swap_feature_fields(BlockDriverState *bs_top,
> > +BlockDriverState *bs_new)
> > +{
> > +BlockDriverState tmp;
> > +
> > +
On Fri, Sep 18, 2015 at 6:49 PM, Kevin Wolf wrote:
> Am 18.09.2015 um 11:03 hat Vasiliy Tolstov geschrieben:
>> 2015-09-18 12:02 GMT+03:00 Kevin Wolf :
>> > Doesn't sheepdog already support storing snapshots in the same image?
>> > I thought it would just work;
On 09/18/2015 03:03 AM, Vasiliy Tolstov wrote:
> 2015-09-18 12:02 GMT+03:00 Kevin Wolf :
>> Doesn't sheepdog already support storing snapshots in the same image?
>> I thought it would just work; at least, there's some code there for it.
>
>
> Yes, qemu and sheepdog have ability
On 09/18/2015 07:16 AM, Alberto Garcia wrote:
> This fixes the problem detect by Fam: the previous series was deleting
> the 'backing' option for 'blockdev-add' even if it contained a
> non-empty string.
>
> The code is also rebased on top of the current master. In particular
> the test output
On 09/14/2015 10:01 AM, Alberto Garcia wrote:
> One of the limitations of the 'blockdev-snapshot-sync' command is that
> it does not allow passing BlockdevOptions to the newly created
> snapshots, so they are always opened using the default values.
>
> Extending the command to allow passing
On 09/18/2015 04:13 AM, Wen Congyang wrote:
> In some cases, we want to take a quorum child offline, and take
> another child online.
>
> Signed-off-by: Wen Congyang
> Signed-off-by: zhanghailiang
> Signed-off-by: Gonglei
On 09/18/2015 04:13 AM, Wen Congyang wrote:
> Signed-off-by: Wen Congyang
> Signed-off-by: zhanghailiang
> Signed-off-by: Gonglei
Commit message should probably mention the name of the new commands.
Also, if you
On 09/18/2015 04:13 AM, Wen Congyang wrote:
> Signed-off-by: Wen Congyang
> Signed-off-by: zhanghailiang
> Signed-off-by: Gonglei
> Cc: Luiz Capitulino
> ---
> hmp-commands.hx | 28
On 09/15/2015 12:42 AM, Alberto Garcia wrote:
> On Tue 15 Sep 2015 04:27:21 AM CEST, Fam Zheng wrote:
>
>>> +backing = qdict_get_try_str(options, "backing");
>>> +if (backing && *backing == '\0') {
>>> +flags |= BDRV_O_NO_BACKING;
>>> +}
>>> +
Jeff Cody writes:
> Changes from RFC v1:
>
> Patch 1: Several typos / grammatical errors (thanks Eric, John)
> Make id_subsys_str[] const pointer to const strings (thanks Eric)
> Moved id_subsys_str[] out from id_generate() (thanks John)
>
We will introduce the 'blockdev-snapshot' command that will require
its own struct for the parameters, so we need to rename this one in
order to avoid name clashes.
Signed-off-by: Alberto Garcia
Reviewed-by: Eric Blake
Reviewed-by: Max Reitz
Jeff Cody writes:
> If a node-name is not specified, automatically generate the node-name.
>
> Generated node-names will use the "block" sub-system identifier.
>
> Reviewed-by: Eric Blake
> Reviewed-by: John Snow
> Signed-off-by: Jeff Cody
This fixes the problem detect by Fam: the previous series was deleting
the 'backing' option for 'blockdev-add' even if it contained a
non-empty string.
The code is also rebased on top of the current master. In particular
the test output had to be adapted because of fe646693.
Again, this depends
One of the limitations of the 'blockdev-snapshot-sync' command is that
it does not allow passing BlockdevOptions to the newly created
snapshots, so they are always opened using the default values.
Extending the command to allow passing options is not a practical
solution because there is overlap
Jeff Cody writes:
> Multiple sub-systems in QEMU may find it useful to generate IDs
> for objects that a user may reference via QMP or HMP. This patch
> presents a standardized way to do it, so that automatic ID generation
> follows the same rules.
>
> This patch enforces the
Passing an empty string allows opening an image but not its backing
file. This was already described in the API documentation, only the
implementation was missing.
This is useful for creating snapshots using images opened with
blockdev-add, since they are not supposed to have a backing image
Signed-off-by: Alberto Garcia
---
tests/qemu-iotests/085 | 102 ++---
tests/qemu-iotests/085.out | 34 ++-
2 files changed, 128 insertions(+), 8 deletions(-)
diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085
On Fri 18 Sep 2015 02:24:21 PM CEST, Kevin Wolf wrote:
>> > +static void swap_feature_fields(BlockDriverState *bs_top,
>> > +BlockDriverState *bs_new)
>> > +{
>> > +BlockDriverState tmp;
>> > +
>> > +bdrv_move_feature_fields(, bs_top);
>> > +
On 09/18/2015 09:22 AM, Max Reitz wrote:
> With the new automatically-recursive implementation of
> bdrv_is_inserted() checking by default whether all the children of a BDS
> are inserted, we can drop raw's own implementation.
>
> Signed-off-by: Max Reitz
> ---
>
If there is no BlockDriverState in a BlockBackend or if the tray of the
guest device is open, fail all requests (where that is possible) with
-ENOMEDIUM.
The reason the status of the guest device is taken into account is
because once the guest device's tray is opened, any request on the same
On 18.09.2015 15:16, Alberto Garcia wrote:
> Passing an empty string allows opening an image but not its backing
> file. This was already described in the API documentation, only the
> implementation was missing.
>
> This is useful for creating snapshots using images opened with
> blockdev-add,
On 09/18/2015 09:22 AM, Max Reitz wrote:
> The tray of an FDD is open iff there is no medium inserted (there are
> only two states for an FDD: "medium inserted" or "no medium inserted").
>
> Signed-off-by: Max Reitz
> ---
> hw/block/fdc.c | 20
>
Extract some of the blockdev option extraction code from blockdev_init()
into its own function. This simplifies blockdev_init() and will allow
reusing the code in a different function added in a follow-up patch.
Signed-off-by: Max Reitz
---
blockdev.c | 209
Most of the options which blockdev_init() parses for both the
BlockBackend and the root BDS are valid for just the root BDS as well
(e.g. read-only). This patch allows specifying these options even if not
creating a BlockBackend.
Signed-off-by: Max Reitz
---
blockdev.c | 160
Signed-off-by: Max Reitz
---
blockdev.c | 49 +
qapi/block-core.json | 23 +++
qmp-commands.hx | 39 +++
3 files changed, 111 insertions(+)
diff --git
Add an option to qmp_blockdev_change_medium() which allows changing the
read-only status of the block device whose medium is changed.
Some drives do not have a inherently fixed read-only status; for
instance, floppy disks can be set read-only or writable independently of
the drive. Some users may
blk_bs() will not necessarily return a non-NULL value any more (unless
blk_is_available() is true or it can be assumed to otherwise, e.g.
because it is called immediately after a successful blk_new_with_bs() or
blk_new_open()).
Signed-off-by: Max Reitz
---
block.c
On 09/18/2015 09:22 AM, Max Reitz wrote:
> If bdrv_is_inserted() is called on the top level BDS, it should make
> sure all nodes in the BDS tree are actually inserted.
>
> Signed-off-by: Max Reitz
> ---
> block.c | 12 +---
> 1 file changed, 9 insertions(+), 3
On 09/18/2015 09:22 AM, Max Reitz wrote:
> In order to handle host device passthrough, some guest device models
> may call blk_is_inserted() to check whether the medium is inserted on
> the host, when checking the guest tray status.
>
> This tray status is inquired by blk_dev_change_media_cb();
This function removes the BlockDriverState associated with the given
BlockBackend from that BB and sets the BDS pointer in the BB to NULL.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/block-backend.c | 22 +-
blk_dev_change_media_cb() is called for all potential tray movements;
however, it is possible to request closing the tray but nothing actually
happening (on a floppy disk drive without a medium).
Thus, the actual tray status should be inquired before sending a
tray-moved event (and an event
On 17.09.2015 16:33, Alberto Garcia wrote:
> If a snapshot is performed on a device that has I/O limits they should
> be moved to the target image (the new active layer).
>
> Signed-off-by: Alberto Garcia
> ---
> tests/qemu-iotests/096 | 69
>
Signed-off-by: Max Reitz
---
blockdev.c | 30 ++
qapi/block-core.json | 15 +++
qmp-commands.hx | 45 +
3 files changed, 90 insertions(+)
diff --git a/blockdev.c b/blockdev.c
Use separate code paths for the two overloaded functions of the 'change'
HMP command, and invoke the 'blockdev-change-medium' QMP command if used
on a block device (by calling qmp_blockdev_change_medium()).
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Introduce a new QMP command 'blockdev-change-medium' which is intended
to replace the 'change' command for block devices. The existing function
qmp_change_blockdev() is accordingly renamed to
qmp_blockdev_change_medium().
Signed-off-by: Max Reitz
---
blockdev.c
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/qemu-iotests/118 | 638 +
tests/qemu-iotests/118.out | 5 +
tests/qemu-iotests/group | 1 +
3 files changed, 644 insertions(+)
create mode
And a helper function for that, which directly takes a pointer to the
BDS to be inserted instead of its node-name (which will be used for
implementing 'change' using blockdev-insert-medium).
Signed-off-by: Max Reitz
---
blockdev.c | 48
If the "id" field is missing from the options given to blockdev-add,
just omit the BlockBackend and create the BlockDriverState tree alone.
However, if "id" is missing, "node-name" must be specified; otherwise,
the BDS tree would no longer be accessible.
Many BDS options which are not parsed by
On 18.09.2015 15:16, Alberto Garcia wrote:
> Signed-off-by: Alberto Garcia
> ---
> tests/qemu-iotests/085 | 102
> ++---
> tests/qemu-iotests/085.out | 34 ++-
> 2 files changed, 128 insertions(+), 8 deletions(-)
Do not use "rudimentary" BDSs for empty drives any longer (for
freshly created drives).
After a follow-up patch, empty drives will generally use a NULL BDS, not
only the freshly created drives.
Signed-off-by: Max Reitz
---
blockdev.c | 72
Make bdrv_is_inserted(), blk_is_inserted(), and the callback
BlockDriver.bdrv_is_inserted() return a bool.
Suggested-by: Eric Blake
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
---
blk_is_available() returns true iff the BDS is inserted (which means
blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the
tray of the guest device is closed.
blk_is_inserted() is changed to return true only if blk_bs() is not
NULL.
Signed-off-by: Max Reitz
Tests 071 and 081 test giving references in blockdev-add. It is not
necessary to create a BlockBackend here, so omit it.
While at it, fix up some blockdev-add invocations in the vicinity
(s/raw/$IMGFMT/ in 081, drop the format BDS for blkverify's raw child in
071).
Signed-off-by: Max Reitz
Only call bdrv_add_key() on the BlockDriverState if it is not NULL.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
---
hw/usb/dev-storage.c | 30 --
1 file changed, 16
Fix the BlockBackend's AIOCB AioContext for aborting AIO in case there
is no BDS. If there is no implementation of AIOCBInfo::get_aio_context()
the AioContext is derived from the BDS the AIOCB belongs to. If that BDS
is NULL (because it has been removed from the BB) this will not work.
This patch
If bdrv_is_inserted() is called on the top level BDS, it should make
sure all nodes in the BDS tree are actually inserted.
Signed-off-by: Max Reitz
---
block.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
index
BlockAcctStats contains statistics about the data transferred from and
to the device; wr_highest_sector does not fit in with the rest.
Furthermore, those statistics are supposed to be specific for a certain
device and not necessarily for a BDS (see the comment above
bdrv_get_stats()); on the
This flag should not be set for the root BDS only, but for any BDS that
is being created while incoming migration is pending, so setting it is
moved from blockdev_init() to bdrv_fill_options().
Signed-off-by: Max Reitz
---
block.c| 4
blockdev.c | 4
2 files
As the comment above bdrv_get_stats() says, BlockAcctStats is something
which belongs to the device instead of each BlockDriverState. This patch
therefore moves it into the BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto
If there is no BDS tree attached to a BlockBackend, functions that can
do so should fall back to the BlockBackendRootState structure (which are
blk_is_read_only() and blk_get_flags(), because the read-only status and
the "open flags" are part of the BBRS).
Signed-off-by: Max Reitz
There are several BlockBackend functions which, in theory, cannot fail.
This patch makes them cope with the BlockDriverState pointer being NULL
by making them fall back to some default action like ignoring the value
in setters and returning the default in getters.
Signed-off-by: Max Reitz
This structure will store some of the state of the root BDS if the BDS
tree is removed, so that state can be restored once a new BDS tree is
inserted.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/block-backend.c | 37
The tray of an FDD is open iff there is no medium inserted (there are
only two states for an FDD: "medium inserted" or "no medium inserted").
Signed-off-by: Max Reitz
---
hw/block/fdc.c | 20
tests/fdc-test.c | 4 +---
2 files changed, 17
These options are only relevant for the user of a whole BDS tree (like a
guest device or a block job) and should thus be moved into the
BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block.c| 125
guest_block_size is a guest device property so it should be moved into
the interface between block layer and guest devices, which is the
BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
---
Signed-off-by: Max Reitz
---
blockdev.c | 23 +++
qapi/block-core.json | 16
qmp-commands.hx | 35 +++
3 files changed, 74 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index
This function associates the given BlockDriverState with the given
BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
---
block/block-backend.c | 16
On 09/18/2015 09:22 AM, Max Reitz wrote:
> It has been deprecated as of 2.3, so we can now remove it.
>
> Signed-off-by: Max Reitz
> ---
> block/raw-posix.c| 222
> ++-
> qapi/block-core.json | 9 +--
> 2 files changed, 9
On 09/18/2015 09:22 AM, Max Reitz wrote:
> Tests 071 and 081 test giving references in blockdev-add. It is not
> necessary to create a BlockBackend here, so omit it.
>
> While at it, fix up some blockdev-add invocations in the vicinity
> (s/raw/$IMGFMT/ in 081, drop the format BDS for blkverify's
On 09/18/2015 09:22 AM, Max Reitz wrote:
> BlockAcctStats contains statistics about the data transferred from and
> to the device; wr_highest_sector does not fit in with the rest.
>
> Furthermore, those statistics are supposed to be specific for a certain
> device and not necessarily for a BDS
72 matches
Mail list logo