From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qed: do not evict in-use L2 table cache entries
Date: Thu, 01 Mar 2012 17:10:57 +0100 [thread overview]
Message-ID: <4F4F9F91.8080501@redhat.com> (raw)
In-Reply-To: <1330348561-9340-1-git-send-email-stefanha@linux.vnet.ibm.com>
Am 27.02.2012 14:16, schrieb Stefan Hajnoczi:
> The L2 table cache reduces QED metadata reads that would be required
> when translating LBAs to offsets into the image file. Since requests
> execute in parallel it is possible to share an L2 table between multiple
> requests.
>
> There is a potential data corruption issue when an in-use L2 table is
> evicted from the cache because the following situation occurs:
>
> 1. An allocating write performs an update to L2 table "A".
>
> 2. Another request needs L2 table "B" and causes table "A" to be
> evicted.
>
> 3. A new read request needs L2 table "A" but it is not cached.
>
> As a result the L2 update from #1 can overlap with the L2 fetch from #3.
> We must avoid doing overlapping I/O requests here since the worst case
> outcome is that the L2 fetch completes before the L2 update and yields
> stale data. In that case we would effectively discard the L2 update and
> lose data clusters!
>
> Thanks to Benoît Canet <benoit.canet@gmail.com> for extensive testing
> and debugging which lead to discovery of this bug.
>
> Reported-by: Benoît Canet <benoit.canet@gmail.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thanks, applied to the block branch.
How about a qemu-iotests case?
Kevin
next prev parent reply other threads:[~2012-03-01 16:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 13:16 [Qemu-devel] [PATCH] qed: do not evict in-use L2 table cache entries Stefan Hajnoczi
2012-03-01 11:04 ` Stefan Hajnoczi
2012-03-01 13:11 ` Benoît Canet
2012-03-01 16:10 ` Kevin Wolf [this message]
2012-03-01 16:22 ` Stefan Hajnoczi
2012-03-01 16:58 ` Kevin Wolf
2012-03-05 11:51 ` 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=4F4F9F91.8080501@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.