ream.c| 8 ++--
> block/vmdk.c | 21 +-
> block/vvfat.c | 6 +--
> blockdev.c| 4 +-
> include/block/block_int.h | 12 --
> qemu-img.c| 4 +-
> 14 files changed, 115 insertions(+), 109 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
.c| 30 +--
> block/vvfat.c | 6 -
> include/block/block.h | 1 +
> 5 files changed, 37 insertions(+), 84 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
27;blockdev: Implement change with basic operations'
034/39:[] [--] 'block: Inquire tray state before tray-moved events'
035/39:[0002] [FC] 'qmp: Introduce blockdev-change-medium'
036/39:[] [--] 'hmp: Use blockdev-change-medium for change command'
037/39:
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
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
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
Reviewed-by: Eric
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
It has been deprecated as of 2.3, so we can now remove it.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
block/raw-posix.c| 222 ++-
qapi/block-core.json | 9 +--
2 files changed, 9 insertions(+), 222
ptions which are not parsed by bdrv_open() (like caching)
cannot be specified for these BB-less BDS trees yet. A future patch will
remove this limitation.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
Reviewed-by: Alberto Garcia
---
b
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
Reviewed-by: Kevin Wolf
---
block.c| 12
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
Reviewed-by: Kevin Wolf
---
block.c | 7
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
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
Reviewed-by: Alberto Garcia
---
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 Garcia
Reviewed-by: Kevin Wolf
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
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
block.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a
blk_is_inserted()) always returns false
for BDS with drv set to NULL, blk_dev_change_media_cb() should therefore
be called before drv is set to NULL.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
block.c | 8
1 file changed, 4 insertions
If there is no BDS tree attached to a BlockBackend, functions that can
do so should fall back to the BlockBackendRootState structure.
Signed-off-by: Max Reitz
---
block/block-backend.c | 28
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/block/block
culate the volume usage by
(wr_highest_offset + 512) / volume_size, after this patch they will just
assume the volume to be full slightly earlier than before.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
block/accounting.c
patch makes blk_get_aio_context() fall back to the main loop
context if the BDS pointer is NULL and implements
AIOCBInfo::get_aio_context() (blk_aiocb_get_aio_context()) which invokes
blk_get_aio_context().
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Review
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
---
block/block-backend.c | 40
include/block/block_int.h | 10
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
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
Reviewed-by: Kevin Wolf
---
hw/usb/dev-storage.c | 30 --
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git
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
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
hw/block/fdc.c | 20
tests/fdc
same
BlockBackend as the guest uses should fail. If the BDS tree is supposed
to be usable even after ejecting it from the guest, a different
BlockBackend must be used.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/block-backend.c | 55 +
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
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
---
block
This function associates the given BlockDriverState with the given
BlockBackend.
Signed-off-by: Max Reitz
---
block/block-backend.c | 11 +++
include/sysemu/block-backend.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c
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
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
---
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
index a4ce1df
should be sent whenever the status
changed).
Checking @load is now superfluous; it was necessary because it was
possible to change a medium without having explicitly opened the tray
and closed it again (or it might have been possible, at least). This is
no longer possible, though.
Signed-off-by: Max
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 b90b1d6..a4ce1df 100644
--- a
Implement 'eject' by calling blockdev-open-tray and
blockdev-remove-medium.
Signed-off-by: Max Reitz
---
blockdev.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 706e7e1..ff3b353 100644
--- a/blockdev.c
+++ b/blockdev.c
@
pointer, respectively, instead of a ThrottleGroup pointer.
Functionally, they are equivalent, but since ThrottleGroup is not meant
to be used outside of block/throttle-groups.c, ThrottleState is easier
to handle.
Signed-off-by: Max Reitz
---
block/throttle-groups.c | 19
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
---
block.c| 125 -
block/backup.c | 17
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
---
block/block-backend.c | 12
include/sysemu/block-backend.h | 1 +
2 files changed, 13 insertions
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
---
blockd
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: Alberto Garcia
---
blockdev.c | 209
find it useful to be able to therefore change
the read-only status of a block device when changing the medium.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
blockdev.c | 25 -
hmp.c| 2 +-
qapi/block-core.json | 24
Signed-off-by: Max Reitz
---
blockdev.c | 49 +
qapi/block-core.json | 23 +++
qmp-commands.hx | 39 +++
3 files changed, 111 insertions(+)
diff --git a/blockdev.c b/blockdev.c
Expose the new read-only-mode option of 'blockdev-change-medium' for the
'change' HMP command.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
hmp-commands.hx | 20 +---
hmp.c | 22 +-
2 files changed, 38 insertions(+),
fore the new image is created.
>
> Signed-off-by: Alberto Garcia
> ---
> blockdev.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
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 Bl
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 100755 tests/qemu-iotests/118
create mode
n is shared.
>
> Signed-off-by: Alberto Garcia
> Cc: Eric Blake
> Reviewed-by: Max Reitz
> ---
> blockdev.c | 165
> ---
> qapi-schema.json | 2 +
> qapi/block-core.json | 28 +
> qmp-commands.hx
On 13.10.2015 17:37, Kevin Wolf wrote:
> Am 12.10.2015 um 22:00 hat Max Reitz geschrieben:
>> 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 immediate
On 14.10.2015 15:27, Kevin Wolf wrote:
> Am 12.10.2015 um 22:00 hat Max Reitz geschrieben:
>> 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, n
On 14.10.2015 17:12, Kevin Wolf wrote:
> Am 12.10.2015 um 22:00 hat Max Reitz geschrieben:
>> 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 differen
y
> ---
> block/block-backend.c | 2 +-
> block/mirror.c | 2 +-
> block/write-threshold.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
On 14.10.2015 19:29, Max Reitz wrote:
> On 14.10.2015 15:16, Jeff Cody wrote:
>> This is a precursor to making bdrv_find_node() static, and internal
>> to block.c
>>
>> To find a BlockDriverState interface, it can be done via blk_by_name(),
>> bdrv_find_node(),
.c | 30 +++---
> include/block/block.h | 1 -
> 2 files changed, 15 insertions(+), 16 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
On 14.10.2015 15:16, Jeff Cody wrote:
> To find a BlockDriverState interface, it can be done via blk_by_name(),
> bdrv_find_node(), and bdrv_lookup_bs(). The latter can take the place
> of the other two, in the instances where we are only concerned with the
> BlockDriverState.
>
> In much of the
On 15.10.2015 13:29, Kevin Wolf wrote:
> Am 12.10.2015 um 22:00 hat Max Reitz geschrieben:
>> 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 specifyi
On 13.10.2015 15:48, Alberto Garcia wrote:
> This is the companion to 'blockdev-add'. It allows deleting a
> BlockBackend with its associated BlockDriverState tree, or a
> BlockDriverState that is not attached to any backend.
>
> In either case, the command fails if the reference count is greater
include/sysemu/block-backend.h | 1 +
> 2 files changed, 6 insertions(+)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
On 13.10.2015 15:48, Alberto Garcia wrote:
> This is the companion to 'blockdev-add'. It allows deleting a
> BlockBackend with its associated BlockDriverState tree, or a
> BlockDriverState that is not attached to any backend.
>
> In either case, the command fails if the reference count is greater
On 19.10.2015 16:18, Kevin Wolf wrote:
> Am 12.10.2015 um 22:00 hat Max Reitz geschrieben:
>> 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.
>>
>> Sign
On 19.10.2015 13:27, Kevin Wolf wrote:
> Am 13.10.2015 um 15:48 hat Alberto Garcia geschrieben:
>> 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
>>
On 21.04.2017 17:51, Stefan Hajnoczi wrote:
> On Sat, Apr 01, 2017 at 05:57:47PM +0200, Max Reitz wrote:
>> The issues of using C are well understood and nobody likes it. Let's use
>> a better language. C++ is not a better language, Rust is. Everybody
>> loves Rust. Rus
On 22.04.2017 00:34, Ping Li wrote:
> Currently, qemu-img 'amend' subcommand would fail to adjust image's backing
> file
> which was moved into different path.
> For example, parent.qcow2, the backing file of leaf.qcow2, first is at
> /home/a/,
> then moved into /home/b/. Originally this command,
On 21.04.2017 10:01, Kevin Wolf wrote:
> It is unused.
>
> Suggestetd-by: Fam Zheng
*Suggested
And, since it now would be rude not to, with that fixed:
Reviewed-by: Max Reitz
> Signed-off-by: Kevin Wolf
> ---
> tests/qemu-iotests/common.config | 18 --
>
On 21.04.2017 23:09, Eric Blake wrote:
> On 04/06/2017 11:40 AM, Eric Blake wrote:
>
>>> === Changes to the on-disk format ===
>>>
>>> The qcow2 on-disk format needs to change so each L2 entry has a bitmap
>>> indicating the allocation status of each subcluster. There are three
>>> possible states
On 24.04.2017 17:53, Eric Blake wrote:
> On 04/24/2017 10:47 AM, Eric Blake wrote:
>> On 04/24/2017 10:37 AM, Philippe Mathieu-Daudé wrote:
>>
> /*
> - * Returns true iff the first sector pointed to by 'buf' contains at
> least
> - * a non-NUL byte.
> + * Returns true if the fi
On 25.04.2017 03:50, 858585 jemmy wrote:
> On Mon, Apr 24, 2017 at 10:43 PM, Eric Blake wrote:
>> On 04/23/2017 09:33 AM, jemmy858...@gmail.com wrote:
>>> From: Lidong Chen
>>>
>>> is_allocated_sectors_min don't guarantee to contain the
>>> consecutive number of zero bytes. this patch fixes this
On 19.04.2017 17:49, Kevin Wolf wrote:
> Am 13.04.2017 um 22:33 hat Max Reitz geschrieben:
>> This series fixes some small issues I found in qemu-img's convert
>> subcommand while reviewing Dan's convert/dd series.
>>
>> Nothing serious at all, so all for
no object that supports any of the parameters we
query here, but this is neither something we should rely on nor does
this variable reuse make the code very nice to read.
Therefore, just use an own variable for the --object options.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
qemu
The create and convert subcommands have shorthands to set the
backing_file and, in the case of create, the backing_fmt options for the
new image. However, they have not been documented so far, which is
remedied by this patch.
Reported-by: Eric Blake
Signed-off-by: Max Reitz
---
qemu-img
FC] indicate (F)unctional and (C)ontextual differences, respectively
001/3:[] [-C] 'qemu-img/convert: Use @opts for one thing only'
002/3:[0007] [FC] 'qemu-img/convert: Move bs_n > 1 && -B check down'
003/3:[down] 'qemu-img: Document backing options'
ix this by moving the check.
(Also, change the error message because -B is not the only way to
specify the backing file, evidently.)
Signed-off-by: Max Reitz
---
qemu-img.c | 13 +++--
tests/qemu-iotests/122.out | 4 ++--
2 files changed, 9 insertions(+), 8 deletion
On 26.04.2017 16:18, Eric Blake wrote:
> On 04/26/2017 09:14 AM, Max Reitz wrote:
>> There is no reason for the qemu-nbd server used for tests not to accept
>> an arbitrary number of clients. In fact, test 181 will require it to
>> accept two clients at the same time (and thus
On 26.04.2017 16:03, Eric Blake wrote:
> On 04/26/2017 08:46 AM, Max Reitz wrote:
>> After storing the creation options for the new image into @opts, we
>> fetch some things for our own information, like the backing file name,
>> or whether to use encryption or preallocati
for all of our current and future tests.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/common.rc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 7d4781d4ad..31b888d4e9 100644
--- a/tests/qemu-iotests
insertion(+), 1 deletion(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
On 24.04.2017 11:16, Daniel P. Berrange wrote:
> The '--image-opts' flags indicates whether the source filename
> includes options. The target filename has to remain in the
> plain filename format though, since it needs to be passed to
> bdrv_create(). When using --skip-create though, it would be
}
> if (!out_blk) {> ret = -1;
With the spelling fixed as pointed out by Fam, and with
s/out_blk/s.target/ in this hunk:
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
On 21.04.2017 11:57, jemmy858...@gmail.com wrote:
> From: Lidong Chen
>
> when the buffer is zero, blk_co_pwrite_zeroes is more effectively than
s/when/When/, s/effectively/effective/
> blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. this patch can reduces
s/this/This/, s/reduces/reduce/
> the
On 07.04.2017 13:34, Vladimir Sementsov-Ogievskiy wrote:
> Do not do extra call to _get_block_status()
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
>
> Also, I'm not sure about last line:
> s->status = s->target_has_backing ? BLK_BACKING_FILE : BLK_DATA;
>
> (which is equal to old code
On 20.04.2017 01:06, John Snow wrote:
>
>
> On 04/07/2017 07:34 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Do not do extra call to _get_block_status()
>>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy
>> ---
>>
>> Also, I'm not sure about last line:
>> s->status = s->target_has_backing ? BLK_BAC
On 28.04.2017 11:38, Kevin Wolf wrote:
> Am 27.04.2017 um 17:36 hat Eric Blake geschrieben:
>> On 04/26/2017 08:46 AM, Max Reitz wrote:
>>> I think originally the idea was to remove the individual special case
>>> options in the long term in favour of the uniform -o
On 27.04.2017 04:58, jemmy858...@gmail.com wrote:
> From: Lidong Chen
>
> When the buffer is zero, blk_co_pwrite_zeroes is more effective than
> blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. This patch can reduce
> the time for converting qcow2 images with lots of zero data.
>
> Signed-off-by:
On 08.02.2017 00:57, Max Reitz wrote:
> Currently we only print progress information on retrieval of SIGUSR1.
> Some systems have a dedicated SIGINFO for this, however, so it should be
> handled appropriately if it is available.
>
> Buglink: https://bugs.launchpad.net/qemu/+bug/1
util/qemu-progress.c is currently unmaintained. The only user of its
functionality is qemu-img, so it effectively is part of the block layer.
Suggested-by: Fam Zheng
Signed-off-by: Max Reitz
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index
y
> table is the intended semantics, simplify the rest of the text
> to get rid of the confusion.
>
> Suggested-by: Max Reitz
> Signed-off-by: Eric Blake
>
> ---
> v10: new patch
> ---
> include/block/block.h | 13 +++--
> 1 file changed, 7 insertio
On 27.04.2017 03:46, Eric Blake wrote:
> We were throwing away the preallocation information associated with
> zero clusters. But we should be matching the well-defined semantics
> in bdrv_get_block_status(), where (BDRV_BLOCK_ZERO |
> BDRV_BLOCK_OFFSET_VALID) informs the user which offset is rese
On 27.04.2017 03:46, Eric Blake wrote:
> From: Max Reitz
>
> Instead of just freeing preallocated zero clusters and completely
> allocating them from scratch, reuse them.
>
> We cannot do this in handle_copied(), however, since this is a COW
> operation. Therefore, we have
gt; +continue;
> +}
> +
> qcow2_cache_entry_mark_dirty(bs, s->l2_table_cache, l2_table);
> -if (old_offset & QCOW_OFLAG_COMPRESSED || flags &
> BDRV_REQ_MAY_UNMAP) {
> +if (old_offset & QCOW_OFLAG_COMPRESSED || unm
On 27.04.2017 03:46, Eric Blake wrote:
> No tests were covering write zeroes with unmap. Additionally,
> I needed to prove that my previous patches for correct status
> reporting and write zeroes optimizations actually had an impact.
>
> The test works for cluster_size between 8k and 2M (for smal
-
> 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
V_SECTOR_SIZE;
> }
> +if (!QEMU_IS_ALIGNED(bytes, BDRV_SECTOR_SIZE)) {
> +printf("bytes %" PRId64 " is not sector aligned\n",
This isn't real English. :-)
With that fixed (somehow, you know better than me how to):
Reviewed-by: Max Reitz
> + bytes);
> +return 0;
> +}
> +nb_sectors = bytes >> BDRV_SECTOR_BITS;
>
> remaining = nb_sectors;
> sum_alloc = 0;
signature.asc
Description: OpenPGP digital signature
st 179
> v9: new patch
> ---
> qemu-io-cmds.c | 5 ++---
> tests/qemu-iotests/102.out | 4 ++--
> tests/qemu-iotests/146.out | 30 +++---
> tests/qemu-iotests/179.out | 22 +++---
> 4 files changed, 30 insertions(+), 31
On 28.04.2017 21:59, Eric Blake wrote:
> On 04/28/2017 02:46 PM, Max Reitz wrote:
>> On 27.04.2017 03:46, Eric Blake wrote:
>>> For the 'alloc' command, accepting an offset in bytes but a length
>>> in sectors, and reporting output in sectors, is confusing. D
On 28.04.2017 22:36, Eric Blake wrote:
> On 04/28/2017 03:09 PM, Max Reitz wrote:
>> On 28.04.2017 21:59, Eric Blake wrote:
>>> On 04/28/2017 02:46 PM, Max Reitz wrote:
>>>> On 27.04.2017 03:46, Eric Blake wrote:
>>>>> For the 'alloc' comm
On 27.04.2017 03:46, Eric Blake wrote:
> We've already improved discards to operate efficiently on the tail
> of an unaligned qcow2 image; it's time to make a similar improvement
> to write zeroes. The special case is only valid at the tail
> cluster of a file, where we must recognize that any sec
v6: avoid assertion on non-cluster-aligned image, use s->cluster_sectors
> to avoid a shift, drop R-b
> v5: no change
> v4: new patch
> ---
> block/qcow2-cluster.c | 15 +++
> 1 file changed, 11 insertions(+), 4 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
/qcow2.c
[...]
> @@ -2858,18 +2857,16 @@ static int qcow2_make_empty(BlockDriverState *bs)
>
> /* This fallback code simply discards every active cluster; this is slow,
> * but works in all cases */
> -for (start_sector = 0; start_sector < bs->total_sectors;
> -
used by humans, and I as a human don't
like it very much if my programs are overly technical and cold to me. "X
is an invalid value for 'Y'" is very technical. "X is wrong for Y" or "X
Y does not work" sounds more familiar and nicer. I like my p
ern | 2 +-
> 3 files changed, 23 insertions(+), 17 deletions(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
| 11 ++-
> tests/qemu-iotests/102.out | 4 ++--
> tests/qemu-iotests/146.out | 30 +++---
> 3 files changed, 23 insertions(+), 22 deletions(-)
Reviwed-by: Max Reitz
> diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
> index 1e0ebb4..4b2278f 100644
>
On 29.04.2017 21:14, Eric Blake wrote:
> Rather than store into a local variable, then copy to the struct
> if the value is valid, then reporting errors otherwise, it is
> simpler to just store into the struct and report errors if the
> value is invalid. This however requires that the struct store
On 03.05.2017 20:59, Max Reitz wrote:
> On 29.04.2017 21:14, Eric Blake wrote:
>> Rather than store into a local variable, then copy to the struct
>> if the value is valid, then reporting errors otherwise, it is
>> simpler to just store into the struct and report errors if th
On 29.04.2017 21:14, Eric Blake wrote:
> Available as a tag at:
> git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v11
>
> Prerequisites: Kevin's block pull request:
> https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg05799.html
>
> v10 was:
> https://lists.gnu.org/archive/html/qemu-
1601 - 1700 of 2776 matches
Mail list logo