CEPH filesystem development
 help / color / mirror / Atom feed
From: Mike Ryan <mike.ryan@inktank.com>
To: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: RBD Async request: When / How are the call back called ?
Date: Thu, 30 Aug 2012 07:52:10 -0700	[thread overview]
Message-ID: <20120830145209.GE19573@splice> (raw)
In-Reply-To: <CAF6-1L7GstF3ooOV7hOfCKXvFPP51Ce-mFovpt5oRm-_T=sffg@mail.gmail.com>

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.

  reply	other threads:[~2012-08-30 14:52 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 [this message]
2012-08-30 15:39       ` Josh Durgin

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=20120830145209.GE19573@splice \
    --to=mike.ryan@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    --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