Re: RBD Async request: When / How are the call back called ?

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

 



On 08/30/2012 07:52 AM, Mike Ryan wrote:
On Thu, Aug 30, 2012 at 02:16:36PM +0200, Sylvain Munaut wrote:
One more question: When I have async read pending, I would have
expected rbd_flush and/or rbd_close to wait for them to finish but
they dont. Is there a way to wait for all operation to be complete ?
Because if I shutdown everything before they are, the application
hangs ...

There's nothing in the API for that. You have to manually iterate over
all your completion contexts calling wait_for_safe_and_cb() on each.

Note: even if you don't have a callback, you should use the _cb()
version. I just fixed a use-after-free bug the was caused by this.

That's in librados.

In librbd there's only wait_for_complete(), which
waits for the callback to complete as well.

Josh
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux