Re: [Qemu-block] [Qemu-devel] [PATCH v4 3/3] tests: in IDE and AHCI tests perform DMA write before flushing

2016-06-28 Thread Denis V. Lunev
On 06/28/2016 02:19 AM, John Snow wrote: On 06/27/2016 10:47 AM, Denis V. Lunev wrote: From: Evgeny Yakovlev Due to changes in flush behaviour clean disks stopped generating flush_to_disk events and IDE and AHCI tests that test flush commands started to fail. This

Re: [Qemu-block] [PATCH] quorum: Only compile when supported

2016-06-28 Thread Alberto Garcia
On Tue 28 Jun 2016 03:47:47 AM CEST, Fam Zheng wrote: > The qcrypto_hash_supports is actually a static check, determined at > compile time. Follow the block-job-$(CONFIG_FOO) convention for > consistency. > > Signed-off-by: Fam Zheng Oh, so we didn't see this

Re: [Qemu-block] [PATCH v4 1/3] block: ignore flush requests when storage is clean

2016-06-28 Thread Denis V. Lunev
On 06/28/2016 04:27 AM, Fam Zheng wrote: On Mon, 06/27 17:47, Denis V. Lunev wrote: From: Evgeny Yakovlev Some guests (win2008 server for example) do a lot of unnecessary flushing when underlying media has not changed. This adds additional overhead on host when

Re: [Qemu-block] [PATCH 1/1] mirror: fix request throttling in drive-mirror

2016-06-28 Thread Denis V. Lunev
On 06/22/2016 03:35 PM, Denis V. Lunev wrote: There are 2 deficiencies here: - mirror_iteration could start several requests inside. Thus we could simply have more in_flight requests than MAX_IN_FLIGHT. - keeping this in mind throttling in mirror_run which is checking s->in_flight ==

Re: [Qemu-block] [PATCH 1/1] block: fix return code for partial write for Linux AIO

2016-06-28 Thread Denis V. Lunev
On 06/23/2016 02:37 PM, Denis V. Lunev wrote: Partial write most likely means that there is not space rather than "something wrong happens". Thus it would be more natural to return ENOSPC rather than EINVAL. The problem actually happens with NBD server, which has reported EINVAL rather then

Re: [Qemu-block] [PATCH 1/1] block: fix return code for partial write for Linux AIO

2016-06-28 Thread Kevin Wolf
Am 23.06.2016 um 13:37 hat Denis V. Lunev geschrieben: > Partial write most likely means that there is not space rather than > "something wrong happens". Thus it would be more natural to return > ENOSPC rather than EINVAL. > > The problem actually happens with NBD server, which has reported

Re: [Qemu-block] [Qemu-devel] [PATCH v4 3/3] tests: in IDE and AHCI tests perform DMA write before flushing

2016-06-28 Thread Evgeny Yakovlev
On 28.06.2016 02:19, John Snow wrote: On 06/27/2016 10:47 AM, Denis V. Lunev wrote: From: Evgeny Yakovlev Due to changes in flush behaviour clean disks stopped generating flush_to_disk events and IDE and AHCI tests that test flush commands started to fail. This

Re: [Qemu-block] [PATCH] block/qcow2: Don't use cpu_to_*w()

2016-06-28 Thread Peter Maydell
On 20 June 2016 at 16:10, Max Reitz wrote: > On 16.06.2016 18:06, Peter Maydell wrote: >> Don't use the cpu_to_*w() functions, which we are trying to deprecate. >> Instead either just use cpu_to_*() to do the byteswap, or use >> st*_be_p() if we need to do the store somewhere

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: fix return code for partial write for Linux AIO

2016-06-28 Thread Denis V. Lunev
On 06/28/2016 05:22 PM, Eric Blake wrote: On 06/28/2016 05:21 AM, Denis V. Lunev wrote: On 06/23/2016 02:37 PM, Denis V. Lunev wrote: Partial write most likely means that there is not space rather than "something wrong happens". Thus it would be more natural to return ENOSPC rather than

Re: [Qemu-block] [PATCH] block/qcow2: Don't use cpu_to_*w()

2016-06-28 Thread Peter Maydell
On 28 June 2016 at 16:04, Kevin Wolf wrote: > Am 28.06.2016 um 16:17 hat Peter Maydell geschrieben: >> On 20 June 2016 at 16:10, Max Reitz wrote: >> > Thanks, applied to my block tree: >> > >> > https://github.com/XanClic/qemu/commits/block >> >> Ping? I

