[Qemu-block] [PULL 1/2] block/ssh: fix possible segmentation fault when .desc is not null-terminated

2018-01-31 Thread Jeff Cody
From: Murilo Opsfelder Araujo This patch prevents a possible segmentation fault when .desc members are checked against NULL. The ssh_runtime_opts was added by commit 8a6a80896d6af03b8ee0c17cdf37219eca2588a7 ("block/ssh: Use QemuOpts for runtime options"). This fix

[Qemu-block] [PULL 0/2] Block patches

2018-01-31 Thread Jeff Cody
The following changes since commit b05631954d6dfe93340d516660397e2c1a2a5dd6: Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180131' into staging (2018-01-31 15:50:29 +) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull

[Qemu-block] [PULL 2/2] iotests: Make 200 run on tmpfs

2018-01-31 Thread Jeff Cody
From: Max Reitz 200 currently fails on tmpfs because it sets cache=none. However, without that (and aio=native), the test still works now and it fails before Jeff's series (on fc7dbc119e0852a70dc9fa68bb41a318e49e4cd6). So we can probably remove the aio=native safely, and

Re: [Qemu-block] [PATCH] block/mirror: change the semantic of 'force' of block-job-cancel

2018-01-31 Thread Liang Li
On Tue, Jan 30, 2018 at 08:20:03AM -0600, Eric Blake wrote: > On 01/30/2018 02:38 AM, Liang Li wrote: >> When doing drive mirror to a low speed shared storage, if there was heavy >> BLK IO write workload in VM after the 'ready' event, drive mirror block job >> can't be canceled immediately, it

Re: [Qemu-block] [PATCH] iotests: Fix CID for VMDK afl image

2018-01-31 Thread Fam Zheng
On Thu, Feb 1, 2018 at 2:58 AM, Max Reitz wrote: > On 2018-01-30 07:25, Fam Zheng wrote: >> This reverts commit 76bf133c4 which updated the reference output, and >> fixed the reference image, because the code path we want to exercise is >> actually the invalid image size. >> >>

Re: [Qemu-block] [Qemu-devel] [RFC v3 00/14] blockjobs: add explicit job management

2018-01-31 Thread John Snow
On 01/26/2018 09:05 PM, John Snow wrote: > For jobs that complete when a monitor isn't looking, there's no way to > tell what the job's final return code was. We need to allow jobs to > remain in the list until queried for reliable management. > > Furthermore, it's not viable to have graph

Re: [Qemu-block] [PATCH v3 20/39] qcow2: Update qcow2_get_cluster_offset() to support L2 slices

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > qcow2_get_cluster_offset() checks how many contiguous bytes are > available at a given offset. The returned number of bytes is limited > by the amount that can be addressed without having to load more than > one L2 table. > > Since we'll be loading L2

Re: [Qemu-block] [PATCH v3 19/39] qcow2: Update get_cluster_table() to support L2 slices

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This patch updates get_cluster_table() to return L2 slices instead of > full L2 tables. > > The code itself needs almost no changes, it only needs to call > offset_to_l2_slice_index() instead of offset_to_l2_index(). This patch > also renames all the

Re: [Qemu-block] [PATCH v3 17/39] qcow2: Update l2_allocate() to support L2 slices

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This patch updates l2_allocate() to support the qcow2 cache returning > L2 slices instead of full L2 tables. > > The old code simply gets an L2 table from the cache and initializes it > with zeroes or with the contents of an existing table. With a

Re: [Qemu-block] [PATCH v3 15/39] qcow2: Update l2_load() to support L2 slices

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > Each entry in the qcow2 L2 cache stores a full L2 table (which uses a > complete cluster in the qcow2 image). A cluster is usually too large > to be used efficiently as the size for a cache entry, so we want to > decouple both values by allowing smaller

Re: [Qemu-block] [PATCH v3 14/39] qcow2: Add offset_to_l2_slice_index()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > Similar to offset_to_l2_index(), this function takes a guest offset > and returns the index in the L2 slice that contains its L2 entry. > > An L2 slice has currently the same size as an L2 table (one cluster), > so both functions return the same value

Re: [Qemu-block] [PATCH v3 13/39] qcow2: Add l2_slice_size field to BDRVQcow2State

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > The BDRVQcow2State structure contains an l2_size field, which stores > the number of 64-bit entries in an L2 table. > > For efficiency reasons we want to be able to load slices instead of > full L2 tables, so we need to know how many entries an L2

