[Qemu-devel] [PATCH v10 1/9] mirror: inherit supported write/zero flags

2018-12-03 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- block/mirror.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 56d9ef7474..56908c9b19 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1528,8 +1528,12 @@ static void mirror_start_job(const char

[Qemu-devel] [PATCH v10 3/9] quorum: set supported write flags

2018-12-03 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- block/quorum.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/block/quorum.c b/block/quorum.c index 16b3c8067c..d21a6a3b8e 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -857,6 +857,19 @@ static QemuOptsList

[Qemu-devel] [PATCH v10 9/9] iotest 134: test cluster-misaligned encrypted write

2018-12-03 Thread Anton Nefedov
COW (even empty/zero) areas require encryption too Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- tests/qemu-iotests/134 | 9 + tests/qemu-iotests/134.out | 10 ++ 2 files changed, 19 insertions(+) diff --git

[Qemu-devel] [PATCH v10 0/9] qcow2: cluster space preallocation

2018-12-03 Thread Anton Nefedov
61.153 | 36.313 | 41% | |hdd| 112.676 | 122.056 | -8% | +---+--+--+------+ Anton Nefedov (9): mirror: inherit supported write/zero flags blkverify: set supported write/zero flags quorum: set supported write flags bloc

[Qemu-devel] [PATCH v10 5/9] block: treat BDRV_REQ_ALLOCATE as serialising

2018-12-03 Thread Anton Nefedov
request is in flight already. Return EAGAIN, let the caller reconsider. Signed-off-by: Anton Nefedov --- block/io.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/block/io.c b/block/io.c index d9d7644858..6ff946f63d 100644 --- a/block

[Qemu-devel] [PATCH v10 2/9] blkverify: set supported write/zero flags

2018-12-03 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- block/blkverify.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index 89bf4386e3..bb52596cbb 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -141,8 +141,14 @@ static int

[Qemu-devel] [PATCH v10 4/9] block: introduce BDRV_REQ_ALLOCATE flag

2018-12-03 Thread Anton Nefedov
the common block layer (so it will not fall back to any slowpath (like writing zero buffers) in case the driver does not support the flag). Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- include/block/block.h | 9 - include/block/block_int.h | 2 +- block/io.c

[Qemu-devel] [PATCH v10 6/9] file-posix: support BDRV_REQ_ALLOCATE

2018-12-03 Thread Anton Nefedov
Current write_zeroes implementation is good enough to satisfy this flag too Signed-off-by: Anton Nefedov --- block/file-posix.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index 07bbdab953..b0b7ab0159 100644 --- a/block/file

[Qemu-devel] [PATCH v10 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-12-03 Thread Anton Nefedov
anymore. Use a backing image instead. Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- qapi/block-core.json | 4 +- block/qcow2.h | 6 +++ block/qcow2-cluster.c | 2 +- block/qcow2.c | 80 +- block/trace-events

[Qemu-devel] [PATCH v6 6/9] scsi: move unmap error checking to the complete callback

2018-11-30 Thread Anton Nefedov
in blk_aio() functions anyway. Same approach is already used for emulate_write_same. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-d

[Qemu-devel] [PATCH v6 8/9] file-posix: account discard operations

2018-11-30 Thread Anton Nefedov
numbers will not include discards triggered by write-zeroes + MAY_UNMAP calls. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/file-posix.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/block/file-posix.c b/block

[Qemu-devel] [PATCH v6 2/9] qapi: add unmap to BlockDeviceStats

2018-11-30 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake --- qapi/block-core.json | 29 +++-- include/block/accounting.h | 1 + block/qapi.c | 6 ++ tests/qemu-iotests/227.out

[Qemu-devel] [PATCH v6 1/9] qapi: group BlockDeviceStats fields

2018-11-30 Thread Anton Nefedov
Make the stat fields definition slightly more readable. Also reorder total_time_ns stats read-write-flush as done elsewhere. Cosmetic change only. Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 26

[Qemu-devel] [PATCH v6 7/9] scsi: account unmap operations

2018-11-30 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy --- hw/scsi/scsi-disk.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index daf37d117c..3968fc6fac 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi

[Qemu-devel] [PATCH v6 5/9] scsi: store unmap offset and nb_sectors in request struct

2018-11-30 Thread Anton Nefedov
it allows to report it in the error handler Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c

[Qemu-devel] [PATCH v6 9/9] qapi: query-blockstat: add driver specific file-posix stats

2018-11-30 Thread Anton Nefedov
A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports discard statistics Signed-off-by: Anton Nefedov --- qapi/block-core.json | 38 ++ include/block/block.h | 1 + include/block/block_int.h | 1

[Qemu-devel] [PATCH v6 0/9] discard blockstats

2018-11-30 Thread Anton Nefedov
ations": 0, "rd_operations": 4816, "account_failed": true, > "unmap_merged": 0, "wr_total_time_ns": 1262686124, "invalid_rd_operations": 0 }, "parent": { > "driver-specif

[Qemu-devel] [PATCH v6 3/9] block: add empty account cookie type

2018-11-30 Thread Anton Nefedov
ounting separately. Signed-off-by: Anton Nefedov --- include/block/accounting.h | 1 + block/accounting.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/block/accounting.h b/include/block/accounting.h index ba8b04d572..878b4c3581 100644 --- a/include/block/accounting.h +

[Qemu-devel] [PATCH v6 4/9] ide: account UNMAP (TRIM) operations

2018-11-30 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy --- hw/ide/core.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 04e22e751d..8da77ff3e3 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -441,6 +441,14 @@ static void

Re: [Qemu-devel] [PATCH v5 9/9] qapi: query-blockstat: add driver specific file-posix stats

2018-11-26 Thread Anton Nefedov
On 23/11/2018 10:21 PM, Vladimir Sementsov-Ogievskiy wrote: > 31.10.2018 14:35, Anton Nefedov wrote: >> A block driver can provide a callback to report driver-specific >> statistics. >> >> file-posix driver now reports discard statistics >> >> Signed-off-by:

Re: [Qemu-devel] [PATCH v5 7/9] scsi: account unmap operations

2018-11-26 Thread Anton Nefedov
On 23/11/2018 9:25 PM, Vladimir Sementsov-Ogievskiy wrote: > 31.10.2018 14:34, Anton Nefedov wrote: >> Signed-off-by: Anton Nefedov > > > Reviewed-by: Vladimir Sementsov-Ogievskiy > > but be careful: on git am, the chunk about read-only case goes into > scsi_disk

Re: [Qemu-devel] [PATCH v5 3/9] block: add empty account cookie type

2018-11-26 Thread Anton Nefedov
On 23/11/2018 7:04 PM, Vladimir Sementsov-Ogievskiy wrote: > 31.10.2018 14:34, Anton Nefedov wrote: >> This adds some protection from accounting unitialized cookie. > > uninitialized > fixed >> That is, block_acct_failed/done without previous block_acct_start;

[Qemu-devel] [PATCH v5 5/9] scsi: store unmap offset and nb_sectors in request struct

2018-10-31 Thread Anton Nefedov
it allows to report it in the error handler Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c

[Qemu-devel] [PATCH v5 7/9] scsi: account unmap operations

2018-10-31 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- hw/scsi/scsi-disk.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index e132504913..dee71f9dde 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1663,10 +1663,16 @@ static

[Qemu-devel] [PATCH v5 6/9] scsi: move unmap error checking to the complete callback

2018-10-31 Thread Anton Nefedov
in blk_aio() functions anyway. Same approach is already used for emulate_write_same. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-d

[Qemu-devel] [PATCH v5 9/9] qapi: query-blockstat: add driver specific file-posix stats

2018-10-31 Thread Anton Nefedov
A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports discard statistics Signed-off-by: Anton Nefedov --- qapi/block-core.json | 39 +++ include/block/block.h | 1 + include/block/block_int.h | 1

[Qemu-devel] [PATCH v5 8/9] file-posix: account discard operations

2018-10-31 Thread Anton Nefedov
numbers will not include discards triggered by write-zeroes + MAY_UNMAP calls. Signed-off-by: Anton Nefedov --- block/file-posix.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 2da3a76355..1a7126046c

[Qemu-devel] [PATCH v5 3/9] block: add empty account cookie type

2018-10-31 Thread Anton Nefedov
ounting separately. Signed-off-by: Anton Nefedov --- include/block/accounting.h | 1 + block/accounting.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/block/accounting.h b/include/block/accounting.h index ba8b04d572..878b4c3581 100644 --- a/include/block/accounting.h +

[Qemu-devel] [PATCH v5 4/9] ide: account UNMAP (TRIM) operations

2018-10-31 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- hw/ide/core.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 04e22e751d..8da77ff3e3 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -441,6 +441,14 @@ static void ide_issue_trim_cb(void *opaque, int ret

[Qemu-devel] [PATCH v5 2/9] qapi: add unmap to BlockDeviceStats

2018-10-31 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake --- qapi/block-core.json | 29 +++-- include/block/accounting.h | 1 + block/qapi.c | 6 ++ tests/qemu-iotests/227.out

[Qemu-devel] [PATCH v5 0/9] discard blockstats

2018-10-31 Thread Anton Nefedov
": 143, "failed_wr_operations": 0, "rd_operations": 4816, "account_failed": true, > "unmap_merged": 0, "wr_total_time_ns": 1262686124, "invalid_rd_operations": 0 }, "par

[Qemu-devel] [PATCH v5 1/9] qapi: group BlockDeviceStats fields

2018-10-31 Thread Anton Nefedov
Make the stat fields definition slightly more readable. Also reorder total_time_ns stats read-write-flush as done elsewhere. Cosmetic change only. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-17 Thread Anton Nefedov
On 8/10/2018 7:43 PM, Kevin Wolf wrote: > Am 08.10.2018 um 18:04 hat Anton Nefedov geschrieben: >> >> >> On 8/10/2018 6:46 PM, Kevin Wolf wrote: >>> Am 08.10.2018 um 17:25 hat Anton Nefedov geschrieben: >>>> >>>> >>>> On 8/10/2018

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Anton Nefedov
On 8/10/2018 6:46 PM, Kevin Wolf wrote: > Am 08.10.2018 um 17:25 hat Anton Nefedov geschrieben: >> >> >> On 8/10/2018 6:03 PM, Kevin Wolf wrote: >>> Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: >>>> On 4/10/2018 6:33 PM, Kevin Wolf wrote: >

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Anton Nefedov
On 8/10/2018 6:03 PM, Kevin Wolf wrote: > Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: >> On 4/10/2018 6:33 PM, Kevin Wolf wrote: >>> Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >>>> Signed-off-by: Anton Nefedov >>>> Reviewed-by: Albe

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Anton Nefedov
On 4/10/2018 6:33 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >> Signed-off-by: Anton Nefedov >> Reviewed-by: Alberto Garcia >> --- >> hw/ide/core.c | 12 >> 1 file changed, 12 insertions(+) >> >&g

Re: [Qemu-devel] [PATCH v4 6/8] scsi: account unmap operations

2018-10-08 Thread Anton Nefedov
On 4/10/2018 6:47 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >> Signed-off-by: Anton Nefedov >> Reviewed-by: Vladimir Sementsov-Ogievskiy >> Reviewed-by: Alberto Garcia >> --- >> hw/scsi/scsi-disk.c | 9 - >&g

Re: [Qemu-devel] [PATCH v4 7/8] file-posix: account discard operations

2018-10-08 Thread Anton Nefedov
On 4/10/2018 6:52 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >> This will help to identify how many of the user-issued discard operations >> (accounted on a device level) have actually suceeded down on the host file >> (even though th

Re: [Qemu-devel] [PATCH v4 0/8] discard blockstats

2018-10-04 Thread Anton Nefedov
ping-2 On 18/9/2018 11:12 AM, Anton Nefedov wrote: > ping > > do you think we might proceed with this? or is there any general doubt > about the idea? > > thanks, > > On 21/8/2018 12:46 PM, Anton Nefedov wrote: >> new in v4: >> - patch 7: discard

Re: [Qemu-devel] [PATCH v4 0/8] discard blockstats

2018-09-18 Thread Anton Nefedov
ping do you think we might proceed with this? or is there any general doubt about the idea? thanks, On 21/8/2018 12:46 PM, Anton Nefedov wrote: new in v4: - patch 7: discard and write-zeroes code paths had been separated in 34fa110e: file-posix: Fix write_zeroes with unmap on

[Qemu-devel] [PATCH v4 8/8] qapi: query-blockstat: add driver specific file-posix stats

2018-08-21 Thread Anton Nefedov
A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports discard statistics Signed-off-by: Anton Nefedov --- qapi/block-core.json | 39 +++ include/block/block.h | 1 + include/block/block_int.h

[Qemu-devel] [PATCH v4 7/8] file-posix: account discard operations

2018-08-21 Thread Anton Nefedov
numbers will not include discards triggered by write-zeroes + MAY_UNMAP calls. Signed-off-by: Anton Nefedov --- block/file-posix.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index fe83cbf..c420f76 100644

[Qemu-devel] [PATCH v4 5/8] scsi: move unmap error checking to the complete callback

2018-08-21 Thread Anton Nefedov
in blk_aio() functions anyway. Same approach is already used for emulate_write_same. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-d

[Qemu-devel] [PATCH v4 4/8] scsi: store unmap offset and nb_sectors in request struct

2018-08-21 Thread Anton Nefedov
it allows to report it in the error handler Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c

[Qemu-devel] [PATCH v4 1/8] qapi: group BlockDeviceStats fields

2018-08-21 Thread Anton Nefedov
Make the stat fields definition slightly more readable. Also reorder total_time_ns stats read-write-flush as done elsewhere. Cosmetic change only. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git

[Qemu-devel] [PATCH v4 2/8] qapi: add unmap to BlockDeviceStats

2018-08-21 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake --- qapi/block-core.json | 29 +++-- include/block/accounting.h | 1 + block/qapi.c | 6 ++ 3 files changed, 30

[Qemu-devel] [PATCH v4 6/8] scsi: account unmap operations

2018-08-21 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 9d10daf..0aac137 100644 --- a/hw/scsi/scsi

[Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-08-21 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- hw/ide/core.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 2c62efc..352429b 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -440,6 +440,14 @@ static void ide_issue_trim_cb

[Qemu-devel] [PATCH v4 0/8] discard blockstats

2018-08-21 Thread Anton Nefedov
1506733, "wr_highest_offset": 13411741696, "wr_total_time_ns": 2212749334, "failed_wr_operations": 0, "failed_rd_operations": 0, "wr_merged": 0, "wr_bytes": 3426304, "timed_stats": [

Re: [Qemu-devel] [PATCH 0/7] discard blockstats

2018-08-20 Thread Anton Nefedov
On 17/8/2018 8:27 PM, Paolo Bonzini wrote: On 20/11/2017 17:50, Anton Nefedov wrote: qmp query-blockstats provides stats info for write/read/flush ops. Patches 1-5 implement the similar for discard (unmap) command for scsi and ide disks. Discard stat "unmap_ops / unmap_bytes" is s

[Qemu-devel] [PATCH v5 1/2] qapi: allow empty branches in flat unions

2018-06-18 Thread Anton Nefedov
options create redundant entities in qapi files for little profit. With this patch it is not necessary anymore to add designated union fields for every possible value of a discriminator enumeration. Signed-off-by: Anton Nefedov --- docs/devel/qapi-code-gen.txt| 8

[Qemu-devel] [PATCH v5 0/2] qapi: allow empty branches in flat unions

2018-06-18 Thread Anton Nefedov
v5: remarks for patch 1 fixed v4: http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg03638.html Anton Nefedov (2): qapi: allow empty branches in flat unions qapi: remove empty flat union branches and types docs/devel/qapi-code-gen.txt | 8 ++-- qapi/block

[Qemu-devel] [PATCH v5 2/2] qapi: remove empty flat union branches and types

2018-06-18 Thread Anton Nefedov
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov Reviewed-by: Markus Armbruster --- qapi/block-core.json | 52 +++- qapi/crypto.json | 13

Re: [Qemu-devel] [PATCH v4 1/2] qapi: allow empty branches in flat unions

2018-06-14 Thread Anton Nefedov
On 14/6/2018 10:19 AM, Markus Armbruster wrote: Anton Nefedov writes: It often happens that just a few discriminator values imply extra data in a flat union. Existing checks did not make possible to leave other values uncovered. Such cases had to be worked around by either stating a dummy

Re: [Qemu-devel] [PATCH v3 0/8] discard blockstats

2018-06-13 Thread Anton Nefedov
well, build tests failed due to the lack of qapi patches this series is based on :) (http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg03638.html) On 13/6/2018 9:44 PM, no-re...@patchew.org wrote: Hi, This series failed build test on s390x host. Please find the details below. Type: se

[Qemu-devel] [PATCH v3 8/8] qapi: query-blockstat: add driver specific file-posix stats

2018-06-13 Thread Anton Nefedov
A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports discard statistics Signed-off-by: Anton Nefedov --- qapi/block-core.json | 39 +++ include/block/block.h | 1 + include/block/block_int.h | 1

[Qemu-devel] [PATCH v3 7/8] file-posix: account discard operations

2018-06-13 Thread Anton Nefedov
This will help to identify how many of the user-issued discard operations (accounted on a device level) have actually suceeded down on the host file (even though the numbers will not be exactly the same if non-raw format driver is used (e.g. qcow2 sending metadata discards)). Signed-off-by: Anton

[Qemu-devel] [PATCH v3 3/8] ide: account UNMAP (TRIM) operations

2018-06-13 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- hw/ide/core.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 2c62efc..352429b 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -440,6 +440,14 @@ static void ide_issue_trim_cb(void *opaque, int ret

[Qemu-devel] [PATCH v3 6/8] scsi: account unmap operations

2018-06-13 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 0b68a8d..ed72662 100644 --- a/hw/scsi/scsi

[Qemu-devel] [PATCH v3 0/8] discard blockstats

2018-06-13 Thread Anton Nefedov
98002, "wr_operations": 143, "failed_wr_operations": 0, "rd_operations": 4816, "account_failed": true, > "unmap_merged": 0, "wr_total_time_ns": 1262686124, "invalid_rd_operations&qu

[Qemu-devel] [PATCH v3 5/8] scsi: move unmap error checking to the complete callback

2018-06-13 Thread Anton Nefedov
in blk_aio() functions anyway. Same approach is already used for emulate_write_same. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-d

[Qemu-devel] [PATCH v3 1/8] qapi: group BlockDeviceStats fields

2018-06-13 Thread Anton Nefedov
Make the stat fields definition slightly more readable. Also reorder total_time_ns stats read-write-flush as done elsewhere. Cosmetic change only. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions

[Qemu-devel] [PATCH v3 2/8] qapi: add unmap to BlockDeviceStats

2018-06-13 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake --- qapi/block-core.json | 29 +++-- include/block/accounting.h | 1 + block/qapi.c | 6 ++ 3 files changed, 30

[Qemu-devel] [PATCH v3 4/8] scsi: store unmap offset and nb_sectors in request struct

2018-06-13 Thread Anton Nefedov
it allows to report it in the error handler Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c

[Qemu-devel] [PATCH v4 1/2] qapi: allow empty branches in flat unions

2018-06-13 Thread Anton Nefedov
options create redundant entities in qapi files for little profit. With this patch it is not necessary anymore to add designated union fields for every possible value of a discriminator enumeration. Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake --- docs/devel/qapi-code-gen.txt

[Qemu-devel] [PATCH v4 2/2] qapi: remove empty flat union branches and types

2018-06-13 Thread Anton Nefedov
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 52 +++- qapi/crypto.json | 13 + qapi/misc.json

[Qemu-devel] [PATCH v4 0/2] qapi: allow empty branches in flat unions

2018-06-13 Thread Anton Nefedov
since v3: - patch 2 fixed: BlockdevQcow2Encryption::QCryptoBlockOptionsQCow deletion was a mistake v3: http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06836.html Anton Nefedov (2): qapi: allow empty branches in flat unions qapi: remove empty flat union branches and types

Re: [Qemu-devel] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats

2018-06-13 Thread Anton Nefedov
On 8/6/2018 8:29 AM, Markus Armbruster wrote: Eric Blake writes: On 06/07/2018 10:23 AM, Anton Nefedov wrote: If we introduce BlockdevDriver as a discriminator as Markus suggests above, we need some way to define its value. I guess one would be to check blk->bs->drv->format_na

Re: [Qemu-devel] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats

2018-06-07 Thread Anton Nefedov
On 7/6/2018 6:09 PM, Markus Armbruster wrote: Anton Nefedov writes: On 3/2/2018 6:59 PM, Markus Armbruster wrote: Eric Blake writes: On 01/19/2018 06:50 AM, Anton Nefedov wrote: A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports

Re: [Qemu-devel] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats

2018-06-07 Thread Anton Nefedov
On 3/2/2018 6:59 PM, Markus Armbruster wrote: Eric Blake writes: On 01/19/2018 06:50 AM, Anton Nefedov wrote: A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports discard statistics Signed-off-by: Anton Nefedov Reviewed-by: Vladimir

[Qemu-devel] [PATCH v3 2/2] qapi: remove empty flat union branches and types

2018-05-30 Thread Anton Nefedov
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake --- qapi/block-core.json | 55 qapi/crypto.json | 13

[Qemu-devel] [PATCH v3 1/2] qapi: allow empty branches in flat unions

2018-05-30 Thread Anton Nefedov
options create redundant entities in qapi files for little profit. With this patch it is not necessary anymore to add designated union fields for every possible value of a discriminator enumeration. Signed-off-by: Anton Nefedov --- docs/devel/qapi-code-gen.txt| 8

[Qemu-devel] [PATCH v3 0/2] qapi: allow empty branches in flat unions

2018-05-30 Thread Anton Nefedov
since v2: remarks addressed: - qapi-code-gen.txt comment added - negative testcase (which became positive) is removed, verification added to qapi-schema-test Anton Nefedov (2): qapi: allow empty branches in flat unions qapi: remove empty flat union branches and types docs/devel/qapi

[Qemu-devel] [PATCH v2 1/2] qapi: allow empty branches in flat unions

2018-05-29 Thread Anton Nefedov
options create redundant entities in qapi files for little profit. With this patch it is not necessary anymore to add designated union fields for every possible value of a discriminator enumeration. Signed-off-by: Anton Nefedov --- docs/devel/qapi-code-gen.txt| 7

[Qemu-devel] [PATCH v2 0/2] qapi: allow empty branches in flat unions

2018-05-29 Thread Anton Nefedov
since v1: - reworked to always allow empty branches - more types removed in patch 2 v1: http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg02525.html Anton Nefedov (2): qapi: allow empty branches in flat unions qapi: remove empty flat union branches and types docs/devel/qapi-code

[Qemu-devel] [PATCH v2 2/2] qapi: remove empty flat union branches and types

2018-05-29 Thread Anton Nefedov
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 55 qapi/crypto.json | 13 + qapi/misc.json

Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches

2018-05-18 Thread Anton Nefedov
On 18/5/2018 9:45 AM, Markus Armbruster wrote: Eric Blake writes: On 05/17/2018 03:05 AM, Markus Armbruster wrote: QAPI language design alternatives: 1. Having unions cover all discriminator values explicitly is useful. 2. Having unions repeat all the discriminator values explicitly is

Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches

2018-05-16 Thread Anton Nefedov
On 15/5/2018 8:40 PM, Markus Armbruster wrote: Eric Blake writes: On 05/15/2018 02:01 AM, Markus Armbruster wrote: QAPI language design alternatives: 1. Having unions cover all discriminator values explicitly is useful. 2. Having unions repeat all the discriminator values explicitly is

Re: [Qemu-devel] [PATCH v9 1/9] mirror: inherit supported write/zero flags

2018-05-15 Thread Anton Nefedov
On 15/5/2018 5:35 PM, Eric Blake wrote: On 05/08/2018 09:58 AM, Anton Nefedov wrote: diff --git a/block/mirror.c b/block/mirror.c index 820f512..a22ddef 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1098,6 +1098,15 @@ static BlockDriver bdrv_mirror_top = {   .bdrv_child_perm

[Qemu-devel] [PATCH 0/2] qapi: allow flat unions with empty branches

2018-05-11 Thread Anton Nefedov
hej, inspired by this thread http://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg04802.html Seems that nobody got around to this since (did anybody?), so I thought I'd give a try. There's a generator patch and usage example. Anton Nefedov (2): qapi: allow flat unions

[Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches

2018-05-11 Thread Anton Nefedov
The patch makes possible to avoid introducing dummy empty types for the flat union branches that have no data. Signed-off-by: Anton Nefedov --- scripts/qapi/common.py | 18 -- scripts/qapi/doc.py| 2 +- scripts/qapi/types.py | 2 +- scripts/qapi

[Qemu-devel] [PATCH 2/2] qapi: avoid empty CpuInfoOther type

2018-05-11 Thread Anton Nefedov
the patch provides an example of a previously introduced data-partial qapi union tag Signed-off-by: Anton Nefedov --- qapi/misc.json | 48 cpus.c | 2 -- 2 files changed, 4 insertions(+), 46 deletions(-) diff --git a/qapi/misc.json b

[Qemu-devel] [PATCH v9 5/9] block: treat BDRV_REQ_ALLOCATE as serialising

2018-05-08 Thread Anton Nefedov
request is in flight already. Return EAGAIN, let the caller reconsider. Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- block/io.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/block/io.c b/block/io.c index 660702a..a2fb69a

[Qemu-devel] [PATCH v9 6/9] file-posix: support BDRV_REQ_ALLOCATE

2018-05-08 Thread Anton Nefedov
Current write_zeroes implementation is good enough to satisfy this flag too Signed-off-by: Anton Nefedov --- block/file-posix.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index 3794c00..3795e1c 100644 --- a/block/file

[Qemu-devel] [PATCH v9 4/9] block: introduce BDRV_REQ_ALLOCATE flag

2018-05-08 Thread Anton Nefedov
the common block layer (so it will not fall back to any slowpath (like writing zero buffers) in case the driver does not support the flag). Signed-off-by: Anton Nefedov --- include/block/block.h | 8 +++- include/block/block_int.h | 2 +- block/io.c| 18

[Qemu-devel] [PATCH v9 7/9] block: support BDRV_REQ_ALLOCATE in passthrough drivers

2018-05-08 Thread Anton Nefedov
Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- block/blkdebug.c | 3 ++- block/blkverify.c | 2 +- block/mirror.c | 2 +- block/quorum.c | 3 ++- block/raw-format.c | 3 ++- 5 files changed, 8 insertions(+), 5

[Qemu-devel] [PATCH v9 3/9] quorum: set supported write/zero flags

2018-05-08 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- block/quorum.c | 20 1 file changed, 20 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index a5051da..26e7d78 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -867,6 +867,20 @@ static QemuOptsList

[Qemu-devel] [PATCH v9 9/9] iotest 134: test cluster-misaligned encrypted write

2018-05-08 Thread Anton Nefedov
COW (even empty/zero) areas require encryption too Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- tests/qemu-iotests/134 | 9 + tests/qemu-iotests/134.out | 10 ++ 2 files changed, 19 insertions(+) diff --git

[Qemu-devel] [PATCH v9 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-05-08 Thread Anton Nefedov
anymore. Use a backing image instead. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 4 ++- block/qcow2.h | 6 block/qcow2-cluster.c | 2 +- block/qcow2.c | 80 -- block/trace-events | 1

[Qemu-devel] [PATCH v9 2/9] blkverify: set supported write/zero flags

2018-05-08 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- block/blkverify.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/blkverify.c b/block/blkverify.c index 754cc9e..496ae09 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -141,6

[Qemu-devel] [PATCH v9 1/9] mirror: inherit supported write/zero flags

2018-05-08 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- block/mirror.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index 820f512..a22ddef 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1098,6 +1098,15 @@ static BlockDriver

[Qemu-devel] [PATCH v9 0/9] qcow2: cluster space preallocation

2018-05-08 Thread Anton Nefedov
hej, yet another respin of this series :) now as 2.12 is released v9: - fixed commentary wording in patches 4, 8 - rebased (no conflicts) v8: http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg03291.html Anton Nefedov (9): mirror: inherit supported write/zero flags blkverify

Re: [Qemu-devel] [PATCH v8 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-03-16 Thread Anton Nefedov
On 16/3/2018 4:58 PM, Alberto Garcia wrote: On Mon 12 Mar 2018 11:16:57 AM CET, Anton Nefedov wrote: --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2584,6 +2584,8 @@ # # @cor_write: a write due to copy-on-read (since 2.11) # +# @cluster_alloc_space: an allocation of a cluster

Re: [Qemu-devel] [PATCH v8 6/9] file-posix: support BDRV_REQ_ALLOCATE

2018-03-16 Thread Anton Nefedov
On 12/3/2018 1:16 PM, Anton Nefedov wrote: Current write_zeroes implementation is good enough to satisfy this flag too Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz strictly speaking this patch differs from v8 as well (rebase required an extra change

Re: [Qemu-devel] [PATCH v8 4/9] block: introduce BDRV_REQ_ALLOCATE flag

2018-03-16 Thread Anton Nefedov
On 16/3/2018 2:01 PM, Alberto Garcia wrote: On Mon 12 Mar 2018 11:16:53 AM CET, Anton Nefedov wrote: The flag is supposed to indicate that the region of the disk image has to be sufficiently allocated so it reads as zeroes. The call with the flag set must return -ENOTSUP if allocation cannot

Re: [Qemu-devel] [PATCH] iotests: Fix stuck NBD process on 33

2018-03-13 Thread Anton Nefedov
On 13/3/2018 12:12 AM, Max Reitz wrote: On 2018-03-12 22:11, Eric Blake wrote: Commit afe35cde6 added additional actions to test 33, but forgot to reset the image between tests. As a result, './check -nbd 33' fails because the qemu-nbd process from the first half is still occupying the port, pr

[Qemu-devel] [PATCH v8 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-03-12 Thread Anton Nefedov
anymore. Use a backing image instead. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 4 ++- block/qcow2.h | 6 block/qcow2-cluster.c | 2 +- block/qcow2.c | 79 -- block/trace-events | 1

[Qemu-devel] [PATCH v8 7/9] block: support BDRV_REQ_ALLOCATE in passthrough drivers

2018-03-12 Thread Anton Nefedov
Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia --- block/blkdebug.c | 3 ++- block/blkverify.c | 2 +- block/mirror.c | 2 +- block/quorum.c | 3 ++- block/raw-format.c | 3 ++- 5 files changed, 8 insertions(+), 5

[Qemu-devel] [PATCH v8 9/9] iotest 134: test cluster-misaligned encrypted write

2018-03-12 Thread Anton Nefedov
COW (even empty/zero) areas require encryption too Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- tests/qemu-iotests/134 | 9 + tests/qemu-iotests/134.out | 10 ++ 2 files changed, 19 insertions(+) diff --git

[Qemu-devel] [PATCH v8 4/9] block: introduce BDRV_REQ_ALLOCATE flag

2018-03-12 Thread Anton Nefedov
the common block layer (so it will not fall back to any slowpath (like writing zero buffers) in case the driver does not support the flag). Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- include/block/block.h | 8 +++- include/block

<    1   2   3   4   5   >