qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 5/8] block: wait for overlapping requests


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 5/8] block: wait for overlapping requests
Date: Thu, 17 Nov 2011 13:51:11 +0000

On Thu, Nov 17, 2011 at 1:43 PM, Paolo Bonzini <address@hidden> wrote:
> On 11/17/2011 02:40 PM, Stefan Hajnoczi wrote:
>>
>> When copy-on-read is enabled it is necessary to wait for overlapping
>> requests before issuing new requests.  This prevents races between the
>> copy-on-read and a write request.
>
> What about discards?

To get into an interesting scenario the guest would need to issue
overlapping read and discard requests.  QEMU with copy-on-read turns
this into either:

discard, read-from-backing-file, write-to-image-file
read-from-backing-file, discard, write-to-image-file
read-from-backing-file, write-to-image-file, discard

There is no issue with any of these orderings.  In the worst case we
end up with allocated image space where the guest issued a discard.
But since discard is a hint anyway it doesn't matter.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]