On Mon, Feb 09, 2015 at 12:31:18PM +0100, Paolo Bonzini wrote:
>
>
> On 09/02/2015 11:47, mreza...@redhat.com wrote:
> > From: Miroslav Rezanina
> >
> > It was possible to call strcmp with NULL argument, that can cause
> > segmentation fault. Properly checking parameters to prevent this
> > sit
> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> On 22/01/2015 09:53, Pavel Dovgalyuk wrote:
> > This patch introduces the functions for enabling the record/replay and for
> > freeing the resources when simulator closes.
> >
> > Signed-off-by: Pavel Dovgalyuk
>
> > };
> >
> > /* Asynchronou
On 09/02/2015 13:59, Pavel Dovgaluk wrote:
>> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
>> On 22/01/2015 09:53, Pavel Dovgalyuk wrote:
>>> This patch introduces the functions for enabling the record/replay and for
>>> freeing the resources when simulator closes.
>>>
>>> Signed-off-by: Pave
On 09/02/15 12:43, Alexander Graf wrote:
Hi Juan,
> On 09.02.15 13:39, Juan Quintela wrote:
>> Mark Cave-Ayland wrote:
>>> Signed-off-by: Mark Cave-Ayland
>>> ---
>>> hw/intc/openpic.c | 253
>>> +
>>> 1 file changed, 119 insertions(+), 134
On Mon, Feb 09, 2015 at 09:18:15AM +0800, Fam Zheng wrote:
> On Fri, 02/06 11:23, Fam Zheng wrote:
> > On Thu, 02/05 15:29, massimo buscato wrote:
> > > Hi all!
> > >
> > > About virtio-scsi driver:
> > > There are many problem to use it on windows 2012 cluster service.
> > >
> > > Every time you
Alexander Graf wrote:
> Yes, please, just bump the version number and ignore all the legacy
> cruft. OpenPIC state saving is broken for years, any old state that we
> could potentially save is not usable anyway :)
I didn't knew that bit O:-)
Then you get a;
Reviewed-by: Juan Quintela
Alexander Graf wrote:
> On 09.02.15 13:39, Juan Quintela wrote:
>> Mark Cave-Ayland wrote:
>>> Signed-off-by: Mark Cave-Ayland
>>> ---
>>> hw/intc/openpic.c | 253
>>> +
>>VMSTATE_UINT32_EQUAL(nb_cpus, OpenPICState),
This change
Mark Cave-Ayland wrote:
> On 09/02/15 12:43, Alexander Graf wrote:
> Ha! I did actually do this but I accidentally messed up a rebase just
> before sending out the patchset so it got lost. But yes, I agree a
> version bump to 3 should be sufficient here.
>
> Just to put this in context: before th
From: "Michael S. Tsirkin"
RSDT offset can change across reboots and that makes
immutable RSDP, which is build at startup, point to
incorrect place in ACPI table blob. That results in
BIOS corrupting tables and guest OS failing to find
ACPI tables.
We really should have put it in a ROM region, bu
Linker table is build only once, so if later during
tables rebuild sizes of other ACPI tables change
pointers will be patched incorrectly due to wrong
offsets in linker. Resulting in guest not being able
to find ACPI tables.
Fix it by updating 'linker' table with the rest of
tables when firmware re
changes since v3:
* split out linker changes
* fix Michael's patch, by passing build_state
to callback so it would actually do something
* split out RSDP migration in separate patch
* s/imutable/immutable/
Patches 1-2: fix reboot issue after bridge hotplug
Patch 3: addresses RSDP readi
Makes sure that RSDP stays the same
/i.e. matches ACPI tables blob in source/
if guest is migrated during RSDP reading or
has been already shadowed by firmware.
Fix applies only to new machine types starting
from 2.3, so it won't break migration for old
machine types.
Signed-off-by: Igor Mammedov
On Mon, 9 Feb 2015, Leon Alrae wrote:
> > Rework the MIPS ABIs and CPU emulations available according to the
> > following target list:
> >
> > - mips|mipsel -- 32-bit CPUs only, system and user emulation mode,
> >o32 user ABI,
> >
> > - mips64|mips64el -- 32-bi
On 02/09/2015 03:59 PM, Igor Mammedov wrote:
From: "Michael S. Tsirkin"
RSDT offset can change across reboots and that makes
immutable RSDP, which is build at startup, point to
incorrect place in ACPI table blob. That results in
BIOS corrupting tables and guest OS failing to find
ACPI tables.
W
On 02/09/2015 03:59 PM, Igor Mammedov wrote:
Linker table is build only once, so if later during
tables rebuild sizes of other ACPI tables change
pointers will be patched incorrectly due to wrong
offsets in linker. Resulting in guest not being able
to find ACPI tables.
Fix it by updating 'linker'
On 02/09/2015 03:59 PM, Igor Mammedov wrote:
Makes sure that RSDP stays the same
/i.e. matches ACPI tables blob in source/
if guest is migrated during RSDP reading or
has been already shadowed by firmware.
Fix applies only to new machine types starting
from 2.3, so it won't break migration for o
On 09/02/2015 13:18, Christian Borntraeger wrote:
> From: Andy Whitcroft
>
> checkpatch currently loops on fpu/softfloat.c
> Turns out this is fixed in the Linux version of checkpatch.
>
> So this is a port of Andy Whitcrofts fix from Linux,
> Original commit was commit 89a883530fe7 ("checkpat
On 2015-02-09 at 03:06, chen xiao guang wrote:
On 02/05/2015 11:11 PM, Max Reitz wrote:
On 2015-02-04 at 22:44, Xiao Guang Chen wrote:
From: Mao Chuan Li
The tests for device type "ide_cd" are skipped for the s390 platform.
The default device id of hard disk on the s390 platform differs to t
Added RTH to cc because IIRC you did the last lot of rearranging how
we handle these "same CPU architecture, different ABI" variants of
linux-user...
On 9 February 2015 at 14:09, Maciej W. Rozycki wrote:
> On Mon, 9 Feb 2015, Leon Alrae wrote:
>
>> > Rework the MIPS ABIs and CPU emulations availa
On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote:
> From: Bin Wu
>
> We tested VMs migration with their disk images by drive_mirror. With
> migration, two VMs copyed large files between each other. During the
> test, a segfault occured. The stack was as follow:
>
> (gdb) bt
> qemu-coroutin
On Mon, Feb 09, 2015 at 10:16:08AM +0100, Paolo Bonzini wrote:
>
>
> On 08/02/2015 19:51, Eduardo Habkost wrote:
> > This cleans up some of the NUMA code: moves declarations to numa.h, rename
> > some
> > functions, and remove some existing code that was inside main().
> >
> > Eduardo Habkost (
On Sun, Feb 08, 2015 at 08:39:52PM +0800, Xiaodong Gong wrote:
> When open the vpc snapshot based FIXED format, its backing file,
> this FIXED vpc image, could be probed as a raw image, because that
> the find_image_format just checkout the first sector.
>
> Add a re-probe for the last sector to F
Flag overflow_to_inf is specified by ARM manual to decide if
FPInfinity(sign) or FPMaxNormal(sign) is returned. Current
codepath fails to check it.
Fixed by adding overflow_to_inf flag to return infinity when it's
true and maxnormal otherwise.
Signed-off-by: Xiangyu Hu
---
fpu/softfloat.c | 12 +
On Fri, Feb 06, 2015 at 04:06:17PM -0500, Max Reitz wrote:
> diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
> index 8e618b5..4e1996c 100644
> --- a/tests/qemu-iotests/common.qemu
> +++ b/tests/qemu-iotests/common.qemu
> @@ -187,13 +187,23 @@ function _launch_qemu()
>
Am 09.02.2015 um 15:31 schrieb Paolo Bonzini:
>
>
> On 09/02/2015 13:18, Christian Borntraeger wrote:
>> From: Andy Whitcroft
>>
>> checkpatch currently loops on fpu/softfloat.c
>> Turns out this is fixed in the Linux version of checkpatch.
>>
>> So this is a port of Andy Whitcrofts fix from Lin
On 2015-02-09 at 10:01, Stefan Hajnoczi wrote:
On Fri, Feb 06, 2015 at 04:06:17PM -0500, Max Reitz wrote:
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
index 8e618b5..4e1996c 100644
--- a/tests/qemu-iotests/common.qemu
+++ b/tests/qemu-iotests/common.qemu
@@ -187,1
On 02/09/15 10:08, Christian Borntraeger wrote:
> Am 09.02.2015 um 15:31 schrieb Paolo Bonzini:
>>
>>
>> On 09/02/2015 13:18, Christian Borntraeger wrote:
>>> From: Andy Whitcroft
>>>
>>> checkpatch currently loops on fpu/softfloat.c
>>> Turns out this is fixed in the Linux version of checkpatch.
On 09/02/2015 15:53, Eduardo Habkost wrote:
> Thanks!
>
> Do you think this should go through Michael's tree, like past NUMA
> patches, or through yours?
Through Michael's tree or yours :)
Paolo
The CHS calculation as done per the VHD spec imposes a maximum image
size of ~127 GB. Real VHD images exist that are larger than that.
Apparently there are two separate non-standard ways to achieve this:
You could use more heads than the spec does - this is the option that
qemu-img create chooses.
On Mon, Feb 09, 2015 at 12:53:37PM -0200, Eduardo Habkost wrote:
> On Mon, Feb 09, 2015 at 10:16:08AM +0100, Paolo Bonzini wrote:
> >
> >
> > On 08/02/2015 19:51, Eduardo Habkost wrote:
> > > This cleans up some of the NUMA code: moves declarations to numa.h,
> > > rename some
> > > functions, a
On Sun, Feb 08, 2015 at 04:51:16PM -0200, Eduardo Habkost wrote:
> Not all sysemu.h users need the NUMA declarations, and keeping them in a
> separate file makes easier to see what are the interfaces provided by
s/makes easier/makes it easier/
> numa.c.
>
> Signed-off-by: Eduardo Habkost
> ---
On 01/27/2015 06:42 PM, Michael Roth wrote:
> Quoting Tyrel Datwyler (2015-01-27 16:05:52)
>> On 01/27/2015 01:36 PM, Michael Roth wrote:
>>> Quoting David Gibson (2015-01-26 23:24:11)
On Sun, Jan 25, 2015 at 11:21:26PM -0600, Michael Roth wrote:
> Quoting David Gibson (2015-01-16 00:21:55
On 09/12/2014 01:56, Maciej W. Rozycki wrote:
> +if (info->elf_flags & EF_MIPS_NAN2008)
> +env->active_fpu.fcr31 |=
> +(1 << FCR31_NAN2008) & env->active_fpu.fcr31_rw_bitmask;
> +else
> +env->active_fpu.fcr31 &=
> +~((1 << FCR3
Only call bdrv_key_required() on the BlockDriverState if the
BlockBackend has an inserted medium.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
hw/usb/dev-storage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 45397
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
Reviewed-by: Eric Blake
This series reworks a lot regarding BlockBackend and media. It is
essentially a v3 to the "blockdev: Add blockdev-change-medium with
read-only option" series (which is in fact a part of this series), but
of course does a lot more.
Basically, this series allows empty BlockBackends, that is BBs with
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
---
block.c| 12 +++-
block/block-backend.c | 2 +-
block/raw-posix.c | 10
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.
Signed-off-by: Max Reitz
---
blockdev.c
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").
This results in the tray being reported as open if qemu has been started
with the default floppy drive, which breaks some tests. Fix them.
Signed-off-by: M
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 | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index ee7dfba..dafa4b7 100644
--- a/block.c
Tests 071 and 081 test giving references in blockdev-add. It is not
necessary to create a BlockBackend here, so omit it.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/qemu-iotests/071 | 50 ++
tests/qemu-iotests/071.out | 12 +++--
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
---
bl
bdrv_is_inserted() should be invoked recursively on the children of
quorum.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/quorum.c | 16
1 file changed, 16 insertions(+)
diff --git a/block/quorum.c b/block/quorum.c
index 437b122..7a75cea 100644
--- a/block/quorum.
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
Block
When preparing a blockdev-backup transaction, the BlockBackend should be
used because there may be no medium associated to the BB (which would
make bdrv_find() fail, whereas blk_by_name() does not).
This does not make a real difference because blockdev-backup will fail
without a medium anyway; how
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 | 26 ++
include/block/block_int.h
Do not use "rudimentary" BDSs for empty drives any longer (for
freshly created drives).
With this change, bdrv_close_all() has no effect on empty drives (whose
media were not changed) any longer. This breaks some test outputs, fix
them.
After a follow-up patch, empty drives will generally use a N
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
---
block.c | 7 ---
block/block-backend.c | 7 +--
include/block
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
Reviewed-by: Eric Blake
---
blockdev.c | 201 +
This function associates the given BlockDriverState with the given
BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/block-backend.c | 16
include/sysemu/block-backend.h | 1 +
2 files changed, 17 insertions(+)
diff --git a/block/block-backend.
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 other
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
---
hmp.c | 27 +++-
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
Signed-off-by: Max Reitz
---
blockdev.c | 25 +
qapi/block-core.json | 15 +++
qmp-commands.hx | 45 +
3 files changed, 85 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index eef8944..2544c6f 1006
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 should
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 -
block/backup
This patch allows specifying the interface to be used for the drive, and
makes specifying a path optional (if the path is None, the "file" option
will be omitted, thus creating an empty drive).
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/qemu-iotests/iotests.py | 9 ++---
1 f
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
Reviewed-by: Er
Expose the new read-only-mode option of 'blockdev-change-medium' for the
'change' HMP command.
Signed-off-by: Max Reitz
---
hmp-commands.hx | 20 +---
hmp.c | 22 +-
2 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/hmp-commands.hx b/hm
Signed-off-by: Max Reitz
---
tests/qemu-iotests/118 | 653 +
tests/qemu-iotests/118.out | 5 +
tests/qemu-iotests/group | 1 +
3 files changed, 659 insertions(+)
create mode 100755 tests/qemu-iotests/118
create mode 100644 tests/qemu-iotests
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| 7 ---
inclu
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 +-
include/sysemu/block-backend.h | 1 +
2 fi
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
Reviewed-by: Eric Blake
---
blockdev.c |
On Mon, Feb 09, 2015 at 10:37:22AM -0500, Max Reitz wrote:
> On 2015-02-09 at 10:01, Stefan Hajnoczi wrote:
> >On Fri, Feb 06, 2015 at 04:06:17PM -0500, Max Reitz wrote:
> >>diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
> >>index 8e618b5..4e1996c 100644
> >>--- a/test
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
Reviewed-by: Eric Blake
---
blockdev.c | 43 ++
Implement 'change' on block devices by calling blockdev-open-tray,
blockdev-remove-medium, blockdev-insert-medium (a variation of that
which does not need a node-name) and blockdev-close-tray.
Signed-off-by: Max Reitz
---
blockdev.c | 185 +
On Fri, Feb 06, 2015 at 04:06:15PM -0500, Max Reitz wrote:
> Right now, bdrv_swap() on NBD BDSs results in a segmentation fault
> pretty much all of the time. This series fixes this.
>
> Note that this is not a common case, as bdrv_swap() is generally only
> performed on root BDSs (there are excep
Implement 'eject' by calling blockdev-open-tray and
blockdev-remove-medium.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
blockdev.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 819a3c1..d4f7b9b 100644
--- a/blockdev.c
+++ b
Signed-off-by: Max Reitz
---
blockdev.c | 22 ++
qapi/block-core.json | 16
qmp-commands.hx | 35 +++
3 files changed, 73 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index 7d06230..eef8944 100644
--- a/blo
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 | 5 ++
block/qap
Signed-off-by: Max Reitz
---
blockdev.c | 48
qapi/block-core.json | 23 +++
qmp-commands.hx | 39 +++
3 files changed, 110 insertions(+)
diff --git a/blockdev.c b/blockdev.c
i
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
---
block.c | 16
block/
On 02/09/2015 10:11 AM, Max Reitz wrote:
> 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 acce
On 02/09/2015 10:11 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").
>
> This results in the tray being reported as open if qemu has been started
> with the default floppy drive, w
I use raw image on gfs2 ... Filesystem is shared on 2 red hat cluster node
(centos 7).
Il 09/feb/2015 14:46 "Stefan Hajnoczi" ha scritto:
> On Mon, Feb 09, 2015 at 09:18:15AM +0800, Fam Zheng wrote:
> > On Fri, 02/06 11:23, Fam Zheng wrote:
> > > On Thu, 02/05 15:29, massimo buscato wrote:
> > >
On 02/09/2015 10:11 AM, Max Reitz wrote:
> 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
> ---
> block.c| 12 +++-
> block/block-backend.c
On 2015-02-09 at 13:17, Eric Blake wrote:
On 02/09/2015 10:11 AM, Max Reitz wrote:
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,
t
@lj-keus
if you turn off apparmor
sudo /etc/init.d/apparmor stop
sudo /etc/init.d/apparmor teardown
does that fix the issue for you?
(Please re-enable apparmor immediately after the test using
sudo /etc/init.d/apparmor start
sudo stop libvirt-bin
sudo start libvirt-bin
)
--
You received this
Currently, bdrv_close_all() force-closes all BDSs with a BlockBackend,
which can lead to data corruption (see the iotest added in the final
patch of this series) and is most certainly very ugly.
This series reworks bdrv_close_all() to notify all owners of a
BlockBackend that they should release th
This patch adds a test for ejecting the BlockBackend an NBD server is
connected to (the NBD server is supposed to stop).
Signed-off-by: Max Reitz
---
tests/qemu-iotests/096 | 89 ++
tests/qemu-iotests/096.out | 16 +
tests/qemu-iotests/grou
This function skips to the next BlockBackend for which blk_is_inserted()
is true.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/block-backend.c | 15 +++
include/sysemu/block-backend.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/block/block-backend.
_filter_nbd can be useful for other NBD tests, too, therefore it should
reside in common.filter, and it should support URLs of the "nbd://"
format and export names.
The NBD log lines ("/your/source/dir/nbd.c:function():line: error")
should not be converted to empty lines but removed altogether.
S
Every time a reference to a BlockBackend is taken, a notifier for
bdrv_close_all() has to be deposited so the reference holder can
relinquish its reference when bdrv_close_all() is called. That notifier
should be revoked on a bdrv_unref() call.
Add a Notifier * parameter to all the functions chang
We will need it in block/block-backend.c.
Signed-off-by: Max Reitz
---
block.c | 2 +-
include/block/block_int.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 8502957..3f3258c 100644
--- a/block.c
+++ b/block.c
@@ -1949,7 +1949,7
Redirecting qemu's stderr to stdout makes working with the stderr output
difficult due to the other file descriptor magic performed in
_launch_qemu ("ambiguous redirect").
There is no harm in leaving stderr on stderr, so do it.
Signed-off-by: Max Reitz
---
If someone has a better solution, espec
The only remaining user of the BDS close notifiers is NBD which uses
them to determine when a BDS tree is being ejected. This patch removes
the BDS-level close notifiers and adds a notifier list to the
BlockBackend structure that is invoked whenever a BDS is removed. While
it might make sense to ha
This adds a test for having multiple BlockBackends in one BDS tree. In
this case, there is one BB for the protocol BDS and one BB for the
format BDS in a simple two-BDS tree (with the protocol BDS and BB added
first).
When bdrv_close_all() is executed, no cached data from any BDS should be
lost; t
bdrv_unref() can lead to bdrv_close(), which in turn will result in
bdrv_drain_all(). This function will later be called blk_drain_all() and
iterate only over the BlockBackends for which blk_is_inserted() holds
true; therefore, bdrv_is_inserted() and thus quorum_is_inserted() will
probably be calle
There may be BlockBackends which are not returned by blk_by_name(), but
do exist and have a name. blk_name_taken() allows testing whether a
specific name is in use already, independent of whether the BlockBackend
with that name is accessible through blk_by_name().
Signed-off-by: Max Reitz
Reviewe
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/block-backend.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index 98f4af9..bcad1dc 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -167,12 +
These functions will be changed to iterate through the BDS trees as
defined by the BlockBackends instead of the list of root BDS, therefore
prepare moving their code to the BlockBackend level.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/block-backend.c | 10 ++
i
This adds a list of notifiers to be invoked on bdrv_close_all().
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block.c | 10 ++
include/block/block.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/block.c b/block.c
index 6ad80fe..143c7cc 100644
--- a/block
Move bdrv_drain_all(), bdrv_commit_all(), bdrv_flush_all() and
bdrv_invalidate_cache_all() to BB.
The only operation left is bdrv_close_all(), which cannot be moved to
the BB because it should not only close all BBs, but also all
monitor-owned BDSs.
Signed-off-by: Max Reitz
---
block.c
The monitor does hold references to some BlockBackends so it should have
a list of those BBs; blk_backends is a different list, as it contains
references to all BBs (after a follow-up patch, that is), and that
should not be changed because we do need such a list.
Signed-off-by: Max Reitz
---
blo
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
blockdev.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 75baf16..3dfb5a2 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2281,11 +2281,7 @@ int do_drive_del(Monitor *mon, const QDict *qdic
This function first removed the BlockBackend from the blk_backends list
and cleared its name so it would no longer be found by blk_name(); since
blk_next() now iterates through monitor_block_backends (which the BB is
removed from in do_drive_del()), this is no longer necessary.
Second, bdrv_make_a
Every entry in this list should be a root BDS and as such either be
anchored to a BlockBackend or be owned by the monitor.
Signed-off-by: Max Reitz
---
block.c | 21 +
include/block/block.h | 1 -
include/block/block_int.h | 2 --
3 files changed, 1 in
There are no users of bdrv_close() left, except for one of bdrv_open()'s
failure paths, bdrv_close_all() and bdrv_delete(), and that is good.
Make bdrv_close() static so nobody makes the mistake of directly using
bdrv_close() again.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block.c
Replace bdrv_drain_all(), bdrv_commmit_all(), bdrv_flush_all(),
bdrv_invalidate_cache_all(), bdrv_next() and occurrences of bdrv_states
by their BlockBackend equivalents.
Signed-off-by: Max Reitz
---
block.c | 22 -
block/block-backend.c | 8 +++
block/qapi.c
101 - 200 of 357 matches
Mail list logo