Re: [Qemu-block] RFC: some problems with bdrv_get_block_status

2017-04-28 Thread Denis V. Lunev
On 04/28/2017 09:31 PM, Eric Blake wrote: > On 04/28/2017 11:17 AM, Denis V. Lunev wrote: >> Hello, All! >> >> Recently we have experienced problems with very slow >> bdrv_get_block_status call, which is massive called f.e. >> from mirror_run(). >> >> The problem was narrowed down to slow

Re: [Qemu-block] [Qemu-devel] [PULL 14/34] iotests: Launch qemu-nbd with -e 42

2017-04-28 Thread Eric Blake
On 04/28/2017 03:33 PM, Kevin Wolf wrote: > From: Max Reitz > > 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 it fails before this >

Re: [Qemu-block] [PATCH v10 09/17] qcow2: Optimize write zero of unaligned tail cluster

2017-04-28 Thread Eric Blake
On 04/28/2017 03:48 PM, Max Reitz wrote: > 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

Re: [Qemu-block] RFC: some problems with bdrv_get_block_status

2017-04-28 Thread Denis V. Lunev
On 04/28/2017 09:31 PM, Eric Blake wrote: > On 04/28/2017 11:17 AM, Denis V. Lunev wrote: >> Hello, All! >> >> Recently we have experienced problems with very slow >> bdrv_get_block_status call, which is massive called f.e. >> from mirror_run(). >> >> The problem was narrowed down to slow

Re: [Qemu-block] RFC: some problems with bdrv_get_block_status

2017-04-28 Thread Denis V. Lunev
On 04/28/2017 10:35 PM, Denis V. Lunev wrote: > On 04/28/2017 09:31 PM, Eric Blake wrote: >> On 04/28/2017 11:17 AM, Denis V. Lunev wrote: >>> Hello, All! >>> >>> Recently we have experienced problems with very slow >>> bdrv_get_block_status call, which is massive called f.e. >>> from

Re: [Qemu-block] [PATCH v10 09/17] qcow2: Optimize write zero of unaligned tail cluster

2017-04-28 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v10 07/17] qemu-io: Switch 'alloc' command to byte-based length

2017-04-28 Thread Max Reitz
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' command, accepting an offset in bytes but a length > in

Re: [Qemu-block] [PATCH v10 07/17] qemu-io: Switch 'alloc' command to byte-based length

2017-04-28 Thread Eric Blake
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' command, accepting an offset in bytes but a length in sectors, and reporting output in sectors, is

[Qemu-block] [PULL 30/34] qemu-img: improve convert_iteration_sectors()

2017-04-28 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Do not do extra call to _get_block_status() Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20170407113404.9351-1-vsement...@virtuozzo.com Reviewed-by: John Snow Signed-off-by: Max

[Qemu-block] [PULL 32/34] iotests: clarify help text

2017-04-28 Thread Kevin Wolf
From: John Snow Split the help text to highlight the groups of options a little better, carving out a clear "format" and "protocols" section. Signed-off-by: John Snow Message-id: 20170427205100.9505-2-js...@redhat.com Reviewed-by: Eric Blake

[Qemu-block] [PULL 29/34] block: assert no image modification under BDRV_O_INACTIVE

2017-04-28 Thread Kevin Wolf
From: "Denis V. Lunev" As long as BDRV_O_INACTIVE is set, the image file is only opened so we have a file descriptor for it. We're definitely not supposed to modify the image, it's still owned by the migration source. This commit is an addition to 09e0c771 but the assert() is

[Qemu-block] [PULL 34/34] progress: Show current progress on SIGINFO

2017-04-28 Thread Kevin Wolf
From: Max Reitz 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/1662468 Signed-off-by: Max

[Qemu-block] [PULL 33/34] iotests: fix exclusion option

2017-04-28 Thread Kevin Wolf
From: John Snow If you are running out-of-tree, the -x option to exclude a certain iotest is broken. Replace porcelain usage of ls with a sturdier awk command. Reviewed-by: Fam Zheng Signed-off-by: John Snow Message-id:

[Qemu-block] [PULL 25/34] block: Add errp to BD.bdrv_truncate()

2017-04-28 Thread Kevin Wolf
From: Max Reitz Add an Error parameter to the block drivers' bdrv_truncate() interface. If a block driver does not set this in case of an error, the generic bdrv_truncate() implementation will do so. Where it is obvious, this patch also makes some block drivers set this

[Qemu-block] [PULL 19/34] block: fix alignment calculations in bdrv_co_do_zero_pwritev

