qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 7/8] block: core copy-on-read logic


From: Zhi Yong Wu
Subject: Re: [Qemu-devel] [PATCH v2 7/8] block: core copy-on-read logic
Date: Wed, 23 Nov 2011 17:51:42 +0800

On Wed, Nov 23, 2011 at 5:05 PM, Stefan Hajnoczi <address@hidden> wrote:
> On Wed, Nov 23, 2011 at 3:42 AM, Zhi Yong Wu <address@hidden> wrote:
>> On Thu, Nov 17, 2011 at 9:40 PM, Stefan Hajnoczi
>> <address@hidden> wrote:
>>>     tracked_request_begin(&req, bs, sector_num, nb_sectors, false);
>>> +
>>> +    if (bs->copy_on_read) {
>> Why is  tracked_request_begin/end() not put inside the brace around
>> bs->copy_on_read?
>> If this COR function is not enabled, i guess that request tracing
>> function should not be need.
>
> It's not safe to put the calls inside the "if (bs->copy_on_read) {"
> body because turning off copy_on_read while a request is pending would
> leave the request in the tracked list forever!
GOT IT, thanks.
>
> In a previous version of the series there was a flag to turn request
> tracking on/off.  Pending requests would still remove themselves from
> the list even after request tracking was disabled.
>
> But request tracking is cheap - it involves filling in fields on the
> stack and adding them to a linked list.  So to keep things simple we
> always maintain this list.
>
> Stefan
>



-- 
Regards,

Zhi Yong Wu



reply via email to

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