[Top][All Lists]
[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
- [Qemu-devel] [PATCH v2 6/8] block: request overlap detection, (continued)
- [Qemu-devel] [PATCH v2 8/8] block: add -drive copy-on-read=on|off, Stefan Hajnoczi, 2011/11/17
- [Qemu-devel] [PATCH v2 3/8] block: add request tracking, Stefan Hajnoczi, 2011/11/17
- [Qemu-devel] [PATCH v2 2/8] coroutine: add qemu_co_queue_restart_all(), Stefan Hajnoczi, 2011/11/17
- [Qemu-devel] [PATCH v2 4/8] block: add bdrv_set_copy_on_read(), Stefan Hajnoczi, 2011/11/17
- [Qemu-devel] [PATCH v2 5/8] block: wait for overlapping requests, Stefan Hajnoczi, 2011/11/17
- [Qemu-devel] [PATCH v2 7/8] block: core copy-on-read logic, Stefan Hajnoczi, 2011/11/17
- Re: [Qemu-devel] [PATCH v2 7/8] block: core copy-on-read logic, Zhi Yong Wu, 2011/11/22