On Thu, Oct 22, 2015 at 08:37:19AM +0200, Peter Lieven wrote:
> Am 22.09.2015 um 08:13 schrieb Peter Lieven:
> >Am 25.06.2015 um 15:18 schrieb Stefan Hajnoczi:
> >>On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote:
> >>>upcoming libnfs versions will support logging debug messages. Add
>
Am 26.10.2015 um 11:45 schrieb Stefan Hajnoczi:
On Thu, Oct 22, 2015 at 08:37:19AM +0200, Peter Lieven wrote:
Am 22.09.2015 um 08:13 schrieb Peter Lieven:
Am 25.06.2015 um 15:18 schrieb Stefan Hajnoczi:
On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote:
upcoming libnfs versions
Drivers can have internal request sources that generate IO, like the
need_check_timer in QED. Since we want quiesced periods that contain
nested event loops in block layer, we need to have a way to disable such
event sources.
Block drivers must implement the "bdrv_drain" callback if it has any
Currently all drivers that support .bdrv_aio_ioctl also implement
.bdrv_ioctl redundantly. To track ioctl requests in block layer it is
easier if we unify the two paths, because we'll need to run it in a
coroutine, as required by tracked_request_begin. While we're at it, use
.bdrv_aio_ioctl plus
To minimize code duplication, epoll is hooked into aio-posix's
aio_poll() instead of rolling its own. This approach also has both
compile-time and run-time switchability.
1) When QEMU starts with a small number of fds in the event loop, ppoll
is used.
2) When QEMU starts with a big number of
On Tue, Oct 13, 2015 at 02:17:38PM +0200, Kevin Wolf wrote:
> Kevin Wolf (2):
> block: Allow bdrv_unref_child(bs, NULL)
> blkverify: Fix BDS leak in .bdrv_open error path
>
> block.c | 7 ++-
> block/blkverify.c | 3 +++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> --
On Mon, Oct 12, 2015 at 02:27:21PM +0200, Peter Lieven wrote:
> This series aims at avoiding a hanging main-loop if a vserver has a
> CDROM image mounted from a NFS share and that NFS share goes down.
> Typical situation is that users mount an CDROM ISO to install something
> and then forget to
On 23 October 2015 at 18:00, Kevin Wolf wrote:
> The following changes since commit 1e700f4c6cddaf29ce1d205f0f8e8b9255481930:
>
> Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-10-23-tag'
> into staging (2015-10-23 15:55:50 +0100)
>
> are available in the git
The two fields that will be used by ioctl handling code later are added
as union, because it's used exclusively by ioctl code which dosn't need
the four fields in the other struct of the union.
Signed-off-by: Fam Zheng
---
include/block/block.h | 16
1 file
iscsi_ioctl emulates SG_GET_VERSION_NUM and SG_GET_SCSI_ID. Now that
bdrv_ioctl() will be emulated with .bdrv_aio_ioctl, replicate the logic
into iscsi_aio_ioctl to make them consistent.
Signed-off-by: Fam Zheng
---
block/iscsi.c | 39 +--
1
Wen Congyang writes:
> On 10/21/2015 04:27 PM, Markus Armbruster wrote:
[...]
>> Can we phrase the operation differently? Instead of "insert between A
>> and B (silently replacing everything that is now between A and B)",
>> say one of
>>
>> 1a. Replace node A by A <-
Both bdrv_discard and bdrv_aio_discard will call into bdrv_co_discard,
so add tracked_request_begin/end calls around the loop.
Signed-off-by: Fam Zheng
---
block/io.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/block/io.c b/block/io.c
Previously bdrv_drain and bdrv_drain_all don't handle ioctl, flush and discard
requests (which are fundamentally the same as read and write requests that
change disk state). Forgetting such requests leaves us in risk of violating
the invariant that bdrv_drain() callers rely on - all asynchronous
Both bdrv_flush and bdrv_aio_flush eventually call bdrv_co_flush, add
tracked_request_begin and tracked_request_end pair in that function so
that all flush requests are now tracked.
Signed-off-by: Fam Zheng
---
block/io.c | 11 ---
1 file changed, 8 insertions(+), 3
We'll track more request types besides read and write, change the
boolean field to an enum.
Signed-off-by: Fam Zheng
---
block/io.c| 9 +
include/block/block_int.h | 10 +-
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git
On 10/26/2015 03:24 PM, Markus Armbruster wrote:
> Wen Congyang writes:
>
>> On 10/21/2015 04:27 PM, Markus Armbruster wrote:
> [...]
>>> Can we phrase the operation differently? Instead of "insert between A
>>> and B (silently replacing everything that is now between A
Now the callback is not used any more, drop the field along with all
implementations in block drivers, which are iscsi and raw.
Signed-off-by: Fam Zheng
---
block/iscsi.c | 33 -
block/raw-posix.c | 9 -
The "need_check_timer" is used to clear the "NEED_CHECK" flag in the
image header after a grace period once metadata update has finished. In
compliance to the bdrv_drain semantics we should make sure it remains
deleted once .bdrv_drain is called.
We cannot reuse qed_need_check_timer_cb because
This is the place to initialize platform specific bits of AioContext.
Signed-off-by: Fam Zheng
---
aio-posix.c | 4
aio-win32.c | 4
async.c | 13 +++--
include/block/aio.h | 8
4 files changed, 27 insertions(+), 2
v3: Remove the redundant check in aio_epoll_try_enable. [Stefan]
v2: Merge aio-epoll.c into aio-posix.c. [Paolo]
Capture some benchmark data in commit log.
This series adds the ability to use epoll in aio_poll() on Linux. It's switched
on in a dynamic way rather than static for two reasons:
cvtnum() returns int64_t: we should not be storing this
result inside of an int.
In a few cases, we need an extra sprinkling of error handling
where we expect to pass this number on towards a function that
expects something smaller than int64_t.
Reported-by: Max Reitz
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
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
On 26.10.2015 19:12, John Snow wrote:
> For more complex BDS trees that can be created under normal circumstances,
> we lose the ability to issue query commands because of our inability to
> re-construct the absolute filename.
>
> Instead, omit this field when it is a problem and present as much
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
---
blockdev.c | 23 +++
qapi/block-core.json | 16
qmp-commands.hx | 35 +++
3 files changed, 74 insertions(+)
diff --git
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
Signed-off-by: Max Reitz
---
tests/qemu-iotests/118 | 720 +
tests/qemu-iotests/118.out | 5 +
tests/qemu-iotests/group | 1 +
3 files changed, 726 insertions(+)
create mode 100755 tests/qemu-iotests/118
create mode
Now that the main rework part of this series is merged, these remaining
patches here implement atomic tray/medium operations and add the
read-only-mode parameter to change and blockdev-change-medium (which was
the original purpose of this series!).
Once again, I'd like to thank all the reviewers
Signed-off-by: Max Reitz
---
blockdev.c | 36
qapi/block-core.json | 32
qmp-commands.hx | 48
3 files changed, 116 insertions(+)
diff --git
Expose the new read-only-mode option of 'blockdev-change-medium' for the
'change' HMP command.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
---
hmp-commands.hx | 20 +---
hmp.c | 22 +-
2 files changed, 38
When inserting a BDS tree into a BB, we will need to add the root BDS to
this list. Since we will want to do that in the blockdev-insert-medium
implementation in blockdev.c, we will need access to it there.
This patch is not exactly elegant, but bdrv_states will be removed in
the future anyway
Signed-off-by: Max Reitz
---
blockdev.c | 51 +++
qapi/block-core.json | 16
qmp-commands.hx | 45 +
3 files changed, 112 insertions(+)
diff --git
In order to open a BDS which inherits a BB's root state,
blk_get_open_flags_from_root_state() is used to inquire the flags to be
passed to bdrv_open(), and blk_apply_root_state() is used to apply the
remaining state after the BDS has been opened.
Signed-off-by: Max Reitz
---
On 10/26/2015 05:18 PM, Max Reitz wrote:
> On 26.10.2015 19:12, John Snow wrote:
>> For more complex BDS trees that can be created under normal circumstances,
>> we lose the ability to issue query commands because of our inability to
>> re-construct the absolute filename.
>>
>> Instead, omit
Signed-off-by: John Snow
---
qemu-io-cmds.c | 58 +-
1 file changed, 37 insertions(+), 21 deletions(-)
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index e2477fc..92c6b87 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
Make sure there's not trailing garbage, e.g.
"64k-whatever-i-want-here"
Reported-by: Max Reitz
Signed-off-by: John Snow
---
qemu-io-cmds.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index
cvtnum() returns int64_t: we should not be storing this
result inside of an int.
In a few cases, we need an extra sprinkling of error handling
where we expect to pass this number on towards a function that
expects something smaller than int64_t.
Signed-off-by: John Snow
---
cvtnum returns an int64_t, not an int, so correct the lvalue types
wherever it is used. While we're at it, make the error messages more
meaningful and hopefully less confusing.
For convenience, this branch is
On 10/26/2015 04:06 PM, John Snow wrote:
> cvtnum() returns int64_t: we should not be storing this
> result inside of an int.
>
> In a few cases, we need an extra sprinkling of error handling
> where we expect to pass this number on towards a function that
> expects something smaller than
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 | 56
On 10/26/2015 06:54 PM, Eric Blake wrote:
> On 10/26/2015 04:06 PM, John Snow wrote:
>> Signed-off-by: John Snow
>> ---
>> qemu-io-cmds.c | 58
>> +-
>> 1 file changed, 37 insertions(+), 21 deletions(-)
>>
>> diff --git
Not that you can request a >2GiB transaction, but that's why checking
for it makes no sense anymore.
With the newer 'limit' parameter to prepare_buf, we no longer need a
static limit. The maximum limit is still 2GiB, but the limit parameter
is set to the current transaction size, which cannot
On 10/26/2015 04:44 PM, Eric Blake wrote:
> On 10/26/2015 04:06 PM, John Snow wrote:
>> Make sure there's not trailing garbage, e.g.
>> "64k-whatever-i-want-here"
>>
>> Reported-by: Max Reitz
>> Signed-off-by: John Snow
>> ---
>> qemu-io-cmds.c | 9 -
On 26.10.2015 22:34, John Snow wrote:
>
>
> On 10/26/2015 05:18 PM, Max Reitz wrote:
>> On 26.10.2015 19:12, John Snow wrote:
>>> For more complex BDS trees that can be created under normal circumstances,
>>> we lose the ability to issue query commands because of our inability to
>>>
On 10/16/2015 07:37 PM, Stefan Hajnoczi wrote:
> On Fri, Oct 16, 2015 at 10:22:05AM +0800, Wen Congyang wrote:
>> On 10/15/2015 10:55 PM, Stefan Hajnoczi wrote:
>>> On Thu, Oct 15, 2015 at 10:19:17AM +0800, Wen Congyang wrote:
On 10/14/2015 10:27 PM, Stefan Hajnoczi wrote:
> On Tue, Oct
On 10/26/2015 12:12 PM, John Snow wrote:
> For more complex BDS trees that can be created under normal circumstances,
> we lose the ability to issue query commands because of our inability to
> re-construct the absolute filename.
>
> Instead, omit this field when it is a problem and present as
Signed-off-by: Alberto Garcia
---
block.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
index e9f40dc..eb8158a 100644
--- a/block.c
+++ b/block.c
@@ -2683,12 +2683,12 @@ BlockDriverState *bdrv_lookup_bs(const char *device,
Am 19.10.2015 um 17:53 hat Max Reitz geschrieben:
> 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
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
The 'snapshot-node-name' parameter of blockdev-snapshot-sync allows
setting the node name of the image that is going to be created.
Before creating the image, external_snapshot_prepare() checks that the
name is not already being used. The check is however incomplete since
it only considers
Signed-off-by: Alberto Garcia
Reviewed-by: Max Reitz
Reviewed-by: Jeff Cody
---
tests/qemu-iotests/085 | 102 ++---
tests/qemu-iotests/085.out | 34 ++-
2 files changed, 128
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
This series adds a new 'blockdev-snapshot' command, that is similar to
'blockdev-snapshot-sync' but takes references to two existing block
devices.
This finally applies (and works) cleanly on master. Max's patch to
allow creating BlockDriverState trees without a BlockBackend is now
available as
Am 19.10.2015 um 17:53 hat Max Reitz geschrieben:
> Signed-off-by: Max Reitz
> Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
Am 26.10.2015 um 15:46 hat Alberto Garcia geschrieben:
> Signed-off-by: Alberto Garcia
Thanks, applied to the block branch.
Kevin
Am 19.10.2015 um 20:49 hat Max Reitz geschrieben:
> In places which directly pass a filename to the OS, we should not use
> the filename field at all but exact_filename instead (although the
> former currently equals the latter if that is set).
>
> In raw_open_common(), we do not need to access
Am 19.10.2015 um 20:49 hat Max Reitz geschrieben:
> Replaces bs->filename by the result of bdrv_filename() in the
> qemu-img map subcommand. Since that value is queried relatively often,
> however, it should be cached.
>
> Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Am 19.10.2015 um 20:49 hat Max Reitz geschrieben:
> Split the part which actually refreshes the BlockDriverState.filename
> field off of bdrv_refresh_filename() into a more generic function
> bdrv_filename(), which first calls bdrv_refresh_filename() and then
> stores a qemu-usable filename in the
For more complex BDS trees that can be created under normal circumstances,
we lose the ability to issue query commands because of our inability to
re-construct the absolute filename.
Instead, omit this field when it is a problem and present as much information
as we can.
This will change the
59 matches
Mail list logo