On 28.01.2016 04:33, Fam Zheng wrote:
> On Wed, 01/27 18:59, Max Reitz wrote:
>> Signed-off-by: Max Reitz
>> ---
>> blockdev.c | 26 ++
>> include/block/block_int.h | 4
>> stubs/Makefile.objs
Similar to the previous patch, it's nice to have all functions
in the tree that involve a visitor and a name for conversion to
or from QAPI to consistently stick the 'name' parameter next
to the Visitor parameter.
Done by manually changing include/qom/object.h and qom/object.c,
then running this
On 28.01.2016 04:26, Fam Zheng wrote:
> On Wed, 01/27 18:59, Max Reitz wrote:
>> The NBD code uses the BDS close notifier to determine when a medium is
>> ejected. However, now it should use the BB's BDS removal notifier for
>> that instead of the BDS's close notifier.
>>
>> Signed-off-by: Max
On 28.01.2016 05:17, Fam Zheng wrote:
> On Wed, 01/27 18:59, Max Reitz wrote:
>> This patch rewrites bdrv_close_all(): Until now, all root BDSs have been
>> force-closed. This is bad because it can lead to cached data not being
>> flushed to disk.
>>
>> Instead, try to make all reference holders
On 29.01.2016 13:41, Kevin Wolf wrote:
> Am 27.01.2016 um 18:59 hat Max Reitz geschrieben:
>> Make use of the BDS-BB removal and insertion notifiers to remove or set
>> up, respectively, virtio-scsi's op blockers.
>>
>> Signed-off-by: Max Reitz
>> ---
>> hw/scsi/virtio-scsi.c
Am 29.01.2016 um 14:44 hat Max Reitz geschrieben:
> On 28.01.2016 04:33, Fam Zheng wrote:
> > On Wed, 01/27 18:59, Max Reitz wrote:
> >> Signed-off-by: Max Reitz
> >> ---
> >> blockdev.c | 26 ++
> >>
JSON uses "name":value, but many of our visitor interfaces were
called with visit_type_FOO(v, , name, errp). This can be
a bit confusing to have to mentally swap the parameter order to
match JSON order. It's particularly bad for visit_start_struct(),
where the 'name' parameter is smack in the
On Thu, Jan 28, 2016 at 10:53:43PM +0100, Lluís Vilanova wrote:
> Replaces all direct uses of 'error_setg(_fatal/abort)' with
> 'error_report_fatal/abort'. Also reimplements the former on top of the
> latter.
>
> Signed-off-by: Lluís Vilanova
I think the spapr parts of this
* Wen Congyang (we...@cn.fujitsu.com) wrote:
> On 01/29/2016 06:07 PM, Dr. David Alan Gilbert wrote:
> > * Wen Congyang (we...@cn.fujitsu.com) wrote:
> >> On 01/27/2016 07:03 PM, Dr. David Alan Gilbert wrote:
> >>> Hi,
> >>> I've got a block error if I kill the secondary.
> >>>
> >>> Start both
On 01/29/2016 06:07 PM, Dr. David Alan Gilbert wrote:
> * Wen Congyang (we...@cn.fujitsu.com) wrote:
>> On 01/27/2016 07:03 PM, Dr. David Alan Gilbert wrote:
>>> Hi,
>>> I've got a block error if I kill the secondary.
>>>
>>> Start both primary & secondary
>>> kill -9 secondary qemu
>>>
* Wen Congyang (we...@cn.fujitsu.com) wrote:
> On 01/27/2016 07:03 PM, Dr. David Alan Gilbert wrote:
> > Hi,
> > I've got a block error if I kill the secondary.
> >
> > Start both primary & secondary
> > kill -9 secondary qemu
> > x_colo_lost_heartbeat on primary
> >
> > The guest sees a block
bdrv_delete() is not very happy about deleting BlockDriverStates with
dirty bitmaps still attached to them. In the past, we got around that
very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and
bdrv_close() simply ignoring that condition. We should fix that by
releasing all named
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Reviewed-by: Fam Zheng
---
block/block-backend.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Reviewed-by: Fam Zheng
---
blockdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index 1044a6a..09d4621 100644
--- a/blockdev.c
+++
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
It is unused now, so we can remove it.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
Reviewed-by: Kevin Wolf
---
block.c| 8
block/block-backend.c | 7 ---
include/block/block.h | 1
Suggested-by: Paolo Bonzini
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
---
tests/qemu-iotests/141 | 186 +
tests/qemu-iotests/141.out | 59 ++
tests/qemu-iotests/group
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 instead eject the BDS trees from
all BlockBackends and then
Put the code for setting up and removing op blockers into an own
function, respectively. Then, we can invoke those functions whenever a
BDS is removed from an virtio-blk BB or inserted into it.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
Reviewed-by:
bdrv_close() no longer signifies ejection of a medium, this is now done
by removing the BDS from the BB. Therefore, we want to have a notifier
for that in the BB instead of a close notifier in the BDS. The former is
added now, the latter is removed later.
Symmetrically, another notifier list is
The NBD code uses the BDS close notifier to determine when a medium is
ejected. However, now it should use the BB's BDS removal notifier for
that instead of the BDS's close notifier.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
Reviewed-by: Kevin Wolf
We need this list so that bdrv_close_all() can keep track of which BDSs
are still open after having removed the BDSs from all of the BBs and
having released all monitor BDS references.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Reviewed-by: Fam Zheng
When bdrv_close_all() is called, instead of force-closing all root
BlockDriverStates, it is better to just drop the reference from all
BlockBackends and let them be closed automatically. This prevents BDS
from getting closed that are still referenced by other BDS, which may
result in loss of
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
Reviewed-by: Fam Zheng
Reviewed-by: Kevin Wolf
---
tests/qemu-iotests/140 | 92
Make use of the BDS-BB removal and insertion notifiers to remove or set
up, respectively, virtio-scsi's op blockers.
Signed-off-by: Max Reitz
---
hw/scsi/virtio-scsi.c | 55 +
include/hw/virtio/virtio-scsi.h | 10
2
This patch rewrites bdrv_close_all(): Until now, all root BDSs have been
force-closed. This is bad because it can lead to cached data not being
flushed to disk.
Instead, try to make all reference holders relinquish their reference
voluntarily:
1. All BlockBackend users are handled by making all
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;
From: Max Reitz
As a side effect, we can now make x-blockdev-del's check whether a BDS
is actually owned by the monitor explicit.
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
blockdev.c | 28
From: Max Reitz
The NBD code uses the BDS close notifier to determine when a medium is
ejected. However, now it should use the BB's BDS removal notifier for
that instead of the BDS's close notifier.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
From: Fam Zheng
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-6-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/iscsi.c
From: Fam Zheng
Now all drivers should return a correct "file", we can make use of it,
even with the recursion into backing chain above.
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
From: Fam Zheng
Now that all drivers return the right "file" pointer, we can use it.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
Message-id: 1453780743-16806-14-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
From: Fam Zheng
"offset" is the offset of cluster and sector_num doesn't necessarily
refer to the start of it, it should add index_in_cluster.
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-12-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
From: Fam Zheng
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-7-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
From: Fam Zheng
The "flags" bit mask is expanded to two booleans, "data" and "zero";
"bs" is replaced with "filename" string.
Refactor the merge conditions in img_map() into entry_mergeable().
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
From: Fam Zheng
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-5-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
Signed-off-by: Max Reitz
---
block/raw-posix.c | 1 +
block/raw_bsd.c | 1 +
2 files
From: Max Reitz
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
From: Max Reitz
Image formats used in test 118 need to support image creation.
Reported-by: Markus Armbruster
Signed-off-by: Max Reitz
Reviewed-by: Markus Armbruster
Signed-off-by: Kevin Wolf
---
From: Max Reitz
Trying to connect to a nonexistent NBD export should not crash the
server.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/143 | 73
From: Max Reitz
This function should support URLs of the "nbd://" format (without
swallowing the export name), and for "nbd:///" URLs it should replace
"?socket=$TEST_DIR" by "?socket=TEST_DIR" because putting the Unix
socket files into the test directory makes sense.
From: Max Reitz
'change' and related operations did not work when used on guest devices
featuring removable media but no actual tray, because
blk_dev_is_tray_open() always returned false for them and the
blockdev-{insert,remove}-medium commands required it to return true.
Fix
From: Max Reitz
bdrv_delete() is not very happy about deleting BlockDriverStates with
dirty bitmaps still attached to them. In the past, we got around that
very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and
bdrv_close() simply ignoring that condition. We
From: Max Reitz
In order to be able to move _filter_nbd to common.filter in the next
patch, its coding style needs to be adapted to that of common.filter.
That means, we have to convert tabs to four spaces, adjust the alignment
of the last line (done with spaces already,
From: Max Reitz
_filter_nbd can be useful for other NBD tests, too, therefore it should
reside in common.filter.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/083
From: Max Reitz
Put the code for setting up and removing op blockers into an own
function, respectively. Then, we can invoke those functions whenever a
BDS is removed from an virtio-blk BB or inserted into it.
Signed-off-by: Max Reitz
Reviewed-by: Fam
From: Max Reitz
We need this list so that bdrv_close_all() can keep track of which BDSs
are still open after having removed the BDSs from all of the BBs and
having released all monitor BDS references.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
From: Max Reitz
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").
Add an option which specifies whether stderr should be redirected to
stdout or not
From: Max Reitz
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Reviewed-by: Fam Zheng
Signed-off-by: Kevin Wolf
---
block/block-backend.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
From: Max Reitz
Make use of the BDS-BB removal and insertion notifiers to remove or set
up, respectively, virtio-scsi's op blockers.
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
hw/scsi/virtio-scsi.c | 55
From: Fam Zheng
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-17-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
Signed-off-by: Max Reitz
---
tests/qemu-iotests/059 | 10 ++
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-10-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/vdi.c | 1 +
1 file changed, 1 insertion(+)
diff
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-11-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/vpc.c | 2 ++
1 file changed, 2 insertions(+)
From: Max Reitz
Suggested-by: Paolo Bonzini
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/141 | 186
From: Max Reitz
This patch rewrites bdrv_close_all(): Until now, all root BDSs have been
force-closed. This is bad because it can lead to cached data not being
flushed to disk.
Instead, try to make all reference holders relinquish their reference
voluntarily:
1. All
On 29 January 2016 at 17:37, Kevin Wolf wrote:
> The following changes since commit 047e363b05679724d6b784c6ec6310697fe48ba0:
>
> Merge remote-tracking branch
> 'remotes/pmaydell/tags/pull-softfloat-20160122' into staging (2016-01-22
> 15:19:21 +)
>
> are available in
From: Fam Zheng
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-13-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
Signed-off-by: Max Reitz
---
block/vmdk.c | 4 ++--
1 file changed, 2 insertions(+), 2
From: Max Reitz
It is unused now, so we can remove it.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
block.c| 8
From: Max Reitz
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Reviewed-by: Fam Zheng
Signed-off-by: Kevin Wolf
---
blockdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Fam Zheng
Unused since 94db6d2d3.
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Kevin Wolf
---
blockjob.c | 8
1 file changed, 8 deletions(-)
diff --git a/blockjob.c b/blockjob.c
From: Max Reitz
When bdrv_close_all() is called, instead of force-closing all root
BlockDriverStates, it is better to just drop the reference from all
BlockBackends and let them be closed automatically. This prevents BDS
from getting closed that are still referenced by other
From: Fam Zheng
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-3-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/qcow.c
From: Max Reitz
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
Reviewed-by: Fam Zheng
Reviewed-by: Kevin Wolf
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-4-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/qcow2.c | 1 +
1 file changed, 1 insertion(+)
diff
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-9-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/sheepdog.c | 3 +++
1 file changed, 3 insertions(+)
From: Max Reitz
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
From: Fam Zheng
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-8-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/qed.c |
From: Paolo Bonzini
NFS calls aio_poll inside bdrv_get_allocated_size. This requires
acquiring the AioContext.
Signed-off-by: Paolo Bonzini
Message-id: 1450867706-19860-1-git-send-email-pbonz...@redhat.com
Reviewed-by: Fam Zheng
Accidentally, I removed a "feature" where empty drives had geometry
values applied to them, which allows seek on empty drives to work
"by accident," as QEMU actually tries to disallow that.
Seeks on empty drives should work, though, but the easiest thing is to
restore the misfeature where empty
Definitely don't try to unmap a garbage address.
Reported-by: Zuozhi fzz
Signed-off-by: John Snow
---
hw/ide/ahci.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 17f1cbd..cdc9299 100644
---
Currently, we let ahci_cond_start_engines reject weird configurations
where either the DMA (CLB) or FIS engines are said to be started, but
their matching on/off control bit is toggled off.
There should be no way to achieve this, since any time you toggle the
control bit off, the status bit
As reported by Zuozhi fzz , there's a problem
you can expose in AHCI by rewriting the command list buffer and/or FIS
receive buffer addresses, then re-starting the AHCI device before bringing
it to a stop. Depending on the success of the remap operations, you may
be
Instead of relying on ahci_cond_start_engines to maintain the
engine status indicators itself, have the lower-layer CLB and FIS mapper
helpers do it themselves.
This makes the cond_start routine slightly nicer to read, and makes sure
that the status indicators will always be correct.
On 01/29/2016 12:49 PM, Max Reitz wrote:
> 'change' and related operations did not work when used on guest devices
> featuring removable media but no actual tray, because
> blk_dev_is_tray_open() always returned false for them and the
> blockdev-{insert,remove}-medium commands required it to
'change' and related operations did not work when used on guest devices
featuring removable media but no actual tray, because
blk_dev_is_tray_open() always returned false for them and the
blockdev-{insert,remove}-medium commands required it to return true.
Fix this by making
On Thu, Jan 28, 2016 at 08:25:18AM -0700, Eric Blake wrote:
> > Sadly what I need is block-stream to an intermediate layer (as I
> > want to merge in the other direction); I don't think that proposal
> > was ever implemented.
> >
> >
On 01/29/2016 12:49 PM, Max Reitz wrote:
> This reverts the changes that commit
> 2e1280e8ff95b3145bc6262accc9d447718e5318 applied to hw/block/fdc.c;
> also, an additional case of drv->media_inserted use has crept in since,
> which is replaced by a call to blk_is_inserted().
>
> That commit
This reverts the changes that commit
2e1280e8ff95b3145bc6262accc9d447718e5318 applied to hw/block/fdc.c;
also, an additional case of drv->media_inserted use has crept in since,
which is replaced by a call to blk_is_inserted().
That commit changed tests/fdc-test.c, too, because after it, one less
This is a rebase of v3
(http://lists.nongnu.org/archive/html/qemu-devel/2016-01/msg04471.html)
on master made necessary because of a merge conflict in patch 3.
git-backport-diff against v3:
Key:
[] : patches are identical
[] : number of functional differences between upstream/downstream
Pull out the check whether a block device has a tray from
blk_dev_is_tray_open() into its own function so both attributes (whether
there is a tray vs. whether that tray is open) can be queried
independently.
Cc: qemu-stable
Signed-off-by: Max Reitz
79 matches
Mail list logo