Re: [Qemu-block] [Qemu-devel] [PATCH v5 20/27] qemu-iotests: 046: Move version detection out from verify_io

2016-06-02 Thread Fam Zheng
On Wed, 05/25 15:23, Max Reitz wrote: > > -verify_io | $QEMU_IO "$TEST_IMG" | _filter_qemu_io > > +if ($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep "compat: 0.10" > > > /dev/null); then > > +# For v2 images, discarded clusters are read from the backing file > > +# Keep the variable empty

Re: [Qemu-block] [PATCH v5 19/27] qemu-iotests: 140: Disable image lock for qemu-io access

2016-06-02 Thread Fam Zheng
On Wed, 05/25 15:16, Max Reitz wrote: > On 17.05.2016 09:35, Fam Zheng wrote: > > The VM is still on, the image locking check would complain. > > No, it wouldn't. We are opening an NBD URL that is provided by the VM. > > Even if it would, we are only reading data, so an -r would probably be > bet

Re: [Qemu-block] [PATCH v5 18/27] mirror: Disable image locking on target backing chain

2016-06-02 Thread Fam Zheng
On Tue, 05/24 20:20, Max Reitz wrote: > On 17.05.2016 09:35, Fam Zheng wrote: > > In sync=none the backing image of s->target is s->common.bs, which could > > be exclusively locked, the image locking wouldn't work here. > > Why is the backing image s->common.bs when the bdrv_open() call > explicit

Re: [Qemu-block] [Qemu-devel] [PATCH 4/7] scsi-disk: introduce dma_readv and dma_writev

2016-06-02 Thread Mark Cave-Ayland
On 03/06/16 03:56, xiaoqiang zhao wrote: > 在 2016年06月02日 03:07, Mark Cave-Ayland 写道: >> On 23/05/16 13:54, Paolo Bonzini wrote: >> >>> >These are replacements for blk_aio_preadv and blk_aio_pwritev that >>> allow >>> >customization of the data path. They reuse the DMA helpers' DMAIOFunc >>> >call

[Qemu-block] [PATCH] scsi-disk: fix reads from scsi-disk devices

2016-06-02 Thread Mark Cave-Ayland
Commit fcaafb1001b9c42817714dd3b2aadcfdb997b53d accidentally broke reads from scsi-disk devices when being updated from its original form to use the new byte-based block functions. Add the extra missing sector to offset conversion in order to restore read functionality. Signed-off-by: Mark Cave-Ay

[Qemu-block] [PATCH v5 09/10] tests: Add test code for hbitmap serialization

2016-06-02 Thread Fam Zheng
Acked-by: John Snow Signed-off-by: Fam Zheng --- tests/test-hbitmap.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index c00c2b5..8f64941 100644 --- a/tests/test-hbitmap.c +++ b/tests/test-h

[Qemu-block] [PATCH v5 05/10] block: Add two dirty bitmap getters

2016-06-02 Thread Fam Zheng
For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bi

[Qemu-block] [PATCH v5 10/10] block: More operations for meta dirty bitmap

2016-06-02 Thread Fam Zheng
Callers can create an iterator of meta bitmap with bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on it. Meta iterators are also counted by bitmap->active_iterators. Also add a couple of functions to retrieve granularity and count. Signed-off-by: Fam Zheng Reviewed-by: Max

[Qemu-block] [PATCH v5 04/10] block: Support meta dirty bitmap

2016-06-02 Thread Fam Zheng
The added group of operations enables tracking of the changed bits in the dirty bitmap. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 52 include/block/dirty-bitmap.h | 9 2 files changed, 61 insertions(+) diff --git a/block/d

[Qemu-block] [PATCH v5 08/10] block: BdrvDirtyBitmap serialization interface

2016-06-02 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Several functions to provide necessary access to BdrvDirtyBitmap for block-migration.c Signed-off-by: Vladimir Sementsov-Ogievskiy [Add the "finish" parameters. - Fam] Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 37 +++

