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

Christoph Hellwig hch at infradead.org
Wed Jun 27 12:13:19 CEST 2012


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




More information about the sheepdog mailing list