Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread QingFeng Hao
在 2017/7/4 22:04, Christian Borntraeger 写道: On 07/04/2017 03:23 PM, QingFeng Hao wrote: This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c ("virtio-pci: use ioeventfd even when KVM is disabled") Do not check kvm_eventfds_enabled() when KVM is disabled since it al

[Qemu-block] [PATCH 30/35] block-backend: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 36 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 1e05281ff

[Qemu-block] [PATCH 35/35] vpc: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vpc.c b/block/vpc.c index 4240ba9d1c..1b4aba20bd 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -872,7 +872,8 @@ static int create_fixed_disk(BlockBackend *blk, uint8_t *bu

[Qemu-block] [PATCH 29/35] block: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/blkdebug.c | 15 ++- block/blkverify.c | 3 ++- block/io.c| 9 ++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index a1b24b9b0d..d55e2e69c8 100644 --- a/block/blkdebug.c

[Qemu-block] [PATCH 31/35] parallels: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index 8be46a7d48..213e42b9d2 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -472,7 +472,8 @@ static int parallels_check(Blo

[Qemu-block] [PATCH 33/35] vdi: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vdi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index 79af47763b..53cd7f64d8 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -716,7 +716,8 @@ vdi_co_pwritev(BlockDriverState *bs, uint64_t offset, uint6

[Qemu-block] [PATCH 22/35] sheepdog: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/sheepdog.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 83bc43dde4..64ff275db9 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -481,7 +481,8 @@ static inline AIO

[Qemu-block] [PATCH 34/35] vhdx: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vhdx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vhdx.c b/block/vhdx.c index 8b270b57c9..56b54f3ed7 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1787,7 +1787,8 @@ exit: *. ~ --- ~ ~ ---

[Qemu-block] [PATCH 26/35] iscsi: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/iscsi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 54067e2620..e16311cb4a 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1005,7 +1005,8 @@ static void iscsi_ioctl_handle_emulated(Iscs

[Qemu-block] [PATCH 25/35] mirror: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/mirror.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 68744a17e8..2f0a9946d9 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -224,7 +224,8 @@ static int mirror_cow_align(Mi

[Qemu-block] [PATCH 32/35] qed: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/qed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/qed.c b/block/qed.c index 385381a78a..dd2859a1c9 100644 --- a/block/qed.c +++ b/block/qed.c @@ -622,7 +622,8 @@ out: return ret; } -static int bdrv_qed_create(const

[Qemu-block] [PATCH 17/35] curl: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2439..d3719dc086 100644 --- a/block/curl.c +++ b/block/curl.c @@ -855,7 +855,8 @@ out_noclean: return -EINVAL; } -static void cur

[Qemu-block] [PATCH 27/35] file-posix: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/file-posix.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 3927fabf06..adafbbb6a0 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1483,7 +1483,8 @@ static i

[Qemu-block] [PATCH 12/35] raw: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/raw-format.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/raw-format.c b/block/raw-format.c index 0d185fe41b..402d3b9fba 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -361,7 +361,8 @@ static void raw_lock_

[Qemu-block] [PATCH 19/35] nfs: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/nfs.c b/block/nfs.c index c3c5de0113..3f393a95a4 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -679,7 +679,8 @@ static QemuOptsList nfs_create_opts = { } }; -static

[Qemu-block] [PATCH 18/35] gluster: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/gluster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/gluster.c b/block/gluster.c index addceed6eb..dea8ab43a5 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -965,7 +965,8 @@ static coroutine_fn int qemu_gluster_co

[Qemu-block] [PATCH 16/35] crypto: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/crypto.c b/block/crypto.c index 10e5ddccaa..0e30a4ea06 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -568,7 +568,8 @@ static int block_crypto_open_luks(BlockDriver

[Qemu-block] [PATCH 09/35] block: bdrv_create() and bdrv_debug_event() are coroutine_fn

2017-07-04 Thread Marc-André Lureau
Called from coroutine. Signed-off-by: Marc-André Lureau --- include/block/block_int.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 93eb2a9528..a183c72b7c 100644 --- a/include/block/block_int.h +++ b/include/bl

[Qemu-block] [PATCH 13/35] nbd: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/nbd-client.h | 10 +- block/nbd-client.c | 24 block/nbd.c| 3 ++- nbd/server.c | 3 ++- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/block/nbd-client.h b/block/nbd-client.h index 49636

[Qemu-block] [PATCH 24/35] null: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/null.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/block/null.c b/block/null.c index 876f90965b..4c8afe16d7 100644 --- a/block/null.c +++ b/block/null.c @@ -167,7 +167,8 @@ static inline BlockAIOCB *null_aio_common(BlockD

[Qemu-block] [PATCH 23/35] ssh: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/ssh.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index 52964416da..03a8ebe6f7 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -813,7 +813,8 @@ static QemuOptsList ssh_create_opts = { } }; -st

[Qemu-block] [PATCH 10/35] vmdk: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/vmdk.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 55581b03fe..f8422e8971 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1334,7 +1334,8 @@ static int64_t coroutine_fn vmdk_co_get_b

[Qemu-block] [PATCH 20/35] quorum: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/quorum.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 55ba916655..b086d70daa 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -264,7 +264,8 @@ static void quorum_r

[Qemu-block] [PATCH 21/35] rbd: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/rbd.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 9da02cdceb..7b4d548cd2 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -348,7 +348,8 @@ static QemuOptsList runtime_opts = { },

[Qemu-block] [PATCH 15/35] backup: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/block/block_backup.h | 4 ++-- block/backup.c | 9 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/block/block_backup.h b/include/block/block_backup.h index 8a759477a3..415cf8519d 100644 --- a/include/bloc

[Qemu-block] [PATCH 11/35] qcow2: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- block/qcow2.h | 6 -- block/qcow.c | 4 +++- block/qcow2-cluster.c | 11 +++ block/qcow2.c | 15 ++- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 87b15eb

[Qemu-block] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn

2017-07-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/block/block_int.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 15fa602150..93eb2a9528 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @

[Qemu-block] [PATCH 02/35] WIP: coroutine: manually tag the fast-paths

2017-07-04 Thread Marc-André Lureau
Some functions are both regular and coroutine. They may call coroutine functions in some cases, if it is known to be running in a coroutine. Signed-off-by: Marc-André Lureau --- block.c | 2 ++ block/block-backend.c | 2 ++ block/io.c | 16 +++- block

[Qemu-block] [PATCH 07/35] blockjob: mark coroutine_fn

2017-07-04 Thread Marc-André Lureau
/home/elmarco/src/qemu/blockjob.c:820:9: error: calling function 'qemu_coroutine_yield' requires holding role '_coroutine_fn' exclusively [-Werror,-Wthread-safety-analysis] qemu_coroutine_yield(); ^ /home/elmarco/src/qemu/blockjob.c:824:5: error: calling function 'block_job_pause

Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/2] live-block-ops.txt: Rename, rewrite, and improve it

2017-07-04 Thread Kashyap Chamarthy
On Wed, Jun 28, 2017 at 03:33:49PM -0500, Eric Blake wrote: > On 06/28/2017 03:15 PM, Alberto Garcia wrote: > > On Wed 28 Jun 2017 04:58:00 PM CEST, Kashyap Chamarthy wrote: > >> This patch documents (including their QMP invocations) all the four > >> major kinds of live block operations: > >> > >>

Re: [Qemu-block] [PATCH v3 05/20] commit: Switch commit_populate() to byte-based

2017-07-04 Thread Kevin Wolf
Am 27.06.2017 um 21:24 hat Eric Blake geschrieben: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Start by converting an > internal function (no semantic change). > > Signed-off-by: Eric Blake > Reviewed-by: John Snow Reviewed-by

Re: [Qemu-block] [PATCH v3 06/20] commit: Switch commit_run() to byte-based

2017-07-04 Thread Kevin Wolf
Am 27.06.2017 um 21:24 hat Eric Blake geschrieben: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Change the internal > loop iteration of committing to track by bytes instead of sectors > (although we are still guaranteed that we ite

Re: [Qemu-block] [PATCH v3 02/20] trace: Show blockjob actions via bytes, not sectors

2017-07-04 Thread Kevin Wolf
Am 27.06.2017 um 21:24 hat Eric Blake geschrieben: > Upcoming patches are going to switch to byte-based interfaces > instead of sector-based. Even worse, trace_backup_do_cow_enter() > had a weird mix of cluster and sector indices. > > The trace interface is low enough that there are no stability

Re: [Qemu-block] [PATCH v3 03/20] stream: Switch stream_populate() to byte-based

2017-07-04 Thread Kevin Wolf
Am 27.06.2017 um 21:24 hat Eric Blake geschrieben: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Start by converting an > internal function (no semantic change). > > Signed-off-by: Eric Blake > Reviewed-by: John Snow Reviewed-by

Re: [Qemu-block] [PATCH v3 01/20] blockjob: Track job ratelimits via bytes, not sectors

2017-07-04 Thread Kevin Wolf
Am 27.06.2017 um 21:24 hat Eric Blake geschrieben: > The user interface specifies job rate limits in bytes/second. > It's pointless to have our internal representation track things > in sectors/second, particularly since we want to move away from > sector-based interfaces. > > Fix up a doc typo fo

Re: [Qemu-block] [PATCH v3 04/20] stream: Switch stream_run() to byte-based

2017-07-04 Thread Kevin Wolf
Am 27.06.2017 um 21:24 hat Eric Blake geschrieben: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Change the internal > loop iteration of streaming to track by bytes instead of sectors > (although we are still guaranteed that we iter

Re: [Qemu-block] [PATCH v2] blockdev: Print a warning for legacy drive options that belong to -device

2017-07-04 Thread Kevin Wolf
Am 12.05.2017 um 12:33 hat Thomas Huth geschrieben: > We likely do not want to carry these legacy -drive options along forever. > Let's emit a deprecation warning for the -drive options that have a > replacement with the -device option, so that the (hopefully few) remaining > users are aware of thi

Re: [Qemu-block] [PATCH v3 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread Cornelia Huck
On Tue, 4 Jul 2017 10:32:31 +0200 QingFeng Hao wrote: > This patch is based on a similar patch from Stefan Hajnoczi - > commit c324fd0a39c (" virtio-pci: use ioeventfd even when KVM is disabled) > > Do not check kvm_eventfds_enabled() when KVM is disabled since it > always returns 0. Since com

Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread Christian Borntraeger
On 07/04/2017 03:23 PM, QingFeng Hao wrote: > This patch is based on a similar patch from Stefan Hajnoczi - > commit c324fd0a39c ("virtio-pci: use ioeventfd even when KVM is disabled") > > Do not check kvm_eventfds_enabled() when KVM is disabled since it > always returns 0. Since commit 8c56c1a59

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: delete the -e and -6 options from the 'create' command

2017-07-04 Thread Kashyap Chamarthy
On Tue, Jul 04, 2017 at 11:34:27AM +0100, Daniel P. Berrange wrote: > The '-e' and '-6' options to the 'create' command were "deprecated" > in favour of the more generic '-o' option many years ago: > > commit eec77d9e712bd4157a4e1c0b5a9249d168add738 > Author: Jes Sorensen > Date: Tue Dec

[Qemu-block] [PATCH v4 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread QingFeng Hao
This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c ("virtio-pci: use ioeventfd even when KVM is disabled") Do not check kvm_eventfds_enabled() when KVM is disabled since it always returns 0. Since commit 8c56c1a592b5092d91da8d8943c1d6462a6f ("memory: emulate ioev

[Qemu-block] [PATCH v4 0/1] virtio-scsi-ccw: fix iotest 068 for s390x

2017-07-04 Thread QingFeng Hao
This commit fixes iotest 068 for s390x as s390x uses virtio-scsi-ccw. It's based on commit c324fd0a39c by Stefan Hajnoczi. Thanks! Change history: v4: Got Cornelia Huck's Reviewed-by and take the comment to change the commit message. v3: Take Christian Borntraeger and Cornelia Huck's

Re: [Qemu-block] [PATCH v2] qemu-img: drop -e and -6 options from the 'create' & 'convert' commands

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 14:30 hat Daniel P. Berrange geschrieben: > The '-e' and '-6' options to the 'create' & 'convert' commands were > "deprecated" in favour of the more generic '-o' option many years ago: > > commit eec77d9e712bd4157a4e1c0b5a9249d168add738 > Author: Jes Sorensen > Date: Tue

[Qemu-block] [PATCH v2] qemu-img: drop -e and -6 options from the 'create' & 'convert' commands

2017-07-04 Thread Daniel P. Berrange
The '-e' and '-6' options to the 'create' & 'convert' commands were "deprecated" in favour of the more generic '-o' option many years ago: commit eec77d9e712bd4157a4e1c0b5a9249d168add738 Author: Jes Sorensen Date: Tue Dec 7 17:44:34 2010 +0100 qemu-img: Deprecate obsolete -6 and -e o

Re: [Qemu-block] [PATCH] qemu-img: delete the -e and -6 options from the 'create' command

2017-07-04 Thread Daniel P. Berrange
On Tue, Jul 04, 2017 at 02:16:06PM +0200, Kevin Wolf wrote: > Am 04.07.2017 um 12:34 hat Daniel P. Berrange geschrieben: > > The '-e' and '-6' options to the 'create' command were "deprecated" > > in favour of the more generic '-o' option many years ago: > > > > commit eec77d9e712bd4157a4e1c0b5a

Re: [Qemu-block] [PATCH] qemu-img: delete the -e and -6 options from the 'create' command

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 12:34 hat Daniel P. Berrange geschrieben: > The '-e' and '-6' options to the 'create' command were "deprecated" > in favour of the more generic '-o' option many years ago: > > commit eec77d9e712bd4157a4e1c0b5a9249d168add738 > Author: Jes Sorensen > Date: Tue Dec 7 17:44:3

Re: [Qemu-block] [RFC PATCH v2 16/15] block: Add .bdrv_co_block_status() callback

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:20, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Now that the block layer exposes byte-based allocation, > it's time to tackle the drivers. Add a new callback that operates > on as small as byte boundaries. Subsequent patches

[Qemu-block] [PATCH] qemu-img: delete the -e and -6 options from the 'create' command

2017-07-04 Thread Daniel P. Berrange
The '-e' and '-6' options to the 'create' command were "deprecated" in favour of the more generic '-o' option many years ago: commit eec77d9e712bd4157a4e1c0b5a9249d168add738 Author: Jes Sorensen Date: Tue Dec 7 17:44:34 2010 +0100 qemu-img: Deprecate obsolete -6 and -e options Excep

Re: [Qemu-block] [PATCH v3 4/4] block: Add default implementations for bdrv_co_get_block_status()

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben: > bdrv_co_get_block_status_from_file() and > bdrv_co_get_block_status_from_backing() set *file to bs->file and > bs->backing respectively, so that bdrv_co_get_block_status() can recurse > to them. Future block drivers won't have to duplica

Re: [Qemu-block] [PATCH v3 3/4] block: Remove bdrv_truncate callback in blkdebug

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben: > Now that bdrv_truncate is passed to bs->file by default, remove the > callback from block/blkdebug.c > > Signed-off-by: Manos Pitsidianakis We'll need to set .is_filter = true for blkdebug now. I haven't yet looked into the existing i

Re: [Qemu-block] [PATCH v4 1/2] live-block-ops.txt: Rename, rewrite, and improve it

2017-07-04 Thread Kashyap Chamarthy
On Thu, Jun 29, 2017 at 02:28:55PM +0200, Alberto Garcia wrote: > On Wed 28 Jun 2017 04:58:00 PM CEST, Kashyap Chamarthy wrote: > > +Once a 'mirror' job has started, there are two possible actions when a > > +``drive-mirror`` job is active: > > + > > +1. Issuing the command ``block-job-cancel``: wi

Re: [Qemu-block] [PATCH v3 2/4] block: Use defaults of bdrv_* callbacks in raw

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben: > Now that passing the call to bs->file is the default for some bdrv_* > callbacks, remove the duplicate implementations in block/raw-format.c > > Reviewed-by: Eric Blake > Signed-off-by: Manos Pitsidianakis If you change patch 1 as su

Re: [Qemu-block] [Qemu-devel] [PATCH v2 15/15] qemu-io: Relax 'alloc' now that block-status doesn't assert

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > Previously, the alloc command required that input parameters be > sector-aligned and clamped to 32 bits, because the underlying > bdrv_is_allocated used a 32-bit parameter and asserted aligned > inputs. But now that we have fixed block status to report a >

Re: [Qemu-block] [PATCH v3 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread QingFeng Hao
在 2017/7/4 17:34, Cornelia Huck 写道: On Tue, 4 Jul 2017 10:32:31 +0200 QingFeng Hao wrote: This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c (" virtio-pci: use ioeventfd even when KVM is disabled) Do not check kvm_eventfds_enabled() when KVM is disabled since

Re: [Qemu-block] [PATCH v3 1/4] block: Pass bdrv_* methods to bs->file by default

2017-07-04 Thread Kevin Wolf
Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben: > The following functions fail if bs->drv does not implement them: > > bdrv_probe_blocksizes > bdrv_probe_geometry > bdrv_truncate > bdrv_has_zero_init > bdrv_get_info > bdrv_media_changed > bdrv_eject > bdrv_lock_medium > bdrv_co_ioctl >

Re: [Qemu-block] [PATCH v2 14/15] block: Align block status requests

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > Any device that has request_alignment greater than 512 should be > unable to report status at a finer granularity; it may also be > simpler for such devices to be guaranteed that the block layer > has rounded things out to the granularity boundary (the way t

Re: [Qemu-block] [Qemu-devel] [PATCH v2 13/15] block: Convert bdrv_get_block_status_above() to bytes

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. In the common case, allocation is unlikely to ever use > values that are not naturally sector-aligned, but it is possible > that byte-based values will let us be more precise a

Re: [Qemu-block] [Qemu-devel] [PATCH v2 12/15] block: Switch bdrv_co_get_block_status_above() to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > type (no semantic change), and rename it to match the corresponding > public function rename. > > Signed-off-by: Eric B

Re: [Qemu-block] [Qemu-devel] [PATCH v2 10/15] block: Switch BdrvCoGetBlockStatusData to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > type (no semantic change), and rename it to match the corresponding > public function rename. > > Signed-off-by: Eric B

Re: [Qemu-block] [Qemu-devel] [PATCH v2 11/15] block: Switch bdrv_common_block_status_above() to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > function (no semantic change). > > Signed-off-by: Eric Blake > Reviewed-by: Fam Zheng

Re: [Qemu-block] [Qemu-devel] [PATCH v2 09/15] block: Switch bdrv_co_get_block_status() to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > function (no semantic change), and as with its public counterpart, > rename to bdrv_co_block_status() to make the compil

[Qemu-block] [PATCH v3 4/4] block: Add default implementations for bdrv_co_get_block_status()

2017-07-04 Thread Manos Pitsidianakis
bdrv_co_get_block_status_from_file() and bdrv_co_get_block_status_from_backing() set *file to bs->file and bs->backing respectively, so that bdrv_co_get_block_status() can recurse to them. Future block drivers won't have to duplicate code to implement this. Reviewed-by: Fam Zheng Reviewed-by: Eri

[Qemu-block] [PATCH v3 0/4] block: Block driver callbacks fixes

2017-07-04 Thread Manos Pitsidianakis
This series makes implementing some of the bdrv_* callbacks easier for block drivers by passing requests to bs->file if bs->drv doesn't implement it instead of failing, and adding default bdrv_co_get_block_status() implementations. This is based against Kevin Wolf's block branch, commit da4bd74d24

[Qemu-block] [PATCH v3 3/4] block: Remove bdrv_truncate callback in blkdebug

2017-07-04 Thread Manos Pitsidianakis
Now that bdrv_truncate is passed to bs->file by default, remove the callback from block/blkdebug.c Signed-off-by: Manos Pitsidianakis --- block/blkdebug.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index b25856c4..5e118e10 100644 --- a/block/blkd

[Qemu-block] [PATCH v3 1/4] block: Pass bdrv_* methods to bs->file by default

2017-07-04 Thread Manos Pitsidianakis
The following functions fail if bs->drv does not implement them: bdrv_probe_blocksizes bdrv_probe_geometry bdrv_truncate bdrv_has_zero_init bdrv_get_info bdrv_media_changed bdrv_eject bdrv_lock_medium bdrv_co_ioctl Instead, the call should be passed to bs->file if it exists, to allow filter drive

[Qemu-block] [PATCH v3 2/4] block: Use defaults of bdrv_* callbacks in raw

2017-07-04 Thread Manos Pitsidianakis
Now that passing the call to bs->file is the default for some bdrv_* callbacks, remove the duplicate implementations in block/raw-format.c Reviewed-by: Eric Blake Signed-off-by: Manos Pitsidianakis --- block/raw-format.c | 30 -- 1 file changed, 30 deletions(-) diff

Re: [Qemu-block] [Qemu-devel] [PATCH v2 08/15] block: Convert bdrv_get_block_status() to bytes

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. In the common case, allocation is unlikely to ever use > values that are not naturally sector-aligned, but it is possible > that byte-based values will let us be more precise a

[Qemu-block] [PATCH v3 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread QingFeng Hao
This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c (" virtio-pci: use ioeventfd even when KVM is disabled) Do not check kvm_eventfds_enabled() when KVM is disabled since it always returns 0. Since commit 8c56c1a592b5092d91da8d8943c1d6462a6f ("memory: emulate ioev

[Qemu-block] [PATCH v3 0/1] virtio-scsi-ccw: fix iotest 068 for s390x

2017-07-04 Thread QingFeng Hao
This commit fixes iotest 068 for s390x as s390x uses virtio-scsi-ccw. It's based on commit c324fd0a39c by Stefan Hajnoczi. Thanks! Change history: v3: Take Christian Borntraeger and Cornelia Huck's comment to check if kvm is enabled in s390_assign_subch_ioeventfd instead of kvm_s390_a

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread QingFeng Hao
在 2017/7/4 15:06, Christian Borntraeger 写道: On 07/04/2017 05:41 AM, QingFeng Hao wrote: 在 2017/7/3 18:20, Christian Borntraeger 写道: On 07/03/2017 10:51 AM, QingFeng Hao wrote: This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c (" virtio-pci: use ioeventfd even

Re: [Qemu-block] [Qemu-devel] [PATCH v2 07/15] qemu-img: Switch get_block_status() to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Continue by converting > an internal function (no semantic change), and simplifying its > caller accordingly. > > Signed-off-by: Eric Blake Revi

Re: [Qemu-block] [Qemu-devel] [PATCH v2 04/15] block: Make bdrv_round_to_clusters() signature more useful

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > In the process of converting sector-based interfaces to bytes, > I'm finding it easier to represent a byte count as a 64-bit > integer at the block layer (even if we are internally capped > by SIZE_MAX or even INT_MAX for individual transactions, it's > stil

Re: [Qemu-block] [Qemu-devel] [PATCH v2 05/15] qcow2: Switch is_zero_sectors() to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > function (no semantic change), and rename it to is_zero() in the > process. > > Signed-off-by: Eric Blake > Reviewed

Re: [Qemu-block] [Qemu-devel] [PATCH v2 06/15] block: Switch bdrv_make_zero() to byte-based

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Change the internal > loop iteration of zeroing a device to track by bytes instead of > sectors (although we are still guaranteed that we iterate b

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/15] block: Allow NULL file for bdrv_get_block_status()

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > Not all callers care about which BDS owns the mapping for a given > range of the file. This patch merely simplifies the callers by > consolidating the logic in the common call point, while guaranteeing > a non-NULL file to all the driver callbacks, for no s

Re: [Qemu-block] [Qemu-devel] [PATCH v2 01/15] block: add default implementations for bdrv_co_get_block_status()

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > From: Manos Pitsidianakis > > bdrv_co_get_block_status_from_file() and > bdrv_co_get_block_status_from_backing() set *file to bs->file and > bs->backing respectively, so that bdrv_co_get_block_status() can recurse > to them. Future block drivers won't have

Re: [Qemu-block] [Qemu-devel] [PATCH v2 03/15] block: Add flag to avoid wasted work in bdrv_is_allocated()

2017-07-04 Thread Fam Zheng
On Mon, 07/03 17:14, Eric Blake wrote: > @@ -1717,6 +1718,10 @@ int64_t coroutine_fn > bdrv_co_get_block_status_from_backing(BlockDriverState *bs, > * Drivers not implementing the functionality are assumed to not support > * backing files, hence all their sectors are reported as allocated. >

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-04 Thread Christian Borntraeger
On 07/04/2017 05:41 AM, QingFeng Hao wrote: > > > 在 2017/7/3 18:20, Christian Borntraeger 写道: >> On 07/03/2017 10:51 AM, QingFeng Hao wrote: >>> This patch is based on a similar patch from Stefan Hajnoczi - >>> commit c324fd0a39c (" virtio-pci: use ioeventfd even when KVM is disabled) >>> >>> Do