From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, stefanha@redhat.com
Cc: kwolf@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
asias@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] vmdk: fix cluster size check for flat extents
Date: Sun, 22 Sep 2013 08:53:56 +0800 [thread overview]
Message-ID: <20130922005356.GA2985@T430s.nay.redhat.com> (raw)
In-Reply-To: <523C6401.3020509@redhat.com>
On Fri, 09/20 17:04, Paolo Bonzini wrote:
> Il 19/09/2013 13:31, Stefan Hajnoczi ha scritto:
> >> > We use the extent size as cluster size for flat extents (where no L1/L2
> >> > table is allocated so it's safe).
> > Why is the extent size passed as the cluster size parameter?
>
> I think it's so that the flat extent doesn't take up too many cache entries.
>
> Paolo
Flat extent doesn't take cache entry at all. It's passed as this because so
that more the code path for finding data offset can be the same with sparse:
flat is a special case of sparse with only 1 cluster. Otherwize flat needs to
be treated specially.
Another fix would be pass zero to cluster size parameter but initialize it to
extent size after parameter checking. But not quite different.
Fam
next prev parent reply other threads:[~2013-09-22 0:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 11:14 [Qemu-devel] [PATCH 0/2] block: two fixes for image opening Fam Zheng
2013-09-18 11:14 ` [Qemu-devel] [PATCH 1/2] block: don't lose data from last incomplete sector Fam Zheng
2013-09-20 14:41 ` Stefan Hajnoczi
2013-09-18 11:14 ` [Qemu-devel] [PATCH 2/2] vmdk: fix cluster size check for flat extents Fam Zheng
2013-09-19 11:31 ` Stefan Hajnoczi
2013-09-20 15:04 ` Paolo Bonzini
2013-09-22 0:53 ` Fam Zheng [this message]
2013-09-19 11:31 ` [Qemu-devel] [PATCH 0/2] block: two fixes for image opening Stefan Hajnoczi
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=20130922005356.GA2985@T430s.nay.redhat.com \
--to=famz@redhat.com \
--cc=asias@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@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).