2017-04-28 Thread Kevin Wolf
From: "Denis V. Lunev" tail_padding_bytes is calculated wrong. F.e. for offset = 0 bytes = 2048 align = 512 we will have tail_padding_bytes = 512 which is definitely wrong. The patch fixes that arithmetics. Fortunately this problem is harmless, we will have 1 extra

[Qemu-block] [PULL 24/34] block: Add errp to b{lk,drv}_truncate()

2017-04-28 Thread Kevin Wolf
From: Max Reitz For one thing, this allows us to drop the error message generation from qemu-img.c and blockdev.c and instead have it unified in bdrv_truncate(). Signed-off-by: Max Reitz Message-id: 20170328205129.15138-3-mre...@redhat.com Reviewed-by:

[Qemu-block] [PULL 26/34] block: Add .bdrv_truncate() error messages

2017-04-28 Thread Kevin Wolf
From: Max Reitz Add missing error messages for the block driver implementations of .bdrv_truncate(); drop the generic one from block.c's bdrv_truncate(). Since one of these changes touches a mis-indented block in block/file-posix.c, this patch fixes that coding style issue

[Qemu-block] [PULL 07/34] qemu-iotests: Filter HMP readline escape characters

2017-04-28 Thread Kevin Wolf
The only thing the escape characters achieve is making the reference output unreadable and lines that are potentially so long that git doesn't want to put them into an email any more. Let's filter them out. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake

[Qemu-block] [PULL 31/34] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-28 Thread Kevin Wolf
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: Lidong Chen

[Qemu-block] [PULL 28/34] block: fix obvious coding style mistakes in block_int.h

2017-04-28 Thread Kevin Wolf
From: Klim Kireev Signed-off-by: Klim Kireev Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Max Reitz Message-id: 1491405505-31620-2-git-send-email-...@openvz.org Reviewed-by: Eric

[Qemu-block] [PULL 27/34] qcow2: Allow discard of final unaligned cluster

2017-04-28 Thread Kevin Wolf
From: Eric Blake As mentioned in commit 0c1bd46, we ignored requests to discard the trailing cluster of an unaligned image. While discard is an advisory operation from the guest standpoint, (and we are therefore free to ignore any request), our qcow2 implementation exploits

[Qemu-block] [PULL 14/34] iotests: Launch qemu-nbd with -e 42

2017-04-28 Thread Kevin Wolf
From: Max Reitz 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 it fails before this patch). This patch updates common.rc to launch

[Qemu-block] [PULL 23/34] block/vhdx: Make vhdx_create() always set errp

2017-04-28 Thread Kevin Wolf
From: Max Reitz This patch makes vhdx_create() always set errp in case of an error. It also adds errp parameters to vhdx_create_bat() and vhdx_create_new_region_table() so we can pass on the error object generated by blk_truncate() as of a future commit. Signed-off-by: Max

[Qemu-block] [PULL 17/34] iotests: 109: Filter out "len" of failed jobs

2017-04-28 Thread Kevin Wolf
From: Fam Zheng Mirror calculates job len from current I/O progress: s->common.len = s->common.offset + (cnt + s->sectors_in_flight) * BDRV_SECTOR_SIZE; The final "len" of a failed mirror job in iotests 109 depends on the subtle timing of the completion

[Qemu-block] [PULL 21/34] qemu-img/convert: Move bs_n > 1 && -B check down

2017-04-28 Thread Kevin Wolf
From: Max Reitz It does not make much sense to use a backing image for the target when you concatenate multiple images (because then there is no correspondence between the source images' backing files and the target's); but it was still possible to give one by using -o

[Qemu-block] [PULL 16/34] iotests: Fix typo in 026

2017-04-28 Thread Kevin Wolf
From: Eric Blake s/refcout/refcount/ CC: qemu-triv...@nongnu.org Signed-off-by: Eric Blake Reviewed-by: Laurent Vivier Signed-off-by: Kevin Wolf --- tests/qemu-iotests/026 | 2 +-

[Qemu-block] [PULL 20/34] qemu-img/convert: Use @opts for one thing only

2017-04-28 Thread Kevin Wolf
From: Max Reitz 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 preallocation. With the -n parameter, there will not be any creation options; this is not

[Qemu-block] [PULL 22/34] qemu-img: Document backing options

2017-04-28 Thread Kevin Wolf
From: Max Reitz 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

[Qemu-block] [PULL 18/34] block: Do not unref bs->file on error in BD's open