[Qemu-block] [PATCH v5 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-06-02 Thread Fam Zheng
We use a loop over bs->dirty_bitmaps to make sure the caller is only releasing a bitmap owned by bs. Let's also assert that in this case the caller is releasing a bitmap that does exist. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bloc

[Qemu-block] [PATCH v5 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-06-02 Thread Fam Zheng
Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 2 +- include/qemu/hbitmap.h | 17 + util/hbitmap.c | 69 +++--- 3 files chan

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

2016-06-02 Thread Fam Zheng
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, now the new BdrvDirtyBitmapIter must be dyn

[Qemu-block] [PATCH v5 03/10] tests: Add test code for meta bitmap

2016-06-02 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/test-hbitmap.c | 116 +++ 1 file changed, 116 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index abe1427..c00c2b5 100644 --- a/tests/test-hbitmap.c +++ b/tests/tes

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

2016-06-02 Thread Fam Zheng
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 Little Endian is chosen. These functions are appropriate for dirty bit

[Qemu-block] [PATCH v5 00/10] Dirty bitmap changes for migration/persistence work

2016-06-02 Thread Fam Zheng
v5: Rebase: first 5 patches from last revision are already merged. Addressed Max's comments: 01: - "block.c" -> "block/dirty-bitmap.c" in commit message. - "an BdrvDirtyBitmapIter" -> "an BdrvDirtyBitmapIter" in code comment. - hbitmap_next => next_dirty as variable name.

Re: [Qemu-block] [Qemu-devel] [PATCH v2] raw-posix: Fetch max sectors for host block device

2016-06-02 Thread Fam Zheng
On Thu, 06/02 20:42, Eric Blake wrote: > On 06/02/2016 08:07 PM, Fam Zheng wrote: > > This is sometimes a useful value we should count in. > > > > Signed-off-by: Fam Zheng > > --- > > block/raw-posix.c | 24 > > 1 file changed, 24 insertions(+) > > > > Will conflict wi

Re: [Qemu-block] [Qemu-devel] [PATCH v2] raw-posix: Fetch max sectors for host block device

2016-06-02 Thread Eric Blake
On 06/02/2016 08:07 PM, Fam Zheng wrote: > This is sometimes a useful value we should count in. > > Signed-off-by: Fam Zheng > --- > block/raw-posix.c | 24 > 1 file changed, 24 insertions(+) > Will conflict with patches I'm about to post to rework BlockLimits to be by

Re: [Qemu-block] [PATCH v4 09/15] block: Support meta dirty bitmap

2016-06-02 Thread Fam Zheng
On Fri, 03/11 16:17, Max Reitz wrote: > On 08.03.2016 05:45, Fam Zheng wrote: > > The added group of operations enables tracking of the changed bits in > > the dirty bitmap. > > > > Signed-off-by: Fam Zheng > > --- > > block/dirty-bitmap.c | 52 > > ++

Re: [Qemu-block] [PATCH v4 08/15] tests: Add test code for meta bitmap

2016-06-02 Thread Fam Zheng
On Fri, 03/11 15:58, Max Reitz wrote: > > +/* Test "unset" -> "set" will update meta */ > > +hbitmap_set(data->hb, start, count); > > +hbitmap_check_meta(data, check_start, check_count); > > + > > +/* Test "set" -> "set" will not update meta */ > > +hbitmap_reset_all(data->meta)

Re: [Qemu-block] [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-06-02 Thread Fam Zheng
On Thu, 06/02 18:49, John Snow wrote: > > > On 06/02/2016 07:43 AM, Vladimir Sementsov-Ogievskiy wrote: > > Hi, what are the plans? > > > > I'm not sure. Fam, part of this series was merged, wasn't it? > > Do you have outstanding work that you'd like me to take over and push > through for you?

[Qemu-block] [PATCH v2] raw-posix: Fetch max sectors for host block device

2016-06-02 Thread Fam Zheng
This is sometimes a useful value we should count in. Signed-off-by: Fam Zheng --- block/raw-posix.c | 24 1 file changed, 24 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index a4f5a1b..32f9596 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@

Re: [Qemu-block] [PATCH 1/2] raw-posix: Fetch max sectors for host block device from sysfs

2016-06-02 Thread Fam Zheng
On Thu, 06/02 14:54, Kevin Wolf wrote: > Also a quick search on the internet suggests that the BLKSECTGET ioctl > is what we're looking for, so hopefully using sysfs is unnecessary > anyway. Oops! Looks like something went terribly wrong with my "quick search", will post v2. Thanks! Fam

Re: [Qemu-block] [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-06-02 Thread John Snow
On 06/02/2016 07:43 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi, what are the plans? > I'm not sure. Fam, part of this series was merged, wasn't it? Do you have outstanding work that you'd like me to take over and push through for you? --js > On 26.05.2016 03:47, Fam Zheng wrote: >> On Wed,

[Qemu-block] [PATCH 3/5] trace: enable tracing in qemu-nbd

2016-06-02 Thread Denis V. Lunev
Please note, trace_init_backends() must be called in the final process, i.e. after daemonization. This is necessary to keep tracing thread in the proper process. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC: Kevin Wolf --- qemu-nbd.c| 18 +

[Qemu-block] [PATCH 5/5] trace: enable tracing in qemu-img

2016-06-02 Thread Denis V. Lunev
The command will work this way: qemu-img --trace qcow2* create -f qcow2 1.img 64G Signed-off-by: Denis V. Lunev Suggested by: Daniel P. Berrange CC: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC: Kevin Wolf --- qemu-img.c| 24 +--- qemu-img.texi | 34 ++

[Qemu-block] [PATCH 1/5] trace: move qemu_trace_opts to trace/control.c

2016-06-02 Thread Denis V. Lunev
The patch also creates trace_opt_parse() helper in trace/control.c to reuse this code in next patches for qemu-nbd and qemu-io. The patch also makes trace_init_events() static, as this call is not used outside the module anymore. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Paolo B

[Qemu-block] [PATCH v3 0/5] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-02 Thread Denis V. Lunev
Changes from v2: - tweaked man-pages of qemu-nbd/qemu-img - added support for qemu-img (patches 4-5 as suggested) Changes from v1: - fixed nits found by Eric Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC: Kevin Wolf Denis V. Lunev (5): trace: move q

[Qemu-block] [PATCH 4/5] qemu-img: move common options parsing before commands processing

2016-06-02 Thread Denis V. Lunev
This is necessary to enable creation of common qemu-img options which will be specified before command. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC: Kevin Wolf --- qemu-img.c | 31 +++ 1 file changed, 19 insertions(+), 12

[Qemu-block] [PATCH 2/5] trace: enable tracing in qemu-io

2016-06-02 Thread Denis V. Lunev
Moving trace_init_backends() into trace_opt_parse() is not possible. This should be called after daemonize() in vl.c. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC: Kevin Wolf --- qemu-io.c | 17 + 1 file changed, 13 insertions

Re: [Qemu-block] [PATCH v2 1/1] qcow2: avoid extra flushes in qcow2

2016-06-02 Thread Denis V. Lunev
On 06/02/2016 06:58 PM, Denis V. Lunev wrote: The problem with excessive flushing was found by a couple of performance tests: - parallel directory tree creation (from 2 processes) - 32 cached writes + fsync at the end in a loop For the first one results improved from 2.6 loops/sec to 3.5 l

[Qemu-block] [PATCH v5 11/11] vnc: allow specifying a custom ACL object name

2016-06-02 Thread Daniel P. Berrange
The VNC server has historically had support for ACLs to check both the SASL username and the TLS x509 distinguished name. The VNC server was responsible for creating the initial ACL, and the client app was then responsible for populating it with rules using the HMP 'acl_add' command. This is not s

[Qemu-block] [PATCH v5 08/11] nbd: allow an ACL to be set with nbd-server-start QMP command

2016-06-02 Thread Daniel P. Berrange
As with the previous patch to qemu-nbd, the nbd-server-start QMP command also needs to be able to specify an ACL when enabling TLS encryption. First the client must create a QAuthZ object instance using the 'object-add' command: { 'execute': 'object-add', 'arguments': { 'qom-t

[Qemu-block] [PATCH v5 01/11] qdict: implement a qdict_crumple method for un-flattening a dict

2016-06-02 Thread Daniel P. Berrange
The qdict_flatten() method will take a dict whose elements are further nested dicts/lists and flatten them by concatenating keys. The qdict_crumple() method aims to do the reverse, taking a flat qdict, and turning it into a set of nested dicts/lists. It will apply nesting based on the key name, wi

[Qemu-block] [PATCH v5 04/11] util: add QAuthZ object as an authorization base class

2016-06-02 Thread Daniel P. Berrange
The current qemu_acl module provides a simple access control list facility inside QEMU, which is used via a set of monitor commands acl_show, acl_policy, acl_add, acl_remove & acl_reset. Note there is no ability to create ACLs - the network services (eg VNC server) were expected to create ACLs tha

[Qemu-block] [PATCH v5 07/11] qemu-nbd: add support for ACLs for TLS clients

2016-06-02 Thread Daniel P. Berrange
Currently any client which can complete the TLS handshake is able to use the NBD server. The server admin can turn on the 'verify-peer' option for the x509 creds to require the client to provide a x509 certificate. This means the client will have to acquire a certificate from the CA before they are

[Qemu-block] [PATCH v5 10/11] chardev: add support for ACLs for TLS clients

2016-06-02 Thread Daniel P. Berrange
Currently any client which can complete the TLS handshake is able to use a chardev server. The server admin can turn on the 'verify-peer' option for the x509 creds to require the client to provide a x509 certificate. This means the client will have to acquire a certificate from the CA before they a

[Qemu-block] [PATCH v5 09/11] migration: add support for a "tls-acl" migration parameter

2016-06-02 Thread Daniel P. Berrange
The QEMU instance that runs as the server for the migration data transport (ie the target QEMU) needs to be able to configure access control so it can prevent unauthorized clients initiating an incoming migration. This adds a new 'tls-acl' migration parameter that is used to provide the QOM ID of a

[Qemu-block] [PATCH v5 06/11] acl: delete existing ACL implementation

2016-06-02 Thread Daniel P. Berrange
The 'qemu_acl' type was a previous non-QOM based attempt to provide an authorization facility in QEMU. Because it is non-QOM based it cannot be created via the command line and requires special monitor commands to manipulate it. The new QAuthZ and QAuthZSimple QOM classes provide a superset of the

[Qemu-block] [PATCH v5 02/11] qapi: allow QmpInputVisitor to auto-cast types

2016-06-02 Thread Daniel P. Berrange
Currently the QmpInputVisitor assumes that all scalar values are directly represented as their final types. ie it assumes an 'int' is using QInt, and a 'bool' is using QBool. This extends it so that QString is optionally permitted for any of the non-string scalar types. This behaviour is turned on

[Qemu-block] [PATCH v5 03/11] qom: support arbitrary non-scalar properties with -object

2016-06-02 Thread Daniel P. Berrange
The current -object command line syntax only allows for creation of objects with scalar properties, or a list with a fixed scalar element type. Objects which have properties that are represented as structs in the QAPI schema cannot be created using -object. This is a design limitation of the way t

[Qemu-block] [PATCH v5 05/11] util: add QAuthZSimple object type for a simple access control list

2016-06-02 Thread Daniel P. Berrange
Add a QAuthZSimple object type that implements the QAuthZ interface. This simple built-in implementation maintains a trivial access control list with a sequence of match rules and a final default policy. This replicates the functionality currently provided by the qemu_acl module. To create an inst

[Qemu-block] [PATCH v5 00/11] Provide a QOM-based authorization API

2016-06-02 Thread Daniel P. Berrange
This is a followup of previously posted work in 2.6 cycle: v1: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04618.html v2: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01454.html v3: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg02498.html v4: https://lists.g

[Qemu-block] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-02 Thread Denis V. Lunev
The problem with excessive flushing was found by a couple of performance tests: - parallel directory tree creation (from 2 processes) - 32 cached writes + fsync at the end in a loop For the first one results improved from 2.6 loops/sec to 3.5 loops/sec. Each loop creates 10^3 directories with

Re: [Qemu-block] [Qemu-devel] [PATCH v4 22/28] qobject: Consolidate qobject_to_json() calls

2016-06-02 Thread Markus Armbruster
Eric Blake writes: > It's simpler to have a single conversion function that takes a > bool parameter, rather than two functions where the choice of > function determines an internal bool. Similar to commit fc471c18. > > While at it, the conversion currently cannot fail (maybe it SHOULD > be poss

Re: [Qemu-block] [Qemu-devel] [PATCH v4 21/28] qstring: Add qstring_wrap_str()

2016-06-02 Thread Markus Armbruster
Eric Blake writes: > Several spots in the code malloc a string, then wrap it in a > QString, which has to duplicate the input. Adding a new > constructor with transfer semantics makes this pattern more > efficient, comparable to the just-added transfer semantics to > go from QString back to raw

Re: [Qemu-block] [PATCH] block: assert that bs->request_alignment is a power of 2

2016-06-02 Thread Kevin Wolf
Am 30.05.2016 um 13:59 hat Peter Lieven geschrieben: > at least bdrv_co_preadv/pwritev expect this. > > Signed-off-by: Peter Lieven Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH 0/2] Block migration: Convert to BlockBackend

2016-06-02 Thread Kevin Wolf
Am 30.05.2016 um 11:24 hat Kevin Wolf geschrieben: > Users outside of the block layer shouldn't directly use BlockDriverState for > issuing their I/O requests, but go through a BlockBackend to do so. Block > migration ('migrate -b') is (one of?) the last remaining users that need to be > converted.

Re: [Qemu-block] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-02 Thread Pavel Borzenkov
On Wed, Jun 01, 2016 at 12:07:01PM +0200, Kevin Wolf wrote: > Am 01.06.2016 um 11:12 hat Denis V. Lunev geschrieben: > > qcow2_cache_flush() calls bdrv_flush() unconditionally after writing > > cache entries of a particular cache. This can lead to as many as > > 2 additional fdatasyncs inside bdrv_

Re: [Qemu-block] [PATCH 1/2] raw-posix: Fetch max sectors for host block device from sysfs

2016-06-02 Thread Kevin Wolf
Am 02.06.2016 um 14:30 hat Max Reitz geschrieben: > On 26.05.2016 08:15, Fam Zheng wrote: > > This is sometimes a useful value we should count in. > > > > Signed-off-by: Fam Zheng > > --- > > block/raw-posix.c | 47 +++ > > 1 file changed, 47 insertion

Re: [Qemu-block] [PATCH v2 09/13] qed: Convert to bdrv_co_pwrite_zeroes()

2016-06-02 Thread Kevin Wolf
Am 02.06.2016 um 14:40 hat Eric Blake geschrieben: > On 06/02/2016 05:16 AM, Kevin Wolf wrote: > > Am 01.06.2016 um 23:10 hat Eric Blake geschrieben: > >> Another step on our continuing quest to switch to byte-based > >> interfaces. > >> > >> Kill an abuse of the comma operator while at it (fortuna

Re: [Qemu-block] [PATCH v2 09/13] qed: Convert to bdrv_co_pwrite_zeroes()

2016-06-02 Thread Eric Blake
On 06/02/2016 05:16 AM, Kevin Wolf wrote: > Am 01.06.2016 um 23:10 hat Eric Blake geschrieben: >> Another step on our continuing quest to switch to byte-based >> interfaces. >> >> Kill an abuse of the comma operator while at it (fortunately, >> the semantics were still right). Also, the test for r

Re: [Qemu-block] [PATCH v3 5/5] qcow2: Catch more unaligned write_zero into zero cluster

2016-06-02 Thread Eric Blake
On 06/02/2016 04:14 AM, Kevin Wolf wrote: >> If you prefer, I could have written '-tail % s->cluster_sectors', but as >> % on a negative signed integer gives different results than what you get >> for an unsigned number, I felt that & was nicer than % for making it >> more obvious that I'm grabbin

Re: [Qemu-block] [PATCH 1/2] raw-posix: Fetch max sectors for host block device from sysfs

2016-06-02 Thread Max Reitz
On 26.05.2016 08:15, Fam Zheng wrote: > This is sometimes a useful value we should count in. > > Signed-off-by: Fam Zheng > --- > block/raw-posix.c | 47 +++ > 1 file changed, 47 insertions(+) > > diff --git a/block/raw-posix.c b/block/raw-posix.c > i

Re: [Qemu-block] [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-06-02 Thread Vladimir Sementsov-Ogievskiy
Hi, what are the plans? On 26.05.2016 03:47, Fam Zheng wrote: On Wed, 05/25 17:45, Vladimir Sementsov-Ogievskiy wrote: Hi! Are you going to update the series in the near future? Yes, probably in a couple days. Fam On 08.03.2016 07:44, Fam Zheng wrote: v4: Rebase. Add rev-by from Joh

Re: [Qemu-block] [PATCH v5 14/27] qemu-img: Add "-L" option to sub commands

2016-06-02 Thread Max Reitz
On 01.06.2016 07:34, Fam Zheng wrote: > On Tue, 05/24 20:06, Max Reitz wrote: [...] >> Also: Should we have distinct flags for source and target for convert? >> For instance, I can imagine someone wanting not to lock the source but >> leave the target in default exclusive mode. > > "-L" is a sho

Re: [Qemu-block] [PATCH v2 00/13] Kill sector-based write_zeroes

2016-06-02 Thread Kevin Wolf
Am 01.06.2016 um 23:10 hat Eric Blake geschrieben: > Kevin pointed out that my recent change to byte-based instead > of sector-based blk_write_zeroes() (commit 983a1600) makes life > harder as long as bdrv_write_zeroes is still sector-based, and > where the compiler doesn't flag any change in param

Re: [Qemu-block] [PATCH v2 09/13] qed: Convert to bdrv_co_pwrite_zeroes()

2016-06-02 Thread Kevin Wolf
Am 01.06.2016 um 23:10 hat Eric Blake geschrieben: > Another step on our continuing quest to switch to byte-based > interfaces. > > Kill an abuse of the comma operator while at it (fortunately, > the semantics were still right). Also, the test for requests > not aligned to clusters should be appl

Re: [Qemu-block] [PATCH v2 04/13] block: Switch bdrv_write_zeroes() to byte interface

2016-06-02 Thread Kevin Wolf
Am 01.06.2016 um 23:10 hat Eric Blake geschrieben: > Rename to bdrv_pwrite_zeroes() to let the compiler ensure we > cater to the updated semantics. Do the same for > bdrv_aio_write_zeroes() and bdrv_co_write_zeroes(). Two of the > three places map to the byte-based counterparts; but for now, > si

Re: [Qemu-block] [Qemu-devel] [PATCH] block/raw-posix: Fix error_report of mounting message

2016-06-02 Thread Wei, Jiangang
On Thu, 2016-06-02 at 09:57 +0200, Markus Armbruster wrote: > Wei Jiangang writes: > > > Use a single error_printf to replace triple error_report. > > > > Signed-off-by: Wei Jiangang > > --- > > block/raw-posix.c | 10 +- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff

Re: [Qemu-block] [PATCH v3 0/5] qcow2_co_write_zeroes and related improvements

2016-06-02 Thread Kevin Wolf
Am 26.05.2016 um 05:48 hat Eric Blake geschrieben: > This series improves write_zeroes for qcow2 > > Since the work conflicts with my proposed patches to switch > write_zeroes to a byte-base interface, I figured I'd fix the > bugs and get this part nailed first, then rebase my other > work on top,

Re: [Qemu-block] [PATCH v3 5/5] qcow2: Catch more unaligned write_zero into zero cluster

2016-06-02 Thread Kevin Wolf
Am 26.05.2016 um 16:35 hat Eric Blake geschrieben: > On 05/26/2016 07:41 AM, Denis V. Lunev wrote: > > On 05/26/2016 06:48 AM, Eric Blake wrote: > >> is_zero_cluster() and is_zero_cluster_top_locked() are used only > >> by qcow2_co_write_zeroes(). The former is too broad (we don't > >> care if the

Re: [Qemu-block] [Qemu-devel] [PATCH] block/raw-posix: Fix error_report of mounting message

2016-06-02 Thread Markus Armbruster
Wei Jiangang writes: > Use a single error_printf to replace triple error_report. > > Signed-off-by: Wei Jiangang > --- > block/raw-posix.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/block/raw-posix.c b/block/raw-posix.c > index a4f5a1b..141b01a 100644 >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] raw-posix: Fetch max sectors for host block device from sysfs

2016-06-02 Thread Fam Zheng
On Thu, 05/26 14:15, Fam Zheng wrote: > This is sometimes a useful value we should count in. Kevin, Max, could you review this please? Fam > > Signed-off-by: Fam Zheng > --- > block/raw-posix.c | 47 +++ > 1 file changed, 47 insertions(+) > > diff