Re: [PATCH 1/9] rbd: do not allow remove of mounted-on image

2012-12-14 Thread Sage Weil
Reviewed-by: Sage Weil On Thu, 13 Dec 2012, Alex Elder wrote: > There is no check in rbd_remove() to see if anybody holds open the > image being removed. That's not cool. > > Add a simple open count that goes up and down with opens and closes > (releases) of the device, and don't allow an rbd

[PATCH 1/9] rbd: do not allow remove of mounted-on image

2012-12-13 Thread Alex Elder
There is no check in rbd_remove() to see if anybody holds open the image being removed. That's not cool. Add a simple open count that goes up and down with opens and closes (releases) of the device, and don't allow an rbd image to be removed if the count is non-zero. Protect the updates of the o