2017-04-28 Thread Kevin Wolf
From: Max Reitz The block layer takes care of removing the bs->file child if the block driver's bdrv_open()/bdrv_file_open() implementation fails. The block driver therefore does not need to do so, and indeed should not unless it sets bs->file to NULL afterwards -- because if

[Qemu-block] [PULL 12/34] qemu_iotests: Remove _readlink()

2017-04-28 Thread Kevin Wolf
It is unused. Suggested-by: Fam Zheng Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- tests/qemu-iotests/common.config | 18 -- 1

[Qemu-block] [PULL 13/34] block: Remove NULL check in bdrv_co_flush

2017-04-28 Thread Kevin Wolf
From: Fam Zheng Reported by Coverity. We already use bs in bdrv_inc_in_flight before checking for NULL. It is unnecessary as all callers pass non-NULL bs, so drop it. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf

[Qemu-block] [PULL 15/34] Issue a deprecation warning if the user specifies the "-hdachs" option.

2017-04-28 Thread Kevin Wolf
From: Thomas Huth If the user needs to specify the disk geometry, the corresponding parameters of the "-device ide-hd" option should be used instead. "-hdachs" is considered as deprecated and might be removed soon. Signed-off-by: Thomas Huth Reviewed-by:

[Qemu-block] [PULL 10/34] iotests/051: Add test for empty filename

2017-04-28 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- tests/qemu-iotests/051| 1 + tests/qemu-iotests/051.out| 3 +++

[Qemu-block] [PULL 11/34] qemu-iotests: Remove PERL_PROG and BC_PROG

2017-04-28 Thread Kevin Wolf
We test for the presence of perl and bc and save their path in the variables PERL_PROG and BC_PROG, but never actually make use of them. Remove the checks and assignments so qemu-iotests can run even when bc isn't installed. Reported-by: Yash Mankad Signed-off-by: Kevin Wolf

[Qemu-block] [PULL 03/34] file-win32: Remove unnecessary include

2017-04-28 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/file-win32.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/file-win32.c b/block/file-win32.c index 800fabd..e132ba1 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include

[Qemu-block] [PULL 09/34] block: An empty filename counts as no filename

