From: Josh Durgin <josh.durgin@inktank.com>
To: Mike Ryan <mike.ryan@inktank.com>
Cc: Sylvain Munaut <s.munaut@whatever-company.com>,
ceph-devel@vger.kernel.org
Subject: Re: RBD Async request: When / How are the call back called ?
Date: Thu, 30 Aug 2012 08:39:35 -0700 [thread overview]
Message-ID: <503F8937.7020900@inktank.com> (raw)
In-Reply-To: <20120830145209.GE19573@splice>
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
prev parent reply other threads:[~2012-08-30 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 14:57 RBD Async request: When / How are the call back called ? Sylvain Munaut
2012-08-29 16:47 ` Mike Ryan
2012-08-29 16:48 ` Josh Durgin
2012-08-30 12:16 ` Sylvain Munaut
2012-08-30 14:52 ` Mike Ryan
2012-08-30 15:39 ` Josh Durgin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=503F8937.7020900@inktank.com \
--to=josh.durgin@inktank.com \
--cc=ceph-devel@vger.kernel.org \
--cc=mike.ryan@inktank.com \
--cc=s.munaut@whatever-company.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox