From: Stefan Hajnoczi <stefanha@gmail.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, kwolf@redhat.com,
fam@euphon.net, armbru@redhat.com, mreitz@redhat.com,
stefanha@redhat.com, den@openvz.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: add rough-block-status parameter
Date: Wed, 9 Jan 2019 12:33:24 +0000 [thread overview]
Message-ID: <20190109123324.GC18942@stefanha-x1.localdomain> (raw)
In-Reply-To: <20190108194552.45453-1-vsementsov@virtuozzo.com>
[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]
On Tue, Jan 08, 2019 at 10:45:52PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> bdrv_co_block_status digs bs->file for additional, more accurate search
> for hole inside region, reported as DATA by bs since 5daa74a6ebc.
>
> This accuracy is not free: assume we have qcow2 disk. Actually, qcow2
> knows, where are holes and where is data. But every block_status
> request calls lseek additionally. Assume a big disk, full of
> data, in any iterative copying block job (or img convert) we'll call
> lseek(HOLE) on every iteration, and each of these lseeks will have to
> iterate through all metadata up to the end of file. It's obviously
> ineffective behavior. And for many scenarios we don't need this lseek
> at all.
>
> So, add an option to omit calling lseek.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>
> Hi all!
>
> This is a continuation of "do not lseek in qcow2 block_status" thread
> (https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg05749.html)
I don't have time to participate in the discussion so my (uneducated?)
opinion doesn't count for much, but I wish it were possible to perform
this optimization automatically without introducing a new user-visible
option.
That way existing users benefit and new users don't have to learn about
a new option.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
prev parent reply other threads:[~2019-01-09 12:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 19:45 [Qemu-devel] [PATCH] file-posix: add rough-block-status parameter Vladimir Sementsov-Ogievskiy
2019-01-08 20:11 ` Eric Blake
2019-01-09 11:23 ` Kevin Wolf
2019-01-09 16:42 ` Paolo Bonzini
2019-01-09 16:51 ` Kevin Wolf
2019-01-09 16:55 ` Paolo Bonzini
2019-01-09 17:09 ` Kevin Wolf
2019-01-09 18:09 ` Denis V.Lunev
2019-01-09 17:00 ` Eric Blake
2019-01-09 12:33 ` 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=20190109123324.GC18942@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.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).