qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V5 03/13] block: add bdrv_can_read_snapshot() fu


From: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH V5 03/13] block: add bdrv_can_read_snapshot() function
Date: Mon, 28 Jan 2013 09:22:55 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

于 2013-1-26 2:11, Eric Blake 写道:
> On 01/23/2013 07:57 PM, Wenchao Xia wrote:
>>    Compared to bdrv_can_snapshot(), this function return whether
>> bs* is ready to read snapshot info from instead of write. If yes,
>> caller can then query snapshot information, but taking snapshot
>> is not always possible for that *bs may be read only.
>>
>> Signed-off-by: Wenchao Xia <address@hidden>
>> ---
>>   block.c               |   19 +++++++++++++++++++
>>   include/block/block.h |    1 +
>>   2 files changed, 20 insertions(+), 0 deletions(-)
>>
> 
>>   
>> +/* return whether internal snapshot can be read on @bs */
>> +int bdrv_can_read_snapshot(BlockDriverState *bs)
>> +{
> 
>> +/* return whether internal snapshot can be write on @bs */
>>   int bdrv_can_snapshot(BlockDriverState *bs)
> 
> I see you just copied existing code; but any reason why these functions
> return int instead of bool?  Would that be worth a separate cleanup patch?
> 
> Reviewed-by: Eric Blake <address@hidden>
> 
  Just follow bdrv_can_snapshot() style, no special reason.:)
I think it is OK for a clean up patch following.

-- 
Best Regards

Wenchao Xia




reply via email to

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