[PATCH v8 3/8] qdev-properties: blocksize: use same limits in code and description

2020-05-28 Thread Roman Kagan
Make it easier (more visible) to maintain the limits on the blocksize properties in sync with the respective description, by using macros both in the code and in the description. Signed-off-by: Roman Kagan Reviewed-by: Eric Blake --- hw/core/qdev-properties.c | 21 +++-- 1 file

Re: [PATCH v7 4/8] qdev-properties: add size32 property type

2020-05-28 Thread Roman Kagan
On Thu, May 28, 2020 at 04:45:19PM -0500, Eric Blake wrote: > On 5/28/20 4:39 PM, Roman Kagan wrote: > > Introduce size32 property type which handles size suffixes (k, m) just > > like size property, but is uint32_t rather than uint64_t. > > Does it handle 'g' as well?

[PATCH v7 6/8] block: make BlockConf size props 32bit and accept size suffixes

2020-05-28 Thread Roman Kagan
by scsi and virtio-blk devices as an uint16_t in units of logical blocks, introduce an additional check in blkconf_blocksizes to prevent its silent truncation. Signed-off-by: Roman Kagan --- v6 -> v7: - split out into separate patch [Eric] - avoid overflow in min_io_size check [Eric] include

[PATCH v7 7/8] qdev-properties: add getter for size32 and blocksize

2020-05-28 Thread Roman Kagan
Add getter for size32, and use it for blocksize, too. In its human-readable branch, it reports approximate size in human-readable units next to the exact byte value, like the getter for 64bit size does. Adjust the expected test output accordingly. Signed-off-by: Roman Kagan --- v6 ->

[PATCH v7 8/8] block: lift blocksize property limit to 2 MiB

2020-05-28 Thread Roman Kagan
Logical and physical block sizes in QEMU are limited to 32 KiB. This appears unnecessarily tight, and we've seen bigger block sizes handy at times. Lift the limitation up to 2 MiB which appears to be good enough for everybody, and matches the qcow2 cluster size limit. Signed-off-by: Roman Kagan

[PATCH v7 3/8] qdev-properties: blocksize: use same limits in code and description

2020-05-28 Thread Roman Kagan
Make it easier (more visible) to maintain the limits on the blocksize properties in sync with the respective description, by using macros both in the code and in the description. Signed-off-by: Roman Kagan Reviewed-by: Eric Blake --- v4 -> v5: - split out into separate patch [Philippe]

[PATCH v7 0/8] block: enhance handling of size-related BlockConf properties

2020-05-28 Thread Roman Kagan
cept size suffixes Roman Kagan (8): virtio-blk: store opt_io_size with correct size block: consolidate blocksize properties consistency checks qdev-properties: blocksize: use same limits in code and description qdev-properties: add size32 property type qdev-properties: make blocksize accept siz

[PATCH v7 2/8] block: consolidate blocksize properties consistency checks

2020-05-28 Thread Roman Kagan
, add corresponding consistency checks to blkconf_blocksizes, adjusting its signature to communicate possible error to the caller. Also remove the now redundant consistency checks from the specific devices. Signed-off-by: Roman Kagan Reviewed-by: Eric Blake Reviewed-by: Paul Durrant --- v5 ->

[PATCH v7 5/8] qdev-properties: make blocksize accept size suffixes

2020-05-28 Thread Roman Kagan
It appears convenient to be able to specify physical_block_size and logical_block_size using common size suffixes. Teach the blocksize property setter to interpret them. Also express the upper and lower limits in the respective units. Signed-off-by: Roman Kagan --- v6 -> v7: - split

[PATCH v7 4/8] qdev-properties: add size32 property type

2020-05-28 Thread Roman Kagan
property type in a followup commit). The getter for size32 is left out for a separate patch as its benefit is less obvious, and it affects test output; for now the regular uint32 getter is used. Signed-off-by: Roman Kagan --- v6 -> v7: - split out into separate patch [Eric] include/hw/q

[PATCH v7 1/8] virtio-blk: store opt_io_size with correct size

2020-05-28 Thread Roman Kagan
The width of opt_io_size in virtio_blk_config is 32bit. However, it's written with virtio_stw_p; this may result in value truncation, and on big-endian systems with legacy virtio in completely bogus readings in the guest. Use the appropriate accessor to store it. Signed-off-by: Roman Kagan

Re: [PATCH v6 4/5] block: make size-related BlockConf properties accept size suffixes

2020-05-27 Thread Roman Kagan
On Wed, May 27, 2020 at 09:50:39AM -0500, Eric Blake wrote: > On 5/27/20 7:45 AM, Roman Kagan wrote: > > Several BlockConf properties represent respective sizes in bytes so it > > makes sense to accept size suffixes for them. > > > > Turn them all into uint32_t and use

