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: Wed, 29 Aug 2012 09:47:49 -0700 [thread overview]
Message-ID: <20120829164748.GA2142@splice> (raw)
In-Reply-To: <CAF6-1L5JfGW-cw45gTbOX7+igu9WnG7=fp75aoTg1HL4AtsF-Q@mail.gmail.com>
On Wed, Aug 29, 2012 at 04:57:39PM +0200, Sylvain Munaut wrote:
> How and when will the call back specified in a rbd_completion_t be called ?
>
> Imagine I do a rbd_aio_write and then do while (1); ... I don't see
> how the library could call my callback unless there is threads
> involved (and then my cb would be called in another thread context
> which is not great ...)
I believe it's called from another thread.
> My problem here is that I need to integrate inside the main loop of
> another software and I can't block, but I still need to be able to
> 'notify' when the requests are over. I can ask the scheduler of that
> main loop to call me on some even on a file descriptor (but I don't
> see any fd here), or to call me periodically (but I don't see any call
> to test for completion without waiting for it).
from include/rados/librados.hpp:
struct AioCompletion {
...
bool is_complete();
...
};
Is that sufficient?
next prev parent reply other threads:[~2012-08-29 16:47 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 [this message]
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
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=20120829164748.GA2142@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