Re: [Qemu-block] [PATCH v5 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-06-28 Thread Vladimir Sementsov-Ogievskiy
On 03.06.2016 07:32, Fam Zheng wrote: HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before, an HBitmapIter is initialized in place,

Re: [Qemu-block] [PATCH] block/qcow2: Don't use cpu_to_*w()

2016-06-28 Thread Kevin Wolf
Am 28.06.2016 um 16:17 hat Peter Maydell geschrieben: > On 20 June 2016 at 16:10, Max Reitz wrote: > > Thanks, applied to my block tree: > > > > https://github.com/XanClic/qemu/commits/block > > Ping? I don't think this has made it into a pullreq yet, and it's > freeze day

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: fix return code for partial write for Linux AIO

2016-06-28 Thread Eric Blake
On 06/28/2016 05:21 AM, Denis V. Lunev wrote: > On 06/23/2016 02:37 PM, Denis V. Lunev wrote: >> Partial write most likely means that there is not space rather than >> "something wrong happens". Thus it would be more natural to return >> ENOSPC rather than EINVAL. >> >> The problem actually

Re: [Qemu-block] [PATCH v2 4/7] virtio: Use aio_set_event_notifier for aio vq

2016-06-28 Thread Stefan Hajnoczi
On Fri, Jun 24, 2016 at 08:39:31PM +0800, Fam Zheng wrote: Commit description? For example: Distinguish between virtqueue processing in the iohandler context and main loop AioContext. iohandler context is isolated from AioContexts and therefore does not run during aio_poll(). signature.asc

Re: [Qemu-block] About Cirrus VGA

2016-06-28 Thread Kevin Wolf
Am 28.06.2016 um 09:33 hat Zer0 geschrieben: > Hello, > > I'm a software engineer from china, recently when I debug the QEMU code got > some problem, after all my colleague can not solve the problem, I decide to > ask > some professional. > > 1.When i try to debug the cirrus_vga_mem_write(...)

Re: [Qemu-block] [PATCH v2 3/7] virtio: Introduce virtio_add_queue_aio

2016-06-28 Thread Stefan Hajnoczi
On Fri, Jun 24, 2016 at 08:39:30PM +0800, Fam Zheng wrote: > +VirtQueue *virtio_add_queue_aio(VirtIODevice *vdev, int queue_size, > +VirtIOHandleOutput handle_output) > +{ > +return virtio_add_queue_internal(vdev, queue_size, handle_output, true); > +} > + >

[Qemu-block] [PATCH 1/1] Improve block job rate limiting for small bandwidth values

2016-06-28 Thread Sascha Silbe
ratelimit_calculate_delay() previously reset the accounting every time slice, no matter how much data had been processed before. This had (at least) two consequences: 1. The minimum speed is rather large, e.g. 5 MiB/s for commit and stream. Not sure if there are real-world use cases where

Re: [Qemu-block] [PATCH v2 1/7] virtio-bus: Drop "set_handler" parameter

2016-06-28 Thread Stefan Hajnoczi
On Fri, Jun 24, 2016 at 08:39:28PM +0800, Fam Zheng wrote: > It always equals to assign now. > > Signed-off-by: Fam Zheng > --- > hw/virtio/virtio-bus.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio

2016-06-28 Thread Paolo Bonzini
On 28/06/2016 17:12, Stefan Hajnoczi wrote:\ > It's weird that virtio_add_queue_aio() doesn't take an AioContext. > > This change moves us one step closer to dropping dataplane-specific > code. The difference between dataplane and non-dataplane should simply > by the virtqueue's AioContext,

Re: [Qemu-block] [PATCH v5 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-06-28 Thread Vladimir Sementsov-Ogievskiy
On 28.06.2016 18:36, Vladimir Sementsov-Ogievskiy wrote: On 03.06.2016 07:32, Fam Zheng wrote: HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the

[Qemu-block] About Cirrus VGA

2016-06-28 Thread Zer0
Hello, I'm a software engineer from china, recently when I debug the QEMU code got some problem, after all my colleague can not solve the problem, I decide to ask some professional. 1.When i try to debug the cirrus_vga_mem_write(...) function, the addr(parameter) always bigger than 0x1, is

Re: [Qemu-block] [PATCH v5 07/10] hbitmap: serialization

2016-06-28 Thread Vladimir Sementsov-Ogievskiy
On 03.06.2016 07:32, Fam Zheng wrote: From: Vladimir Sementsov-Ogievskiy Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore

Re: [Qemu-block] [PATCH v2 2/7] virtio: Add typedef for handle_output

2016-06-28 Thread Stefan Hajnoczi
On Fri, Jun 24, 2016 at 08:39:29PM +0800, Fam Zheng wrote: > The function pointer signature has been repeated a few times, using a > typedef may make coding easier. > > Signed-off-by: Fam Zheng > --- > hw/virtio/virtio.c | 9 - > include/hw/virtio/virtio.h | 5

Re: [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio

2016-06-28 Thread Stefan Hajnoczi
On Fri, Jun 24, 2016 at 08:39:32PM +0800, Fam Zheng wrote: > AIO based handler is more appropriate here because it will then > cooperate with bdrv_drained_begin/end. It is needed by the coming > revert patch. > > Signed-off-by: Fam Zheng > --- > hw/block/virtio-blk.c | 2 +- >

Re: [Qemu-block] [PATCH v2 0/7] virtio: Merge virtio-{blk, scsi} host notifier handling paths

2016-06-28 Thread Stefan Hajnoczi
On Fri, Jun 24, 2016 at 08:39:27PM +0800, Fam Zheng wrote: > v2: Only convert virtio-{blk,scsi}. [Paolo] > > This series is based on top of Cornelia's > > [PATCH 0/6] virtio: refactor host notifiers > > The benifit is we don't use event_notifier_set_handler even in non-dataplane > now,

[Qemu-block] [PATCH] curl: Operate on zero-length file

2016-06-28 Thread Tomáš Golembiovský
This is an attempt to fix small bug 1596870. When creating new disk backed by remote file accessed via HTTPS and the backing file has zero length, qemu-img terminates with uniformative error message: qemu-img: disk.qcow2: CURL: Error opening file: While it may not make much sense to operate

[Qemu-block] [PATCH 0/1] Fix iotests race condition by fixing block job rate limiting

2016-06-28 Thread Sascha Silbe
qemu-iotests #141 is relying on the test being able to operate on a block job it just started before further progress is being made on this block job. This fails regularly on some hosts because the time slice is just 100ms and it often takes longer than that to start the additional processes

Re: [Qemu-block] [PATCH] curl: Operate on zero-length file

2016-06-28 Thread Kevin Wolf
Am 28.06.2016 um 12:37 hat Tomáš Golembiovský geschrieben: > This is an attempt to fix small bug 1596870. > > When creating new disk backed by remote file accessed via HTTPS and the > backing file has zero length, qemu-img terminates with uniformative > error message: > > qemu-img:

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] drive-mirror: limit niov to MAX_IOV

2016-06-28 Thread John Snow
Ping, all good? Jeff Cody, I think this is yours? On 06/22/2016 03:51 PM, John Snow wrote: > e5b43573 caused a regression in the preparation of our IO vectors, such > that if a small granularity but a large buffer size is chosen, we may > accidentally exceed MAX_IOV and the request will fail. >

Re: [Qemu-block] [Qemu-devel] [PATCH v4 3/3] tests: in IDE and AHCI tests perform DMA write before flushing

2016-06-28 Thread John Snow
On 06/28/2016 05:21 AM, Evgeny Yakovlev wrote: > > On 28.06.2016 02:19, John Snow wrote: >> >> On 06/27/2016 10:47 AM, Denis V. Lunev wrote: >>> From: Evgeny Yakovlev >>> >>> Due to changes in flush behaviour clean disks stopped generating >>> flush_to_disk events and

Re: [Qemu-block] [PATCH 2/3] ide: ignore retry_unit check for non-retry operations

2016-06-28 Thread Paolo Bonzini
On 24/06/2016 17:06, Denis V. Lunev wrote: > When doing DMA request ide/core.c will set s->retry_unit to s->unit in > ide_start_dma. When dma completes ide_set_inactive sets retry_unit to -1. > After that ide_flush_cache runs and fails thanks to blkdebug. > ide_flush_cb calls ide_handle_rw_error

Re: [Qemu-block] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-28 Thread Stefan Hajnoczi
On Tue, Jun 21, 2016 at 11:21:17AM +0200, Kevin Wolf wrote: > This series converts all I/O function in the core block layer up to > bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter > instead of a BlockDriverState. > > The original motivation for this change were op

Re: [Qemu-block] [PATCH 1/3] block: ignore flush requests when storage is clean

2016-06-28 Thread Paolo Bonzini
On 24/06/2016 17:06, Denis V. Lunev wrote: > From: Evgeny Yakovlev > > Some guests (win2008 server for example) do a lot of unnecessary > flushing when underlying media has not changed. This adds additional > overhead on host when calling fsync/fdatasync. > > This

Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/3] block: ignore flush requests when storage is clean

2016-06-28 Thread Fam Zheng
On Tue, 06/28 12:10, Denis V. Lunev wrote: > On 06/28/2016 04:27 AM, Fam Zheng wrote: > > On Mon, 06/27 17:47, Denis V. Lunev wrote: > > > From: Evgeny Yakovlev > > > > > > Some guests (win2008 server for example) do a lot of unnecessary > > > flushing when underlying

[Qemu-block] [PULL 06/10] mirror: clarify mirror_do_read return code

2016-06-28 Thread Jeff Cody
From: John Snow mirror_do_read intends to return the number of sectors processed after the starting sector, without regard to how many sectors were processed before the starting sector due to alignment. Clean up the comments and code to hopefully illustrate this more clearly.

[Qemu-block] [PULL 03/10] block/nfs: add support for libnfs pagecache

2016-06-28 Thread Jeff Cody
From: Peter Lieven upcoming libnfs will have support for a read cache that can significantly help to speed up requests since libnfs by design circumvents the kernel cache. Example: qemu -cdrom nfs://127.0.0.1/iso/my.iso?pagecache=1024 The pagecache parameters takes the maximum

[Qemu-block] [PULL 05/10] block/gluster: add support for selecting debug logging level

2016-06-28 Thread Jeff Cody
This adds commandline support for the logging level of the gluster protocol driver, output to stdout. The option is 'debug', e.g.: -drive filename=gluster://192.168.15.180/gv2/test.qcow2,debug=9 Debug levels are 0-9, with 9 being the most verbose, and 0 representing no debugging output. The

[Qemu-block] [PULL 02/10] block/nfs: refuse readahead if cache.direct is on

2016-06-28 Thread Jeff Cody
From: Peter Lieven if we open a NFS export with disabled cache we should refuse the readahead feature as it will cache data inside libnfs. If a export was opened with readahead enabled it should futher not be allowed to disable the cache while running. Cc: qemu-sta...@nongnu.org

[Qemu-block] [PULL 00/10] Block patches

2016-06-28 Thread Jeff Cody
The following changes since commit d7f30403576f04f1f3a5fb5a1d18cba8dfa7a6d2: cputlb: don't cpu_abort() if guest tries to execute outside RAM or RAM (2016-06-28 18:50:53 +0100) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request for

[Qemu-block] [PULL 04/10] mirror: fix trace_mirror_yield_in_flight usage in mirror_iteration()

2016-06-28 Thread Jeff Cody
From: "Denis V. Lunev" trace_mirror_yield_in_flight accepts 2nd arguments in sectors while here we pass chunks instead. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake Message-id: 1466518157-27140-1-git-send-email-...@openvz.org CC:

[Qemu-block] [PULL 10/10] mirror: fix misleading comments

2016-06-28 Thread Jeff Cody
From: Changlong Xie s/target bs/to_replace/, also we check to_replace bs is not blocked in qmp_drive_mirror() not here Signed-off-by: Changlong Xie Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi

[Qemu-block] [PULL 08/10] iotests: add small-granularity mirror test

2016-06-28 Thread Jeff Cody
From: John Snow Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Message-id: 1466625064-11280-4-git-send-email-js...@redhat.com Signed-off-by: Jeff Cody ---

[Qemu-block] [PULL 09/10] blockjob: assert(cb) when create job

2016-06-28 Thread Jeff Cody
From: Changlong Xie Callback for block job should always exist Suggested-by: Paolo Bonzini Suggested-by: Kevin Wolf Signed-off-by: Changlong Xie Reviewed-by: Fam Zheng Reviewed-by:

Re: [Qemu-block] [PATCH 0/3] drive-mirror: limit niov to MAX_IOV

2016-06-28 Thread Jeff Cody
On Wed, Jun 22, 2016 at 03:51:01PM -0400, John Snow wrote: > e5b43573 caused a regression in the preparation of our IO vectors, such > that if a small granularity but a large buffer size is chosen, we may > accidentally exceed MAX_IOV and the request will fail. > > This has been fixed before in