[PATCH v6 5/5] block: lift blocksize property limit to 2 MiB

2020-05-27 Thread Roman Kagan
Logical and physical block sizes in QEMU are limited to 32 KiB. This appears unnecessary tight, and we've seen bigger block sizes handy at times. Lift the limitation up to 2 MiB which appears to be good enough for everybody, and matches the qcow2 cluster size limit. Signed-off-by: Roman Kagan

[PATCH v6 4/5] block: make size-related BlockConf properties accept size suffixes

2020-05-27 Thread Roman Kagan
. Signed-off-by: Roman Kagan --- v5 -> v6: - add prop_size32 instead of going with 64bit v4 -> v5: - make all BlockConf size props support suffixes - move qdev_prop_blocksize after qdev_prop_size, to reuse get_size - reword error messages [Kevin] include/hw/block/block.h | 12 +- include/h

[PATCH v6 3/5] qdev-properties: blocksize: use same limits in code and description

2020-05-27 Thread Roman Kagan
Make it easier (more visible) to maintain the limits on the blocksize properties in sync with the respective description, by using macros both in the code and in the description. Signed-off-by: Roman Kagan --- v4 -> v5: - split out into separate patch [Philippe] hw/core/qdev-properties.c |

[PATCH v6 2/5] block: consolidate blocksize properties consistency checks

2020-05-27 Thread Roman Kagan
, add corresponding consistency checks to blkconf_blocksizes, adjusting its signature to communicate possible error to the caller. Also remove the now redundant consistency checks from the specific devices. Signed-off-by: Roman Kagan --- v5 -> v6: - fix forgotten xen-block and swim v4 -> v5:

[PATCH v6 1/5] virtio-blk: store opt_io_size with correct size

2020-05-27 Thread Roman Kagan
The width of opt_io_size in virtio_blk_config is 32bit. However, it's written with virtio_stw_p; this may result in value truncation, and on big-endian systems with legacy virtio in completely bogus readings in the guest. Use the appropriate accessor to store it. Signed-off-by: Roman Kagan

[PATCH v6 0/5] block: enhance handling of size-related BlockConf properties

2020-05-27 Thread Roman Kagan
] - check min_io_size against truncation [Kevin] v2 -> v3: - mention qcow2 cluster size limit in the log and comment [Eric] v1 -> v2: - cap the property at 2 MiB [Eric] - accept size suffixes Roman Kagan (5): virtio-blk: store opt_io_size with correct size block: consolidate blocksize propert

Re: [PATCH v5 0/5] block: widen and check consistency of size-related BlockConf properties

