[Qemu-block] [PATCH v4 6/7] blkdebug: Add ability to override unmap geometries

2016-12-20 Thread Eric Blake
Make it easier to simulate various unusual hardware setups (for example, recent commits 3482b9b and b8d0a98 affect the Dell Equallogic iSCSI with its 15M preferred and maximum unmap and write zero sizing, or b2f95fe deals with the Linux loopback block device having a max_transfer of 64k), by

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/7] add blkdebug tests

2016-12-20 Thread Eric Blake
[oops, I forgot cc's on the cover letter, even though the rest of the series was properly broadcast] On 12/20/2016 01:15 PM, Eric Blake wrote: > Based on Kevin's block-next branch: > http://repo.or.cz/qemu/kevin.git/shortlog/refs/heads/block-next > > Available as a tag at: > git fetch

[Qemu-block] [PATCH v4 4/7] blkdebug: Add pass-through write_zero and discard support

2016-12-20 Thread Eric Blake
In order to test the effects of artificial geometry constraints on operations like write zero or discard, we first need blkdebug to manage these actions. It also allows us to inject errors on those operations, just like we can for read/write/flush. We can also test the contract promised by the

[Qemu-block] [PATCH v4 2/7] qcow2: Discard/zero clusters by byte count

2016-12-20 Thread Eric Blake
Passing a byte offset, but sector count, when we ultimately want to operate on cluster granularity, is madness. Clean up the interfaces to take both offset and count as bytes, while still keeping the assertion added previously that the caller must align the values to a cluster. Then rename

[Qemu-block] [PATCH v4 5/7] blkdebug: Simplify override logic

2016-12-20 Thread Eric Blake
Rather than store into a local variable, then copy to the struct if the value is valid, then reporting errors otherwise, it is simpler to just store into the struct and report errors if the value is invalid. This however requires that the struct store a 64-bit number, rather than a narrower type.

[Qemu-block] [PATCH v4 7/7] tests: Add coverage for recent block geometry fixes

2016-12-20 Thread Eric Blake
Use blkdebug's new geometry constraints to emulate setups that have caused recent regression fixes: write zeroes asserting when running through a loopback block device with max-transfer smaller than cluster size, and discard rounding away portions of requests not aligned to preferred boundaries.

[Qemu-block] [PATCH v4 3/7] blkdebug: Sanity check block layer guarantees

2016-12-20 Thread Eric Blake
Commits 04ed95f4 and 1a62d0ac updated the block layer to auto-fragment any I/O to fit within device boundaries. Additionally, when using a minimum alignment of 4k, we want to ensure the block layer does proper read-modify-write rather than requesting I/O on a slice of a sector. Let's enforce that

[Qemu-block] [PATCH v4 1/7] qcow2: Assert that cluster operations are aligned

2016-12-20 Thread Eric Blake
qcow2_discard_clusters() is set up to silently ignore sub-cluster head or tail on unaligned requests. However, it is easy to audit the various callers: qcow2_snapshot_create() has always passed aligned data since the call was introduced in 1ebf561; qcow2_co_pdiscard() has passed aligned clusters

Re: [Qemu-block] [Qemu-devel] [PATCH] mirror: prevent 'top' mode mirroring when no backing file specified on the destination

2016-12-20 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH] mirror: prevent 'top' mode mirroring when no backing file specified on the destination Message-id: 1482187106-85065-1-git-send-email-sochin.ji...@huawei.com Type:

Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] RFC: A VFIO based block driver for NVMe device

2016-12-20 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/4] RFC: A VFIO based block driver for NVMe device Message-id: 20161220163139.12016-1-f...@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] RFC: A VFIO based block driver for NVMe device

2016-12-20 Thread Fam Zheng
On Tue, 12/20 15:04, no-re...@patchew.org wrote: > ERROR: that open brace { should be on the previous line > #287: FILE: util/vfio-helpers.c:214: > +struct vfio_group_status group_status = > +{ .argsz = sizeof(group_status) }; Hmm, it may indeed look better. > ERROR: Use of volatile is

Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] RFC: A VFIO based block driver for NVMe device

