From: Stefan Hajnoczi <stefanha@redhat.com>
To: Akihiko Odaki <akihiko.odaki@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>,
pkrempa@redhat.com, qemu-block@nongnu.org,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Konstantin Nazarov <mail@knazarov.com>,
John Snow <jsnow@redhat.com>,
dgilbert@redhat.com
Subject: Re: [PATCH v3 1/2] block/file-posix: Optimize for macOS
Date: Thu, 1 Apr 2021 16:45:34 +0100 [thread overview]
Message-ID: <YGXqnlQDx3N22YV/@stefanha-x1.localdomain> (raw)
In-Reply-To: <20210310153916.64256-1-akihiko.odaki@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
On Thu, Mar 11, 2021 at 12:39:15AM +0900, Akihiko Odaki wrote:
> @@ -1586,6 +1589,7 @@ out:
> }
> }
>
> +G_GNUC_UNUSED
Why isn't translate_err() used in the F_PUNCHHOLE case below?
If you really want to avoid using it on macOS, please add a #if with the
necessary conditions here so it's clear when this translate_err() is
needed.
> @@ -514,7 +515,8 @@ static int raw_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz)
> return ret;
> }
>
> - if (!QEMU_IS_ALIGNED(s->offset, MAX(bsz->log, bsz->phys))) {
> + size = MAX(bsz->log, bsz->phys);
> + if (size && !QEMU_IS_ALIGNED(s->offset, size)) {
> return -ENOTSUP;
> }
>
This patch changes the semantics of bdrv_probe_blocksizes(). It used to
return -ENOTSUP when phys/log weren't available. Now it returns 0 and
the fields are 0. Please update the bdrv_probe_blocksizes doc comment in
include/block/block_int.h to mention phys and log, as well as that
fields can be set to 0 (or -1 in the case of discard_granularity).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-04-01 15:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 15:39 [PATCH v3 1/2] block/file-posix: Optimize for macOS Akihiko Odaki
2021-03-10 15:39 ` [PATCH v3 2/2] block: Add backend_defaults property Akihiko Odaki
2021-04-01 15:58 ` Stefan Hajnoczi
2021-04-01 15:45 ` Stefan Hajnoczi [this message]
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=YGXqnlQDx3N22YV/@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=akihiko.odaki@gmail.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=fam@euphon.net \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mail@knazarov.com \
--cc=mreitz@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).