2020-05-26 Thread Roman Kagan
Please ignore the series, I forgot xen-block device. Roman. On Tue, May 26, 2020 at 11:17:35AM +0300, Roman Kagan wrote: > BlockConf includes several properties counted in bytes. > > Enhance their handling in a some aspects, specifically > > - accept common size suffixes (k,

[PATCH v5 3/5] qdev-properties: blocksize: use same limits in code and description

2020-05-26 Thread Roman Kagan
Make it easier (more visible) to maintain the limits on the blocksize properties in sync with the respective description, by using macros both in the code and in the description. Signed-off-by: Roman Kagan --- v4 -> v5: - split out into separate patch [Philippe] hw/core/qdev-properties.c |

[PATCH v5 5/5] block: lift blocksize property limit to 2 MiB

2020-05-26 Thread Roman Kagan
Logical and physical block sizes in QEMU are limited to 32 KiB. This appears unnecessary tight, and we've seen bigger block sizes handy at times. Lift the limitation up to 2 MiB which appears to be good enough for everybody, and matches the qcow2 cluster size limit. Signed-off-by: Roman Kagan

[PATCH v5 4/5] block: make size-related BlockConf properties accept size suffixes

2020-05-26 Thread Roman Kagan
of a specific width (uint16_t for min_io_size and uint32_t for opt_io_size and discard_granularity) in units of logical blocks, introduce extra checks in blkconf_blocksizes to prevent their silent truncation. Signed-off-by: Roman Kagan --- v4 -> v5: - make all BlockConf size props support suffixes - m

[PATCH v5 1/5] virtio-blk: store opt_io_size with correct size

2020-05-26 Thread Roman Kagan
The width of opt_io_size in virtio_blk_config is 32bit. However, it's written with virtio_stw_p; this may result in value truncation, and on big-endian systems with legacy virtio in completely bogus readings in the guest. Use the appropriate accessor to store it. Signed-off-by: Roman Kagan

[PATCH v5 2/5] block: consolidate blocksize properties consistency checks

2020-05-26 Thread Roman Kagan
, add corresponding consistency checks to blkconf_blocksizes, adjusting its signature to communicate possible error to the caller. Also remove the now redundant consistency checks from the specific devices. Signed-off-by: Roman Kagan --- v4 -> v5: - fix/reword error messages [Philippe, Kevin] -

[PATCH v5 0/5] block: widen and check consistency of size-related BlockConf properties

2020-05-26 Thread Roman Kagan
-> v3: - mention qcow2 cluster size limit in the log and comment [Eric] v1 -> v2: - cap the property at 2 MiB [Eric] - accept size suffixes Roman Kagan (5): virtio-blk: store opt_io_size with correct size block: consolidate blocksize properties consistency checks qdev-properties: blocksi

Re: [PATCH v4 3/3] block: make BlockConf.*_size properties 32-bit

2020-05-20 Thread Roman Kagan
On Wed, May 20, 2020 at 05:54:44PM +0200, Kevin Wolf wrote: > Am 20.05.2020 um 10:06 hat Roman Kagan geschrieben: > > Devices (virtio-blk, scsi, etc.) and the block layer are happy to use > > 32-bit for logical_block_size, physical_block_size, and min_io_size. > > Ho

Re: [PATCH v4 3/3] block: make BlockConf.*_size properties 32-bit

2020-05-20 Thread Roman Kagan
On Wed, May 20, 2020 at 11:04:44AM +0200, Philippe Mathieu-Daudé wrote: > On 5/20/20 10:06 AM, Roman Kagan wrote: > > Devices (virtio-blk, scsi, etc.) and the block layer are happy to use > > 32-bit for logical_block_size, physical_block_size, and min_io_size. > > Ho

Re: [PATCH v4 2/3] block: consolidate blocksize properties consistency checks

2020-05-20 Thread Roman Kagan
On Wed, May 20, 2020 at 10:57:00AM +0200, Philippe Mathieu-Daudé wrote: > On 5/20/20 10:06 AM, Roman Kagan wrote: > > Several block device properties related to blocksize configuration must > > be in certain relationship WRT each other: physical block must be no > > small

Re: [PATCH v4 1/3] virtio-blk: store opt_io_size with correct size

2020-05-20 Thread Roman Kagan
On Wed, May 20, 2020 at 06:44:44AM -0400, Michael S. Tsirkin wrote: > On Wed, May 20, 2020 at 11:06:55AM +0300, Roman Kagan wrote: > > The width of opt_io_size in virtio_blk_topology is 32bit. > > > > Use the appropriate accessor to store it. > > > > Signed-of

Re: [PATCH v4 1/3] virtio-blk: store opt_io_size with correct size

2020-05-20 Thread Roman Kagan
On Wed, May 20, 2020 at 05:36:58PM +0200, Kevin Wolf wrote: > Am 20.05.2020 um 10:06 hat Roman Kagan geschrieben: > > The width of opt_io_size in virtio_blk_topology is 32bit. > > I think you mean virtio_blk_config? I consulted virtio-v1.1 spec where the topology-related fie

[PATCH v4 1/3] virtio-blk: store opt_io_size with correct size

2020-05-20 Thread Roman Kagan
The width of opt_io_size in virtio_blk_topology is 32bit. Use the appropriate accessor to store it. Signed-off-by: Roman Kagan --- v4: new patch hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index

[PATCH v4 3/3] block: make BlockConf.*_size properties 32-bit

2020-05-20 Thread Roman Kagan
as the devices which use min_io_size (virtio-blk and scsi) pass its value to the guest in units of logical blocks in a 16bit field, to prevent its silent truncation add a corresponding check to blkconf_blocksizes. Signed-off-by: Roman Kagan --- v3 -> v4: - check min_io_size against truncation [Kevin]

[PATCH v4 0/3] block: make BlockConf.*_size properties 32-bit

2020-05-20 Thread Roman Kagan
suffixes Roman Kagan (3): virtio-blk: store opt_io_size with correct size block: consolidate blocksize properties consistency checks block: make BlockConf.*_size properties 32-bit include/hw/block/block.h | 10 - include/hw/qdev-properties.h | 2 +- hw/block/block.c

[PATCH v4 2/3] block: consolidate blocksize properties consistency checks

2020-05-20 Thread Roman Kagan
, add corresponding consistency checks to blkconf_blocksizes, adjusting its signature to communicate possible error to the caller. Also remove the now redundant consistency checks from the specific devices. Signed-off-by: Roman Kagan --- v4: new patch include/hw/block/block.h | 2 +- hw/block

Re: [PATCH v3] block: make BlockConf.*_size properties 32-bit

2020-05-19 Thread Roman Kagan
On Tue, May 19, 2020 at 04:08:26PM +0200, Kevin Wolf wrote: > Am 29.04.2020 um 11:18 hat Roman Kagan geschrieben: > > Devices (virtio-blk, scsi, etc.) and the block layer are happy to use > > 32-bit for logical_block_size, physical_block_size, and min_io_size. > > Ho

Re: [PATCH v3] block: make BlockConf.*_size properties 32-bit

2020-05-19 Thread Roman Kagan
On Wed, Apr 29, 2020 at 12:18:13PM +0300, Roman Kagan wrote: > Devices (virtio-blk, scsi, etc.) and the block layer are happy to use > 32-bit for logical_block_size, physical_block_size, and min_io_size. > However, the properties in BlockConf are defined as uint16_t limiting > the val

Re: [PATCH v3] block: make BlockConf.*_size properties 32-bit

2020-04-30 Thread Roman Kagan
On Wed, Apr 29, 2020 at 02:59:31PM +0200, Philippe Mathieu-Daudé wrote: > On 4/29/20 2:19 PM, Roman Kagan wrote: > > On Wed, Apr 29, 2020 at 11:41:04AM +0200, Philippe Mathieu-Daudé wrote: > > > Cc'ing virtio-blk and scsi maintainers. > > > > > > On

Re: [PATCH v3] block: make BlockConf.*_size properties 32-bit

2020-04-29 Thread Roman Kagan
On Wed, Apr 29, 2020 at 11:41:04AM +0200, Philippe Mathieu-Daudé wrote: > Cc'ing virtio-blk and scsi maintainers. > > On 4/29/20 11:18 AM, Roman Kagan wrote: > > Devices (virtio-blk, scsi, etc.) and the block layer are happy to use > > 32-bit for logical_block_size

[PATCH v3] block: make BlockConf.*_size properties 32-bit

2020-04-29 Thread Roman Kagan
-by: Roman Kagan Reviewed-by: Eric Blake --- v2 -> v3: - mention qcow2 cluster size limit in the log and comment [Eric] v1 -> v2: - cap the property at 2 MiB [Eric] - accept size suffixes include/hw/block/block.h | 8 include/hw/qdev-properties.h | 2 +- hw/core/qdev-proper

[PATCH v2] block: make BlockConf.*_size properties 32-bit

2020-03-26 Thread Roman Kagan
handy at times. Make them 32 bit instead and lift the limitation up to 2 MiB which appears to be good enough for everybody. As the values can now be fairly big and awkward to type, make the property setter accept common size suffixes (k, m). Signed-off-by: Roman Kagan --- v1 -> v2: -

Re: [PATCH] block: make BlockConf.*_size properties 32-bit

2020-03-24 Thread Roman Kagan
On Mon, Mar 02, 2020 at 01:55:02PM +0300, Roman Kagan wrote: > On Thu, Feb 13, 2020 at 04:55:44PM +0300, Roman Kagan wrote: > > On Thu, Feb 13, 2020 at 06:47:10AM -0600, Eric Blake wrote: > > > On 2/13/20 2:01 AM, Roman Kagan wrote: > > > > On Wed, Feb 12, 2020 a

Re: [PATCH] block: make BlockConf.*_size properties 32-bit

2020-03-02 Thread Roman Kagan
On Thu, Feb 13, 2020 at 04:55:44PM +0300, Roman Kagan wrote: > On Thu, Feb 13, 2020 at 06:47:10AM -0600, Eric Blake wrote: > > On 2/13/20 2:01 AM, Roman Kagan wrote: > > > On Wed, Feb 12, 2020 at 03:44:19PM -0600, Eric Blake wrote: > > > > On 2/11/20 5:54 AM, Roman

Re: [PATCH] block: make BlockConf.*_size properties 32-bit

2020-02-13 Thread Roman Kagan
On Thu, Feb 13, 2020 at 06:47:10AM -0600, Eric Blake wrote: > On 2/13/20 2:01 AM, Roman Kagan wrote: > > On Wed, Feb 12, 2020 at 03:44:19PM -0600, Eric Blake wrote: > > > On 2/11/20 5:54 AM, Roman Kagan wrote: > > > > Devices (virtio-blk, scsi, etc.) and the block lay

Re: [PATCH] block: make BlockConf.*_size properties 32-bit

2020-02-13 Thread Roman Kagan
On Wed, Feb 12, 2020 at 03:44:19PM -0600, Eric Blake wrote: > On 2/11/20 5:54 AM, Roman Kagan wrote: > > Devices (virtio-blk, scsi, etc.) and the block layer are happy to use > > 32-bit for logical_block_size, physical_block_size, and min_io_size. > > However, the pr

[PATCH] block: make BlockConf.*_size properties 32-bit

2020-02-11 Thread Roman Kagan
handy at times. Make them 32 bit instead and lift the limitation. Signed-off-by: Roman Kagan --- hw/core/qdev-properties.c| 21 - include/hw/block/block.h | 8 include/hw/qdev-properties.h | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff

Re: [PATCH v3] iotests: Test NBD client reconnection

2019-11-11 Thread Roman Kagan
On Mon, Nov 11, 2019 at 12:18:48PM +0300, Andrey Shinkevich wrote: > > > On 08/11/2019 17:05, Roman Kagan wrote: > > On Fri, Nov 08, 2019 at 01:49:50PM +, Vladimir Sementsov-Ogievskiy > > wrote: > >> 01.11.2019 19:54, Andrey Shinkevich wrote: > >&g

Re: [PATCH v3] iotests: Test NBD client reconnection

2019-11-08 Thread Roman Kagan
On Fri, Nov 08, 2019 at 01:49:50PM +, Vladimir Sementsov-Ogievskiy wrote: > 01.11.2019 19:54, Andrey Shinkevich wrote: > > +def check_proc_NBD(proc, connector): > > +try: > > +exitcode = proc.wait(timeout=10) > > + > > +if exitcode < 0: > > +log('NBD {}: EXIT

Re: [PATCH v2 3/6] qemu-nbd: add compression flag support

2019-10-04 Thread Roman Kagan
On Wed, Oct 02, 2019 at 05:22:43PM +0300, Andrey Shinkevich wrote: > Added possibility to write compressed data by using the > blk_write_compressed. This action has the limitations of the format > driver. For example we can't write compressed data over other. > > $ ./qemu-img create -f qcow2 -o

Re: [PATCH v4 04/31] error: auto propagated local_err

2019-10-02 Thread Roman Kagan
On Tue, Oct 01, 2019 at 06:52:52PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of > functions with errp OUT parameter. > > It has three goals: > > 1. Fix issue with error_fatal & error_prepend/error_append_hint: user > can't see

Re: [Qemu-block] [PATCH v2 2/7] iotests: exclude killed processes from running under Valgrind

2019-06-17 Thread Roman Kagan
On Mon, Jun 17, 2019 at 02:53:55PM +0200, Kevin Wolf wrote: > Am 17.06.2019 um 14:18 hat Roman Kagan geschrieben: > > On Mon, Jun 17, 2019 at 01:15:04PM +0200, Kevin Wolf wrote: > > > Am 11.06.2019 um 20:02 hat Andrey Shinkevich geschrieben: > > > > The Val

Re: [Qemu-block] [PATCH v2 6/7] iotests: amend QEMU NBD process synchronization

2019-06-17 Thread Roman Kagan
> finished before starting a new one. > > > > Suggested-by: Roman Kagan > > Signed-off-by: Andrey Shinkevich > > --- > > tests/qemu-iotests/common.nbd | 6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/tests/qemu-iotests/common.

Re: [Qemu-block] [PATCH v2 6/7] iotests: amend QEMU NBD process synchronization

2019-06-17 Thread Roman Kagan
longer so the race bites every test run. Since nbd is run in a background job of the test, record the nbd pid at the daemon start in a shell variable and perform a wait for it when terminating it. Roman. > Suggested-by: Roman Kagan > Signed-off-by: Andrey Shinkevich > --- > tests/qemu-i

Re: [Qemu-block] [PATCH v2 2/7] iotests: exclude killed processes from running under Valgrind

2019-06-17 Thread Roman Kagan
On Mon, Jun 17, 2019 at 01:15:04PM +0200, Kevin Wolf wrote: > Am 11.06.2019 um 20:02 hat Andrey Shinkevich geschrieben: > > The Valgrind tool fails to manage its termination when QEMU raises the > > signal SIGKILL. Lets exclude such test cases from running under the > > Valgrind because there is

Re: [Qemu-block] [PATCH v2 2/7] iotests: exclude killed processes from running under Valgrind

2019-06-17 Thread Roman Kagan
On Thu, Jun 13, 2019 at 12:47:21PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 11.06.2019 21:02, Andrey Shinkevich wrote: > > The Valgrind tool fails to manage its termination when QEMU raises the > > signal SIGKILL. Lets exclude such test cases from running under the > > Valgrind because there

Re: [Qemu-block] [PATCH 00/17] iotests: don't choke on disabled drivers

2018-05-30 Thread Roman Kagan
On Wed, May 30, 2018 at 03:53:52PM +0200, Max Reitz wrote: > On 2018-05-30 15:47, Roman Kagan wrote: > > On Wed, May 30, 2018 at 02:35:34PM +0200, Max Reitz wrote: > >> On 2018-04-26 18:19, Roman Kagan wrote: > >>> Some iotests assume availability of c

Re: [Qemu-block] [PATCH 03/17] iotests: ask qemu for supported formats

2018-05-30 Thread Roman Kagan
On Wed, May 30, 2018 at 02:17:55PM +0200, Max Reitz wrote: > On 2018-04-26 18:19, Roman Kagan wrote: > > @@ -550,13 +561,26 @@ def verify_cache_mode(supported_cache_modes=[]): > > if supported_cache_modes and (cachemode not in supported_cache_modes): > >

Re: [Qemu-block] [PATCH 00/17] iotests: don't choke on disabled drivers

2018-05-17 Thread Roman Kagan
On Thu, Apr 26, 2018 at 07:19:41PM +0300, Roman Kagan wrote: > Some iotests assume availability of certain block drivers, and fail if > the driver is not supported by QEMU because it was disabled at configure > time. > > This series tries to address that, by making QEMU report

[Qemu-block] [PATCH 13/17] iotest 099: notrun if blkdebug or blkverify is disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/099 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/099 b/tests/qemu-iotests/099 index caaf58eee5..80dab909d5 100755 --- a/tests/qemu-iotests/099 +++ b/tests/qemu-iotests/099 @@ -45,6

[Qemu-block] [PATCH 17/17] iotest 184: notrun if null-co or throttle is disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/184 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/184 b/tests/qemu-iotests/184 index 2b68284d58..87ae30df46 100755 --- a/tests/qemu-iotests/184 +++ b/tests/qemu-iotests/184 @@ -34,6 +34,7 @

[Qemu-block] [PATCH 16/17] iotest 147: notrun if nbd is disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/147 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index d2081df84b..f66a777351 100755 --- a/tests/qemu-iotests/147 +++ b/tests/qemu-iotests/147 @@ -249,6 +249,7 @@

[Qemu-block] [PATCH 15/17] iotest 139: skip testcases using disabled drivers

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/139 | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139 index cc7fe337f3..ca932a5c29 100755 --- a/tests/qemu-iotests/139 +++ b/tests/qemu-iotests/139 @@ -326,6

[Qemu-block] [PATCH 10/17] iotest 081: notrun if quorum is disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/081 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index da3fb0984b..3489f2975f 100755 --- a/tests/qemu-iotests/081 +++ b/tests/qemu-iotests/081 @@ -42,6 +42,7 @

[Qemu-block] [PATCH 03/17] iotests: ask qemu for supported formats

2018-04-26 Thread Roman Kagan
Add helper functions to query the block drivers actually supported by QEMU using "-drive format=?". This allows to skip certain tests that require drivers not built in or whitelisted in QEMU. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests

[Qemu-block] [PATCH 14/17] iotest 124: skip testcases using blkdebug if disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/124 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 8e76e62f93..f26c9170fb 100755 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -401,6

[Qemu-block] [PATCH 06/17] iotest 055: skip unsupported backup target formats

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/055 | 12 1 file changed, 12 insertions(+) diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055 index 3437c11507..3a47aaa886 100755 --- a/tests/qemu-iotests/055 +++ b/tests/qemu-iotests/055 @@ -

[Qemu-block] [PATCH 12/17] iotest 093: notrun if null-co or null-aio is disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/093 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index c3404a3171..6a62f6f01d 100755 --- a/tests/qemu-iotests/093 +++ b/tests/qemu-iotests/093 @@ -372,4 +372,5 @@

[Qemu-block] [PATCH 09/17] iotest 071: notrun if blkdebug or blkverify is disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/071 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/071 b/tests/qemu-iotests/071 index 48b495513f..2385ab33be 100755 --- a/tests/qemu-iotests/071 +++ b/tests/qemu-iotests/071 @@ -40,6 +40,7 @

[Qemu-block] [PATCH 04/17] iotest 030: skip quorum test setup/teardown too

2018-04-26 Thread Roman Kagan
If quorum driver is not enabled, test 030 skips the corresponding testcase. This, however, is insufficient: quorum is first used in the testsuite's setUp. To avoid erroring out here, skip setUp/tearDown, too. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/0

[Qemu-block] [PATCH 07/17] iotest 055: require blkdebug

2018-04-26 Thread Roman Kagan
This test uses blkdebug extensively so notrun it if blkdebug is disabled in QEMU. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/055 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055 index 3a47aaa886..02ea3cb72d

[Qemu-block] [PATCH 00/17] iotests: don't choke on disabled drivers

2018-04-26 Thread Roman Kagan
and using this information to skip the parts of the io testsuite that can not be run in this configuration. Roman Kagan (17): block: iterate_format with account of whitelisting iotests: iotests.py: prevent deadlock in subprocess iotests: ask qemu for supported formats iotest 030: skip quorum

[Qemu-block] [PATCH 11/17] iotest 087: notrun if null-co is disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/087 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087 index 2561a14456..83710babe3 100755 --- a/tests/qemu-iotests/087 +++ b/tests/qemu-iotests/087 @@ -34,6 +34,7 @@ st

[Qemu-block] [PATCH 08/17] iotest 056: skip testcases using blkdebug if disabled

2018-04-26 Thread Roman Kagan
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/056 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/056 b/tests/qemu-iotests/056 index 223292175a..ff40313851 100755 --- a/tests/qemu-iotests/056 +++ b/tests/qemu-iotests/056 @@ -230,6

[Qemu-block] [PATCH 05/17] iotest 030: require blkdebug

2018-04-26 Thread Roman Kagan
This test uses blkdebug extensively so notrun it if blkdebug is disabled in QEMU. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-iotests/030 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index 6b20ff005e..ac96331899

[Qemu-block] [PATCH 01/17] block: iterate_format with account of whitelisting

2018-04-26 Thread Roman Kagan
rmats (r/w and r/o) in main qemu. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- include/block/block.h | 2 +- block.c | 23 +++ blockdev.c| 4 +++- qemu-img.c| 2 +- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git

[Qemu-block] [PATCH 02/17] iotests: iotests.py: prevent deadlock in subprocess

2018-04-26 Thread Roman Kagan
A subprocess whose std{out,err} is subprocess.PIPE may block writing its output, so .wait() should not be called on it until the pipes are read completely on the caller's side. Subprocess.communicate takes care of this. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- tests/qemu-i

Re: [Qemu-block] [RFC PATCH 0/2] Increase usability of external snapshots

2018-03-02 Thread Roman Kagan
On Tue, Feb 27, 2018 at 12:56:49PM +0100, Richard Palethorpe wrote: > Following on from the discussion about creating savevm/loadvm QMP > equivalents. I decided to take the advice given that we should use external > snapshots. However reverting to a snapshot currently requires QEMU to be >

Re: [Qemu-block] [PATCH 2/5] configure: add dependency

2017-12-22 Thread Roman Kagan
On Mon, Dec 18, 2017 at 02:09:08PM +0300, Denis V. Lunev wrote: > From: Klim Kireev > > This dependency is required for adequate Parallels images support. > Typically the disk consists of several images which are glued by > XML disk descriptor. Also XML hides inside

Re: [Qemu-block] [PATCH 09/17] util: add stats64 module

2017-05-04 Thread Roman Kagan
On Thu, Apr 20, 2017 at 02:00:50PM +0200, Paolo Bonzini wrote: > This module provides fast paths for 64-bit atomic operations on machines > that only have 32-bit atomic access. > --- /dev/null > +++ b/include/qemu/stats64.h [...] > +#ifndef STAT64_NEED_SPINLOCK [...] > +static inline void

Re: [Qemu-block] [Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-14 Thread Roman Kagan
On Thu, Apr 13, 2017 at 09:06:19PM -0400, John Snow wrote: > So if we have a 1MB cluster with 64k subclusters as a hypothetical, if > we write just the first subcluster, we'll have a map like: > > X--- > > Whatever actually happens to exist in this space, whether it be a hole > we

Re: [Qemu-block] [Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation

2017-04-13 Thread Roman Kagan
On Thu, Apr 13, 2017 at 04:27:35PM +0200, Kevin Wolf wrote: > Am 13.04.2017 um 16:15 hat Alberto Garcia geschrieben: > > On Thu 13 Apr 2017 03:51:55 PM CEST, Kevin Wolf wrote: > > >> This invariant is already broken by the very design of the qcow2 > > >> format, subclusters don't really add

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above()

2016-09-12 Thread Roman Kagan
On Fri, Sep 09, 2016 at 03:31:47PM +0300, Denis V. Lunev wrote: > They should work very similar, covering same areas if backing store is > shorter than the image. This change is necessary for the followup patch > switching to bdrv_get_block_status_above() in mirror to avoid assert > in

Re: [Qemu-block] [PATCH v4 00/12] fdc: fix 2.88mb floppy diskette support

2016-01-21 Thread Roman Kagan
On Thu, Jan 21, 2016 at 09:59:09AM -0500, John Snow wrote: > > Now that is a bit trickier: the currently submitted code queries the > > floppy properties at SSDT build time, and sticks static objects into > > AML; if that really needs updating at runtime it'll require certain > > refactoring. > >

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2016-01-13 Thread Roman Kagan
On Wed, Jan 13, 2016 at 03:36:18PM +0100, Laszlo Ersek wrote: > On 12/30/15 21:11, Roman Kagan wrote: > > Windows on UEFI systems is only capable of detecting the presence and > > the type of floppy drives via corresponding ACPI objects. > > I'm late to the party, but pleas

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2016-01-13 Thread Roman Kagan
On Wed, Jan 13, 2016 at 06:49:44PM +0300, Roman Kagan wrote: > On Wed, Jan 13, 2016 at 03:36:18PM +0100, Laszlo Ersek wrote: > > On 12/30/15 21:11, Roman Kagan wrote: > > > Windows on UEFI systems is only capable of detecting the presence and > > > the type of floppy dr

[Qemu-block] [PATCH v5 5/6] i386: populate floppy drive information in SSDT

2015-12-30 Thread Roman Kagan
those objects to the floppy controller in SSDT, populating them with the information from the respective QEMU objects. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: Igor Mammedov &l

[Qemu-block] [PATCH v5 2/6] i386/acpi: make floppy controller object dynamic

2015-12-30 Thread Roman Kagan
are the declarations of the fields indicating whether the contoller is enabled. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: Igor Mammedov <imamm...@redhat.com> Cc: John Snow

[Qemu-block] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2015-12-30 Thread Roman Kagan
description into runtime-generated SSDT. Note that the series conflicts with Igor's patchset for dynamic DSDT, in particular, with "[PATCH v2 27/51] pc: acpi: move FDC0 device from DSDT to SSDT"; I haven't managed to avoid that while trying to meet maintainer's comments. Roman Kagan (6): i386/

[Qemu-block] [PATCH v5 1/6] i386/pc: expose identifying the floppy controller

2015-12-30 Thread Roman Kagan
Factor out and expose the function to locate the floppy controller in the system. It will allow to dynamically populate the relevant objects in the ACPI tables. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Eduardo Habkos

[Qemu-block] [PATCH v5 6/6] tests/acpi: update test data

2015-12-30 Thread Roman Kagan
to match the preceding commit "i386: populate floppy drive information in SSDT". Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: Igor Mammedov <imamm...@redhat

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/4] i386: expose floppy-related objects in SSDT

2015-12-29 Thread Roman Kagan
On Tue, Dec 29, 2015 at 03:09:36PM +0100, Igor Mammedov wrote: > On Fri, 25 Dec 2015 18:04:08 +0300 > Roman Kagan <rka...@virtuozzo.com> wrote: > > > Windows on UEFI systems is only capable of detecting the presence and > > the type of floppy drives via corresponding A

[Qemu-block] [PATCH v4 1/4] i386/pc: expose identifying the floppy controller

2015-12-25 Thread Roman Kagan
Factor out and expose the function to locate the floppy controller in the system. It will be useful when dynamically populating the relevant objects in the ACPI tables. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc:

[Qemu-block] [PATCH v4 4/4] i386: populate floppy drive information in SSDT

2015-12-25 Thread Roman Kagan
those objects to the floppy controller in SSDT, populating them with the information from the respective QEMU objects. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: Igor Mammedov &l

[Qemu-block] [PATCH v4 3/4] expose floppy drive geometry and CMOS type

2015-12-25 Thread Roman Kagan
to access the floppy drives. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: Igor Mammedov <imamm...@redhat.com> Cc: John Snow <js...@redhat.com> Cc: Kevin Wolf <

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Roman Kagan
On Wed, Dec 23, 2015 at 10:47:22AM +, Daniel P. Berrange wrote: > On Wed, Dec 23, 2015 at 11:14:12AM +0800, Fam Zheng wrote: > > As an alternative, can we introduce .bdrv_flock() in protocol drivers, with > > similar semantics to flock(2) or lockf(3)? That way all formats can benefit, > > and

[Qemu-block] [PATCH] qcow2: always initialize specific image info

2015-12-07 Thread Roman Kagan
locVisitor. Although we have neither a solid proof nor a reproduction scenario, making sure the field is initialized appears a reasonable thing to do. Signed-off-by: Roman Kagan <rka...@virtuozzo.com> --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2

<    1   2