2017-04-28 Thread Kevin Wolf
From: Max Reitz Reproducer: $ ./qemu-img info '' qemu-img: ./block.c:1008: bdrv_open_driver: Assertion `!drv->bdrv_needs_filename || bs->filename[0]' failed. [1]26105 abort (core dumped) ./qemu-img info '' This patch fixes this to be: $ ./qemu-img

[Qemu-block] [PULL 08/34] qemu-iotests: Test postcopy migration

2017-04-28 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Dr. David Alan Gilbert --- tests/qemu-iotests/181 | 119 + tests/qemu-iotests/181.out | 38 +++ tests/qemu-iotests/group | 1 + 3 files changed, 158

[Qemu-block] [PULL 05/34] qemu-img: simplify img_convert

2017-04-28 Thread Kevin Wolf
From: Peter Lieven img_convert has been around before there was an ImgConvertState or a block backend, but it has never been modified to directly use these structs. Change this by parsing parameters directly into the ImgConvertState and directly use BlockBackend where possible.

[Qemu-block] [PULL 06/34] migration: Call blk_resume_after_migration() for postcopy

2017-04-28 Thread Kevin Wolf
Commit d35ff5e6 ('block: Ignore guest dev permissions during incoming migration') added blk_resume_after_migration() to the precopy migration path, but neglected to add it to the duplicated code that is used for postcopy migration. This means that the guest device doesn't request the necessary

[Qemu-block] [PULL 04/34] Revert "block/io: Comment out permission assertions"

2017-04-28 Thread Kevin Wolf
From: Max Reitz This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74. This commit was necessary for the 2.9 release because we were unable to fix the underlying issue(s) in time. However, we will be for 2.10. Signed-off-by: Max Reitz Acked-by: Fam

[Qemu-block] [PULL 00/34] Block layer patches

2017-04-28 Thread Kevin Wolf
The following changes since commit 81b2d5ceb0cfb4cdc2163492e3169ed714b0cda9: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170426' into staging (2017-04-26 20:50:49 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[Qemu-block] [PULL 02/34] file-posix: Remove unnecessary includes

2017-04-28 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/file-posix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 0c48968..ade71db 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -25,8 +25,6 @@ #include "qapi/error.h" #include

[Qemu-block] [PULL 01/34] block: Constify data passed by pointer to blk_name

2017-04-28 Thread Kevin Wolf
From: Krzysztof Kozlowski blk_name() is not modifying data passed to it through pointer and it returns also a pointer to const so the argument can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-block] [Qemu-devel] [PATCH v10 01/17] block: Update comments on BDRV_BLOCK_* meanings

2017-04-28 Thread Eric Blake
On 04/26/2017 08:46 PM, Eric Blake wrote: > We had some conflicting documentation: a nice 8-way table that > described all possible combinations of DATA, ZERO, and > OFFSET_VALID, couple with text that implied that OFFSET_VALID > always meant raw data could be read directly. As the 8-way > table

Re: [Qemu-block] [PATCH v10 07/17] qemu-io: Switch 'alloc' command to byte-based length

2017-04-28 Thread Max Reitz
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. Do >>> everything in bytes, and adjust

Re: [Qemu-block] [PATCH v10 08/17] qemu-io: Switch 'map' output to byte-based reporting

2017-04-28 Thread Eric Blake
On 04/28/2017 02:53 PM, Max Reitz wrote: > On 27.04.2017 03:46, Eric Blake wrote: >> Mixing byte offset and sector allocation counts is a bit >> confusing. Also, reporting n/m sectors, where m decreases >> according to the remaining size of the file, isn't really >> adding any useful information.

Re: [Qemu-block] [PATCH v10 07/17] qemu-io: Switch 'alloc' command to byte-based length

2017-04-28 Thread Eric Blake
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. Do >> everything in bytes, and adjust the expected output accordingly. >> >>

Re: [Qemu-block] [PATCH v10 08/17] qemu-io: Switch 'map' output to byte-based reporting

2017-04-28 Thread Max Reitz
On 27.04.2017 03:46, Eric Blake wrote: > Mixing byte offset and sector allocation counts is a bit > confusing. Also, reporting n/m sectors, where m decreases > according to the remaining size of the file, isn't really > adding any useful information. Since this map doesn't leave out any range in

Re: [Qemu-block] [PATCH v10 05/17] iotests: Add test 179 to cover write zeroes with unmap

2017-04-28 Thread Eric Blake
On 04/28/2017 02:28 PM, Max Reitz wrote: > 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

Re: [Qemu-block] [PATCH v10 07/17] qemu-io: Switch 'alloc' command to byte-based length

2017-04-28 Thread Max Reitz
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. Do > everything in bytes, and adjust the expected output accordingly. > > Signed-off-by: Eric Blake >

Re: [Qemu-block] [PATCH v10 06/17] qemu-io: Don't open-code QEMU_IS_ALIGNED

2017-04-28 Thread Max Reitz
On 27.04.2017 03:46, Eric Blake wrote: > Manual comparison against 0x1ff is not as clean as using our > alignment macros from osdep.h. > > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Eric Blake > > --- > v10: new patch > --- > qemu-io-cmds.c | 10

Re: [Qemu-block] [PATCH v10 05/17] iotests: Add test 179 to cover write zeroes with unmap

2017-04-28 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v10 04/17] qcow2: Optimize zero_single_l2() to minimize L2 churn

2017-04-28 Thread Eric Blake
On 04/28/2017 01:00 PM, Max Reitz wrote: > On 27.04.2017 03:46, Eric Blake wrote: >> Similar to discard_single_l2(), we should try to avoid dirtying >> the L2 cache when the cluster we are changing already has the >> right characteristics. >> >> -/* Update L2 entries */ >> +/* >>

Re: [Qemu-block] [PATCH v10 02/17] qcow2: Correctly report status of preallocated zero clusters

2017-04-28 Thread Eric Blake
On 04/28/2017 12:35 PM, Max Reitz wrote: > 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 | >>

Re: [Qemu-block] [Qemu-devel] [PATCH] MAINTAINERS: Add qemu-progress to the block layer

2017-04-28 Thread Eric Blake
On 04/28/2017 11:55 AM, Max Reitz wrote: > 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 > --- >

Re: [Qemu-block] RFC: some problems with bdrv_get_block_status

2017-04-28 Thread Eric Blake
On 04/28/2017 11:17 AM, Denis V. Lunev wrote: > Hello, All! > > Recently we have experienced problems with very slow > bdrv_get_block_status call, which is massive called f.e. > from mirror_run(). > > The problem was narrowed down to slow lseek64() system > call, which can take 1-2-3 seconds.

Re: [Qemu-block] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-28 Thread Kevin Wolf
Am 28.04.2017 um 17:30 hat Fam Zheng geschrieben: > On Fri, 04/28 15:45, Kevin Wolf wrote: > > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > > This extends the permission bits of op blocker API to external using > > > Linux OFD locks. > > > > > > Each permission in @perm and @shared_perm

Re: [Qemu-block] [PATCH v10 04/17] qcow2: Optimize zero_single_l2() to minimize L2 churn

2017-04-28 Thread Max Reitz
On 27.04.2017 03:46, Eric Blake wrote: > Similar to discard_single_l2(), we should try to avoid dirtying > the L2 cache when the cluster we are changing already has the > right characteristics. > > Note that by the time we get to zero_single_l2(), BDRV_REQ_MAY_UNMAP > is a requirement to

Re: [Qemu-block] [PATCH v10 03/17] qcow2: Reuse preallocated zero clusters

2017-04-28 Thread Max Reitz
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 to

Re: [Qemu-block] [PATCH v10 02/17] qcow2: Correctly report status of preallocated zero clusters

2017-04-28 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v10 01/17] block: Update comments on BDRV_BLOCK_* meanings

2017-04-28 Thread Max Reitz
On 27.04.2017 03:46, Eric Blake wrote: > We had some conflicting documentation: a nice 8-way table that > described all possible combinations of DATA, ZERO, and > OFFSET_VALID, couple with text that implied that OFFSET_VALID > always meant raw data could be read directly. As the 8-way > table is

[Qemu-block] [PATCH] MAINTAINERS: Add qemu-progress to the block layer

2017-04-28 Thread Max Reitz
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

Re: [Qemu-block] [PATCH] progress: Show current progress on SIGINFO

2017-04-28 Thread Max Reitz
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/1662468 >

[Qemu-block] RFC: some problems with bdrv_get_block_status

2017-04-28 Thread Denis V. Lunev
Hello, All! Recently we have experienced problems with very slow bdrv_get_block_status call, which is massive called f.e. from mirror_run(). The problem was narrowed down to slow lseek64() system call, which can take 1-2-3 seconds. root@s158 ~]# strace -f -p 77048 -T -e lseek Process 77048

Re: [Qemu-block] [PATCH v3] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-28 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-28 Thread Fam Zheng
On Fri, 04/28 15:45, Kevin Wolf wrote: > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > This extends the permission bits of op blocker API to external using > > Linux OFD locks. > > > > Each permission in @perm and @shared_perm is represented by a locked > > byte in the image file.

Re: [Qemu-block] [Qemu-devel] [PATCH v5 3/4] shutdown: Add source information to SHUTDOWN and RESET

2017-04-28 Thread Markus Armbruster
Eric Blake writes: > Libvirt would like to be able to distinguish between a SHUTDOWN > event triggered solely by guest request and one triggered by a > SIGTERM or other action on the host. While qemu_kill_report() is > already able to tell whether a shutdown was triggered by

Re: [Qemu-block] [PATCH v2 3/3] qemu-img: Document backing options

2017-04-28 Thread Max Reitz
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. But I don't think >>> the

Re: [Qemu-block] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-28 Thread Kevin Wolf
Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > This extends the permission bits of op blocker API to external using > Linux OFD locks. > > Each permission in @perm and @shared_perm is represented by a locked > byte in the image file. Requesting a permission in @perm is translated > to a

Re: [Qemu-block] [Qemu-devel] [PATCH v17 00/24] qcow2: persistent dirty bitmaps

2017-04-28 Thread Vladimir Sementsov-Ogievskiy
27.04.2017 19:43, John Snow wrote: On 04/26/2017 07:30 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all! There is a new update of qcow2-bitmap series - v17. web: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=qcow2-bitmap-v17 git: https://src.openvz.org/scm/~vsementsov/qemu.git

Re: [Qemu-block] [PATCH v2 3/3] qemu-img: Document backing options

2017-04-28 Thread Kevin Wolf
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. But I don't think > > the short options have fallen out of use, so we

Re: [Qemu-block] [Qemu-devel] [PATCH v5 06/10] qobject: Use simpler QDict/QList scalar insertion macros

2017-04-28 Thread Markus Armbruster
Eric Blake writes: > We now have macros in place to make it less verbose to add a scalar > to QDict and QList, so use them. To make this patch smaller to > review, a couple of subdirectories were done in earlier patches. Scratch the last sentence. Can do on commit. > Patch

Re: [Qemu-block] [PATCH 0/7] sockets: Flatten SocketAddress except in external interfaces

2017-04-28 Thread Markus Armbruster
Markus Armbruster writes: > SocketAddress is a simple union, and simple unions are awkward: they > have their variant members wrapped in a "data" object on the wire, and > require additional indirections in C. Flatten it as follows: rename > SocketAddress to