2016-12-20 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20161220163139.12016-1-f...@redhat.com Subject: [Qemu-devel] [PATCH 0/4] RFC: A VFIO based block

Re: [Qemu-block] [PATCH RFC v2 2/6] replication: add shared-disk and shared-disk-id options

2016-12-20 Thread Changlong Xie
On 12/05/2016 04:35 PM, zhanghailiang wrote: diff --git a/qapi/block-core.json b/qapi/block-core.json index c29bef7..52d7e0d 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2232,12 +2232,19 @@ # node who owns the replication node chain. Must not be given in #

Re: [Qemu-block] [PATCH RFC v2 1/6] docs/block-replication: Add description for shared-disk case

2016-12-20 Thread Changlong Xie
On 12/05/2016 04:34 PM, zhanghailiang wrote: Introuduce the scenario of shared-disk block replication and how to use it. Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen ---

Re: [Qemu-block] [PATCH RFC v2 4/6] replication: fix code logic with the new shared_disk option

2016-12-20 Thread Changlong Xie
On 12/05/2016 04:35 PM, zhanghailiang wrote: Some code logic only be needed in non-shared disk, here we adjust these codes to prepare for shared disk scenario. Signed-off-by: zhanghailiang --- block/replication.c | 47

Re: [Qemu-block] [PATCH RFC v2 3/6] replication: Split out backup_do_checkpoint() from secondary_do_checkpoint()

2016-12-20 Thread Changlong Xie
On 12/05/2016 04:35 PM, zhanghailiang wrote: The helper backup_do_checkpoint() will be used for primary related codes. Here we split it out from secondary_do_checkpoint(). Besides, it is unnecessary to call backup_do_checkpoint() in replication starting and normally stop replication path. We

[Qemu-block] [PATCH 1/4] ramblock-notifier: new

2016-12-20 Thread Fam Zheng
From: Paolo Bonzini This adds a notify interface of ram block additions and removals. Signed-off-by: Paolo Bonzini Signed-off-by: Fam Zheng --- exec.c | 5 include/exec/memory.h | 6 +

[Qemu-block] [PATCH 3/4] util: Add VFIO helper library

2016-12-20 Thread Fam Zheng
This is a simple helper library to be used by VFIO device drivers in QEMU, makeing it very easy to interface with /dev/vfio and do DMA mappings. Especially, once initialized, this module proactively maps all guest ram regions to IO address space (in the host IOMMU context) so that in further I/O

[Qemu-block] [PATCH 2/4] util: Add a notifier list for qemu_vfree()

2016-12-20 Thread Fam Zheng
To allow other code to intercept buffer freeing and do customized unmapping operations. Signed-off-by: Fam Zheng --- include/qemu/notify.h | 1 + util/oslib-posix.c| 9 + 2 files changed, 10 insertions(+) diff --git a/include/qemu/notify.h b/include/qemu/notify.h

Re: [Qemu-block] [PATCH 4/4] block: Add VFIO based NVMe driver

2016-12-20 Thread Paolo Bonzini
- Original Message - > From: "Fam Zheng" > To: qemu-de...@nongnu.org > Cc: "Paolo Bonzini" , qemu-block@nongnu.org, "Karl > Rister" , "Kevin Wolf" > , "Max Reitz" , borntrae...@de.ibm.com, >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 5/5] tests: Add coverage for recent block geometry fixes

2016-12-20 Thread Eric Blake
On 12/07/2016 10:34 AM, Eric Blake wrote: > On 12/07/2016 10:16 AM, Kevin Wolf wrote: >> Am 02.12.2016 um 20:22 hat Eric Blake geschrieben: >>> Use blkdebug's new geometry constraints to emulate setups that >>> have caused recent regression fixes: write zeroes asserting >>> when running through a

[Qemu-block] [PATCH 4/4] block: Add VFIO based NVMe driver

2016-12-20 Thread Fam Zheng
This is a new protocol driver that exclusively opens a host NVMe controller through VFIO. It achieves better latency than linux-aio. nvme://linux-aio -- fio bs=4k iodepth=1 (IOPS)