rbd: reference count parent requests
authorAlex Elder <elder@inktank.com>
Thu, 9 May 2013 03:50:04 +0000 (22:50 -0500)
committerAlex Elder <elder@inktank.com>
Mon, 13 May 2013 20:06:44 +0000 (15:06 -0500)
commita2acd00e7964dbb1668a5956c9d0a4bdeb838c4a
treec8da76d9bd9d6ee72ea5d1fdefa01f72199ef232
parente93f3152357ca75284284bef8eeea7d45fe1bab1
rbd: reference count parent requests

Keep a reference count for uses of the parent information for an rbd
device.

An initial reference is set in rbd_img_request_create() if the
target image has a parent (with non-zero overlap).  Each image
request for an image with a non-zero parent overlap gets another
reference when it's created, and that reference is dropped when the
request is destroyed.

The initial reference is dropped when the image gets torn down.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c