Re: [Qemu-block] [PATCH v3 12/39] qcow2: Add offset_to_l1_index()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > Similar to offset_to_l2_index(), this function returns the index in > the L1 table for a given guest offset. This is only used in a couple > of places and it's not a particularly complex calculation, but it > makes the code a bit more readable. > >

Re: [Qemu-block] [PATCH v3 11/39] qcow2: Remove BDS parameter from qcow2_cache_is_table_offset()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_addr(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake

Re: [Qemu-block] [PATCH v3 10/39] qcow2: Remove BDS parameter from qcow2_cache_discard()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_idx() and qcow2_cache_table_release(). This > is no longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia

Re: [Qemu-block] [PATCH v3 09/39] qcow2: Remove BDS parameter from qcow2_cache_clean_unused()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_table_release(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake

Re: [Qemu-block] [PATCH v3 08/39] qcow2: Remove BDS parameter from qcow2_cache_destroy()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was never using the BlockDriverState parameter so it can > be safely removed. > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake > --- > block/qcow2-cache.c | 2 +- > block/qcow2.c |

Re: [Qemu-block] [PATCH v3 07/39] qcow2: Remove BDS parameter from qcow2_cache_put()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_idx(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake

Re: [Qemu-block] [PATCH v3 06/39] qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_idx(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake

Re: [Qemu-block] [PATCH v3 05/39] qcow2: Remove BDS parameter from qcow2_cache_table_release()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to get the > cache table size (since it was equal to the cluster size). This is no > longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia >

Re: [Qemu-block] [PATCH v3 04/39] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to get the > cache table size (since it was equal to the cluster size). This is no > longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia >

Re: [Qemu-block] [PATCH v3 03/39] qcow2: Remove BDS parameter from qcow2_cache_get_table_addr()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to get the > cache table size (since it was equal to the cluster size). This is no > longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia >

Re: [Qemu-block] [PATCH v3 02/39] qcow2: Add table size field to Qcow2Cache

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > The table size in the qcow2 cache is currently equal to the cluster > size. This doesn't allow us to use the cache memory efficiently, > particularly with large cluster sizes, so we need to be able to have > smaller cache tables that are independent

Re: [Qemu-block] [PATCH v3 39/39] iotests: Add l2-cache-entry-size to iotest 137

2018-01-31 Thread Eric Blake
On 01/26/2018 09:00 AM, Alberto Garcia wrote: > This test tries reopening a qcow2 image with valid and invalid > options. This patch adds l2-cache-entry-size to the set. > > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/137 | 5 + >

Re: [Qemu-block] [PATCH v3 38/39] iotests: Test downgrading an image using a small L2 slice size

2018-01-31 Thread Eric Blake
On 01/26/2018 09:00 AM, Alberto Garcia wrote: > expand_zero_clusters_in_l1() is used when downgrading qcow2 images > from v3 to v2 (compat=0.10). This is one of the functions that needed > more changes to support L2 slices, so this patch extends iotest 061 to > test downgrading a qcow2 image using

Re: [Qemu-block] [PATCH v3 37/39] iotests: Test valid values of l2-cache-entry-size

2018-01-31 Thread Eric Blake
On 01/26/2018 09:00 AM, Alberto Garcia wrote: > The l2-cache-entry-size setting can only contain values that are > powers of two between 512 and the cluster size. > > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/103 | 17 + >

Re: [Qemu-block] [PATCH v3 01/39] qcow2: Fix documentation of get_cluster_table()

2018-01-31 Thread Max Reitz
On 2018-01-26 15:59, Alberto Garcia wrote: > This function has not been returning the offset of the L2 table since > commit 3948d1d4876065160583e79533bf604481063833 > > Signed-off-by: Alberto Garcia > Reviewed-by: Eric Blake > --- > block/qcow2-cluster.c |

Re: [Qemu-block] [Qemu-devel] [PATCH] hbitmap: fix missing restore count when finish deserialization

2018-01-31 Thread Max Reitz
On 2018-01-31 20:01, John Snow wrote: > > > On 01/31/2018 01:54 PM, Max Reitz wrote: >> On 2018-01-18 11:58, Liang Li wrote: >>> The .count of HBitmap is forgot to set in function >>> hbitmap_deserialize_finish, let's set it to the right value. >>> >>> Cc: Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [PATCH v2] block: maintain persistent disabled bitmaps

2018-01-31 Thread Max Reitz
On 2018-01-29 19:43, Max Reitz wrote: > On 2018-01-22 11:41, Vladimir Sementsov-Ogievskiy wrote: >> To maintain load/store disabled bitmap there is new approach: >> >> - deprecate @autoload flag of block-dirty-bitmap-add, make it ignored >> - store enabled bitmaps as "auto" to qcow2 >> - store

Re: [Qemu-block] [Qemu-devel] [PATCH] hbitmap: fix missing restore count when finish deserialization

2018-01-31 Thread John Snow
On 01/31/2018 01:54 PM, Max Reitz wrote: > On 2018-01-18 11:58, Liang Li wrote: >> The .count of HBitmap is forgot to set in function >> hbitmap_deserialize_finish, let's set it to the right value. >> >> Cc: Vladimir Sementsov-Ogievskiy >> Cc: Fam Zheng

Re: [Qemu-block] [PATCH] iotests: Fix CID for VMDK afl image

2018-01-31 Thread Max Reitz
On 2018-01-30 07:25, Fam Zheng wrote: > This reverts commit 76bf133c4 which updated the reference output, and > fixed the reference image, because the code path we want to exercise is > actually the invalid image size. > > The descriptor block in the image, which includes the CID to verify, has

Re: [Qemu-block] [PATCH] hbitmap: fix missing restore count when finish deserialization

2018-01-31 Thread Max Reitz
On 2018-01-18 11:58, Liang Li wrote: > The .count of HBitmap is forgot to set in function > hbitmap_deserialize_finish, let's set it to the right value. > > Cc: Vladimir Sementsov-Ogievskiy > Cc: Fam Zheng > Cc: Max Reitz > Cc: John

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

2018-01-31 Thread Eric Blake
On 01/31/2018 12:35 PM, Max Reitz wrote: >>> Not sure how useful 2 is, though. (I don't know. I always hear about >>> people wanting to optimize for such a case where a backing file is >>> shorter than the overlay, but I can't imagine a real use case for that.) >> >> I can; here's what's

Re: [Qemu-block] [Qemu-devel] [Bug 1739304] Re: Passing a directory to (eg.) -cdrom results in misleading error message

2018-01-31 Thread John Snow
On 01/31/2018 01:36 PM, Michal Suchánek wrote: > On Wed, 20 Dec 2017 21:57:00 -0500 > John Snow wrote: > >> On 12/20/2017 05:31 AM, Dr. David Alan Gilbert wrote: >>> Yep, can repeat it here, it seems pretty random which error it >>> gives: >>> >>> [dgilbert@dgilbert-t530

Re: [Qemu-block] [Qemu-devel] [Bug 1739304] Re: Passing a directory to (eg.) -cdrom results in misleading error message

2018-01-31 Thread Michal Suchánek
On Wed, 20 Dec 2017 21:57:00 -0500 John Snow wrote: > On 12/20/2017 05:31 AM, Dr. David Alan Gilbert wrote: > > Yep, can repeat it here, it seems pretty random which error it > > gives: > > > > [dgilbert@dgilbert-t530 try]$ ./x86_64-softmmu/qemu-system-x86_64 > > -cdrom /tmp

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

2018-01-31 Thread Max Reitz
On 2018-01-31 19:32, Eric Blake wrote: > On 01/31/2018 11:40 AM, Max Reitz wrote: > >>> Maybe it's good enough to cover these cases: >>>  1. no backing >>>  2. beyond bdrv_getlength() in backing >>>  3. unallocated in backing qcow2 (covers 'beyond bdrv_getlength() >>>  

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

2018-01-31 Thread Eric Blake
On 01/31/2018 11:40 AM, Max Reitz wrote: >> Maybe it's good enough to cover these cases: >>  1. no backing >>  2. beyond bdrv_getlength() in backing >>  3. unallocated in backing qcow2 (covers 'beyond bdrv_getlength() >>   in backing->file') >> >> 1 & 2 are

Re: [Qemu-block] [PATCH] block: implement the bdrv_reopen_prepare helper for LUKS driver

2018-01-31 Thread Max Reitz
On 2018-01-18 11:31, Daniel P. Berrange wrote: > If the bdrv_reopen_prepare helper isn't provided, the qemu-img commit > command fails to re-open the base layer after committing changes into > it. Provide a no-op implementation for the LUKS driver, since there > is not any custom work that needs

Re: [Qemu-block] [PATCH v7 3/9] block: introduce BDRV_REQ_ALLOCATE flag

2018-01-31 Thread Max Reitz
On 2018-01-30 13:34, Anton Nefedov wrote: > > > On 29/1/2018 10:37 PM, Max Reitz wrote: >> On 2018-01-18 18:49, 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

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

2018-01-31 Thread Max Reitz
On 2018-01-30 13:15, Anton Nefedov wrote: > > > On 29/1/2018 10:26 PM, Eric Blake wrote: >> On 01/29/2018 01:21 PM, Max Reitz wrote: >>> On 2018-01-18 18:48, Anton Nefedov wrote: Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake

Re: [Qemu-block] [PATCH v2 6/6] block: Deprecate "backing": ""

2018-01-31 Thread Eric Blake
On 01/20/2018 09:44 AM, Max Reitz wrote: > We have a clear replacement, so let's deprecate it. > > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 4 ++-- > block.c | 4 > qemu-doc.texi| 7 +++ > qemu-options.hx | 4 ++-- > 4 files

Re: [Qemu-block] [PATCH v2 4/6] qapi: Make more of qobject_to()

2018-01-31 Thread Alberto Garcia
On Sat 20 Jan 2018 04:44:10 PM CET, Max Reitz wrote: > This patch reworks some places which use either qobject_type() checks > plus qobject_to(), where the latter alone is sufficient, or NULL checks > plus qobject_type() checks where we can simply do a qobject_to() != NULL > check. > >

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/6] qapi: Replace qobject_to_X(o) by qobject_to(o, X)

2018-01-31 Thread Eric Blake
On 01/31/2018 10:11 AM, Eric Blake wrote: > On 01/20/2018 09:44 AM, Max Reitz wrote: >> This patch was generated using the following Coccinelle script: >> >> @@ >> expression Obj; >> @@ >> ( >> - qobject_to_qnum(Obj) >> + qobject_to(Obj, QNum) >> | >> - qobject_to_qstring(Obj) >> + qobject_to(Obj,

Re: [Qemu-block] [PATCH v2 2/6] qapi: Replace qobject_to_X(o) by qobject_to(o, X)

2018-01-31 Thread Eric Blake
On 01/20/2018 09:44 AM, Max Reitz wrote: > This patch was generated using the following Coccinelle script: > > @@ > expression Obj; > @@ > ( > - qobject_to_qnum(Obj) > + qobject_to(Obj, QNum) > | > - qobject_to_qstring(Obj) > + qobject_to(Obj, QString) > | > - qobject_to_qdict(Obj) > +

Re: [Qemu-block] [PATCH v2 3/6] qapi: Remove qobject_to_X() functions

2018-01-31 Thread Alberto Garcia
On Sat 20 Jan 2018 04:44:09 PM CET, Max Reitz wrote: > They are no longer needed now. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH v2 2/6] qapi: Replace qobject_to_X(o) by qobject_to(o, X)

2018-01-31 Thread Alberto Garcia
On Sat 20 Jan 2018 04:44:08 PM CET, Max Reitz wrote: > This patch was generated using the following Coccinelle script: > > @@ > expression Obj; > @@ > ( > - qobject_to_qnum(Obj) > + qobject_to(Obj, QNum) > | > - qobject_to_qstring(Obj) > + qobject_to(Obj, QString) > | > - qobject_to_qdict(Obj) > +

Re: [Qemu-block] [PATCH v2 1/6] qapi: Add qobject_to()

2018-01-31 Thread Alberto Garcia
On Sat 20 Jan 2018 04:44:07 PM CET, Max Reitz wrote: > This is a dynamic casting macro that, given a QObject type, returns an > object as that type or NULL if the object is of a different type (or > NULL itself). > > The macro uses lower-case letters because: > 1. There does not seem to be a hard

Re: [Qemu-block] Fwd: [RFC 2/4] qemu-socket: Allow custom socket options in socket_connect

2018-01-31 Thread Daniel P . Berrangé
On Wed, Jan 31, 2018 at 11:20:16PM +0800, Zihan Yang wrote: > Hi, Daniel > > >You've added all this extra functionality to pass arbitrary > >options, but then not used it in any of the later patches. > >We've been trying to remove complexity from this code, so > >I'm not in favour of adding new

[Qemu-block] Fwd: [RFC 2/4] qemu-socket: Allow custom socket options in socket_connect

2018-01-31 Thread Zihan Yang
Hi, Daniel >You've added all this extra functionality to pass arbitrary >options, but then not used it in any of the later patches. >We've been trying to remove complexity from this code, so >I'm not in favour of adding new functionality that is not >even used. You are right, unused

Re: [Qemu-block] [PATCH v7 4/9] block: treat BDRV_REQ_ALLOCATE as serialising

2018-01-31 Thread Alberto Garcia
On Thu 18 Jan 2018 06:49:02 PM CET, Anton Nefedov wrote: > -static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self) > +static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self, > + bool nowait) It's a bit

Re: [Qemu-block] [PATCH] vl: pause vcpus before stopping iothreads

2018-01-31 Thread Kevin Wolf
Am 31.01.2018 um 14:56 hat Stefan Hajnoczi geschrieben: > On Tue, Jan 30, 2018 at 05:54:56PM +0100, Kevin Wolf wrote: > > Am 30.01.2018 um 16:38 hat Stefan Hajnoczi geschrieben: > > > Commit dce8921b2baaf95974af8176406881872067adfa ("iothread: Stop threads > > > before main() quits") introduced

Re: [Qemu-block] [PATCH v6 2/2] qemu-img: Document --force-share / -U

2018-01-31 Thread Kevin Wolf
Am 31.01.2018 um 15:12 hat Stefan Hajnoczi geschrieben: > On Tue, Jan 30, 2018 at 05:38:20PM +0100, Kevin Wolf wrote: > > Am 30.01.2018 um 15:23 hat Eric Blake geschrieben: > > > On 01/30/2018 12:34 AM, Fam Zheng wrote: > > > > Signed-off-by: Fam Zheng > > > > Signed-off-by:

Re: [Qemu-block] [PATCH v2] qcow2: Replace align_offset() with ROUND_UP()

2018-01-31 Thread Eric Blake
On 01/31/2018 04:21 AM, Alberto Garcia wrote: > The align_offset() function is equivalent to the ROUND_UP() macro so > there's no need to use the former. The ROUND_UP() name is also a bit > more explicit. > > This patch uses ROUND_UP() instead of the slower QEMU_ALIGN_UP() > because

Re: [Qemu-block] [PATCH] vl: pause vcpus before stopping iothreads

2018-01-31 Thread Stefan Hajnoczi
On Tue, Jan 30, 2018 at 05:54:56PM +0100, Kevin Wolf wrote: > Am 30.01.2018 um 16:38 hat Stefan Hajnoczi geschrieben: > > Commit dce8921b2baaf95974af8176406881872067adfa ("iothread: Stop threads > > before main() quits") introduced iothread_stop_all() to avoid the > > following virtio-scsi

Re: [Qemu-block] [PATCH] qcow2: Replace align_offset() with ROUND_UP()

2018-01-31 Thread Alberto Garcia
On Tue 30 Jan 2018 05:17:47 PM CET, Eric Blake wrote: -virtual_size = align_offset(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0), +virtual_size = ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0), cluster_size); >> >> I

[Qemu-block] [PATCH v2] qcow2: Replace align_offset() with ROUND_UP()

2018-01-31 Thread Alberto Garcia
The align_offset() function is equivalent to the ROUND_UP() macro so there's no need to use the former. The ROUND_UP() name is also a bit more explicit. This patch uses ROUND_UP() instead of the slower QEMU_ALIGN_UP() because align_offset() already requires that the second parameter is a power of

Re: [Qemu-block] [RFC 2/4] qemu-socket: Allow custom socket options in socket_connect

2018-01-31 Thread Daniel P . Berrangé
On Tue, Jan 30, 2018 at 03:13:42AM +0800, Zihan Yang wrote: > Currently, socket_connect doesn't allow custom socket options, > which is inconvenient when the caller wants a different kind of > socket from that the socket_connect provides. This patch allows > custom config in socket_connect by