From: Max Reitz <mreitz@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 05/11] block: Use bdrv_has_zero_init_truncate()
Date: Fri, 26 Jul 2019 13:00:00 +0200 [thread overview]
Message-ID: <a0cc5892-f90a-e5c3-af6a-1482b7eb3056@redhat.com> (raw)
In-Reply-To: <20190726094307.x3rm5tvpsh3s4vp4@steredhat>
[-- Attachment #1.1: Type: text/plain, Size: 1741 bytes --]
On 26.07.19 11:43, Stefano Garzarella wrote:
> On Wed, Jul 24, 2019 at 07:12:33PM +0200, Max Reitz wrote:
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> block/parallels.c | 2 +-
>> block/vhdx.c | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/block/parallels.c b/block/parallels.c
>> index 00fae125d1..7cd2714b69 100644
>> --- a/block/parallels.c
>> +++ b/block/parallels.c
>> @@ -835,7 +835,7 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
>> goto fail_options;
>> }
>>
>> - if (!bdrv_has_zero_init(bs->file->bs)) {
>> + if (!bdrv_has_zero_init_truncate(bs->file->bs)) {
>> s->prealloc_mode = PRL_PREALLOC_MODE_FALLOCATE;
>> }
>>
>> diff --git a/block/vhdx.c b/block/vhdx.c
>> index d6070b6fa8..a02d1c99a7 100644
>> --- a/block/vhdx.c
>> +++ b/block/vhdx.c
>> @@ -1282,7 +1282,7 @@ static coroutine_fn int vhdx_co_writev(BlockDriverState *bs, int64_t sector_num,
>> /* Queue another write of zero buffers if the underlying file
>> * does not zero-fill on file extension */
>>
>> - if (bdrv_has_zero_init(bs->file->bs) == 0) {
>> + if (bdrv_has_zero_init_truncate(bs->file->bs) == 0) {
>> use_zero_buffers = true;
>>
>> /* zero fill the front, if any */
>> --
>> 2.21.0
>>
>
> What about describing in the commit message why we are using
> bdrv_has_zero_init_truncate() like in the cover letter?
Sure. (Not sure why I didn’t do it in the first place.)
> With or without:
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks for reviewing!
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-26 11:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 17:12 [Qemu-devel] [PATCH v2 00/11] block: Fix some things about bdrv_has_zero_init() Max Reitz
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 01/11] qemu-img: Fix bdrv_has_zero_init() use in convert Max Reitz
2019-07-25 15:28 ` Maxim Levitsky
2019-07-26 9:36 ` Stefano Garzarella
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 02/11] mirror: Fix bdrv_has_zero_init() use Max Reitz
2019-07-25 15:28 ` Maxim Levitsky
2019-07-25 16:21 ` Max Reitz
2019-07-25 16:24 ` Max Reitz
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 03/11] block: Add bdrv_has_zero_init_truncate() Max Reitz
2019-07-25 15:28 ` Maxim Levitsky
2019-07-26 9:04 ` Stefano Garzarella
2019-07-26 10:58 ` Max Reitz
2019-07-26 12:17 ` Stefano Garzarella
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 04/11] block: Implement .bdrv_has_zero_init_truncate() Max Reitz
2019-07-25 15:29 ` Maxim Levitsky
2019-07-26 9:42 ` Stefano Garzarella
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 05/11] block: Use bdrv_has_zero_init_truncate() Max Reitz
2019-07-25 15:29 ` Maxim Levitsky
2019-07-26 9:43 ` Stefano Garzarella
2019-07-26 11:00 ` Max Reitz [this message]
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 06/11] qcow2: Fix .bdrv_has_zero_init() Max Reitz
2019-07-25 15:29 ` Maxim Levitsky
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 07/11] vdi: " Max Reitz
2019-07-25 15:29 ` Maxim Levitsky
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 08/11] vhdx: " Max Reitz
2019-07-25 15:30 ` Maxim Levitsky
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 09/11] iotests: Convert to preallocated encrypted qcow2 Max Reitz
2019-07-25 15:30 ` Maxim Levitsky
2019-07-25 16:27 ` Max Reitz
2019-08-09 19:18 ` Max Reitz
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 10/11] iotests: Test convert -n to pre-filled image Max Reitz
2019-07-25 15:30 ` Maxim Levitsky
2019-07-24 17:12 ` [Qemu-devel] [PATCH v2 11/11] iotests: Full mirror to existing non-zero image Max Reitz
2019-08-09 19:31 ` [Qemu-devel] [PATCH v2 00/11] block: Fix some things about bdrv_has_zero_init() Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0cc5892-f90a-e5c3-af6a-1482b7eb3056@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).