*/
CEPH_RBD_API int rbd_invalidate_cache(rbd_image_t image);
-CEPH_RBD_API int rbd_poll_io_events(rbd_image_t image, rbd_completion_t *comps, int numcomp, int max);
+CEPH_RBD_API int rbd_poll_io_events(rbd_image_t image, rbd_completion_t *comps, int numcomp);
CEPH_RBD_API int rbd_metadata_get(rbd_image_t image, const char *key, char *value, size_t *val_len);
CEPH_RBD_API int rbd_metadata_set(rbd_image_t image, const char *key, const char *value);
*/
int invalidate_cache();
- int poll_io_events(RBD::AioCompletion **comps, int numcomp, int max);
+ int poll_io_events(RBD::AioCompletion **comps, int numcomp);
int metadata_get(const std::string &key, std::string *value);
int metadata_set(const std::string &key, const std::string &value);
return r;
}
- int poll_io_events(ImageCtx *ictx, AioCompletion **comps, int numcomp, int max)
+ int poll_io_events(ImageCtx *ictx, AioCompletion **comps, int numcomp)
{
- if (numcomp < max || numcomp <= 0)
+ if (numcomp <= 0)
return -EINVAL;
CephContext *cct = ictx->cct;
- ldout(cct, 20) << __func__ << " " << ictx << " numcomp = " << numcomp << " max " << max << dendl;
+ ldout(cct, 20) << __func__ << " " << ictx << " numcomp = " << numcomp << dendl;
int i = 0;
Mutex::Locker l(ictx->completed_reqs_lock);
- while (i < max) {
+ while (i < numcomp) {
if (ictx->completed_reqs.empty())
break;
comps[i++] = ictx->completed_reqs.front();
int flush(ImageCtx *ictx);
int invalidate_cache(ImageCtx *ictx);
- int poll_io_events(ImageCtx *ictx, AioCompletion **comps, int numcomp, int max);
+ int poll_io_events(ImageCtx *ictx, AioCompletion **comps, int numcomp);
int metadata_list(ImageCtx *ictx, const string &last, uint64_t max, map<string, bufferlist> *pairs);
int metadata_get(ImageCtx *ictx, const std::string &key, std::string *value);
int metadata_set(ImageCtx *ictx, const std::string &key, const std::string &value);
return r;
}
- int Image::poll_io_events(RBD::AioCompletion **comps, int numcomp, int max)
+ int Image::poll_io_events(RBD::AioCompletion **comps, int numcomp)
{
AioCompletion *cs[numcomp];
ImageCtx *ictx = (ImageCtx *)ctx;
- tracepoint(librbd, poll_io_events_enter, numcomp, max);
- int r = librbd::poll_io_events(ictx, cs, numcomp, max);
+ tracepoint(librbd, poll_io_events_enter, numcomp);
+ int r = librbd::poll_io_events(ictx, cs, numcomp);
tracepoint(librbd, poll_io_events_exit, r);
if (r > 0) {
for (int i = 0; i < numcomp; ++i)
return r;
}
-extern "C" int rbd_poll_io_events(rbd_image_t image, rbd_completion_t *comps, int numcomp, int max)
+extern "C" int rbd_poll_io_events(rbd_image_t image, rbd_completion_t *comps, int numcomp)
{
librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
librbd::AioCompletion *cs[numcomp];
- tracepoint(librbd, poll_io_events_enter, numcomp, max);
- int r = librbd::poll_io_events(ictx, cs, numcomp, max);
+ tracepoint(librbd, poll_io_events_enter, numcomp);
+ int r = librbd::poll_io_events(ictx, cs, numcomp);
tracepoint(librbd, poll_io_events_exit, r);
if (r > 0) {
for (int i = 0; i < r; ++i)