[sheepdog] [PATCH] sheep: make 'collie vdi delete' wait for response synchronously

levin li levin108 at gmail.com
Wed Jun 27 12:29:47 CEST 2012


On 06/27/2012 06:13 PM, Christoph Hellwig wrote:
> On Wed, Jun 27, 2012 at 03:24:58PM +0800, levin li wrote:
>> From: levin li <xingke.lwp at taobao.com>
>>
>> this patch is based on my previous patch set:
>> http://lists.wpkg.org/pipermail/sheepdog/2012-June/004843.html
>> -------------------------------------------------------------- >8
>> VDI deletion work should response to client until all the objects
>> have been deleted just as what file system does, this patch makes
>> it call req_done to send back a response until deletion_one_done()
>> has been called.
> 
> I don't understand what the point of the blocking_list list is, as
> it never gets walked.
> 
> I'd rather implement the delaying req_done the following way:
> 
>  - add a "int refcnt" field to struct request
>  - req->refcount starts out as one when allocating a request
>  - req_done decrements req->refcnt, and only finishes the request
>    once req->refcount has reached zero
>  - req_done gets rename to e.g. put_request
>  - start_deletion increments the reference count
>  - delete_one_done does an addional put_request
> 

Ah, blocking_list is really not used, a refcnt or flag is OK for
this case, I'd rewrite this patch.

thanks,

levin




More information about the sheepdog mailing list