All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wido den Hollander <wido@42on.com>
To: Noah Watkins <noah.watkins@inktank.com>
Cc: ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: Need some help with the RBD Java bindings
Date: Wed, 21 Aug 2013 14:11:34 +0200	[thread overview]
Message-ID: <5214AE76.7070304@42on.com> (raw)
In-Reply-To: <CA+Hcz58M-fz_qq6ZgEvxovj3OEGF6zG8TSFtsOOMkKUo-YZznw@mail.gmail.com>

On 08/20/2013 11:26 PM, Noah Watkins wrote:
> Wido,
>
> I pushed up a patch to
>
>     https://github.com/ceph/rados-java/commit/ca16d82bc5b596620609880e429ec9f4eaa4d5ce
>
> That includes a fix for this problem. The fix is a bit hacky, but the
> tests pass now. I included more details about the hack in the code.
>

I see. Works like a charm for me now. I'll do some further testing with 
CloudStack.

Wido

> On Thu, Aug 15, 2013 at 9:57 AM, Noah Watkins <noah.watkins@inktank.com> wrote:
>> On Thu, Aug 15, 2013 at 8:51 AM, Wido den Hollander <wido@42on.com> wrote:
>>>
>>> public List<RbdSnapInfo> snapList() throws RbdException {
>>>      IntByReference numSnaps = new IntByReference(16);
>>>      PointerByReference snaps = new PointerByReference();
>>>      List<RbdSnapInfo> list = new ArrayList<RbdSnapInfo>();
>>>      RbdSnapInfo snapInfo, snapInfos[];
>>>
>>>      while (true) {
>>>          int r = rbd.rbd_snap_list(this.getPointer(), snaps, numSnaps);
>>
>> I think you need to allocate the memory for `snaps` yourself. Here is
>> the RBD wrapper for Python which does that:
>>
>>    self.snaps = (rbd_snap_info_t * num_snaps.value)()
>>    ret = self.librbd.rbd_snap_list(image.image, byref(self.snaps),
>>                         byref(num_snaps))
>>
>> - Noah
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Wido den Hollander
42on B.V.

Phone: +31 (0)20 700 9902
Skype: contact42on

  reply	other threads:[~2013-08-21 12:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 15:51 Need some help with the RBD Java bindings Wido den Hollander
2013-08-15 16:57 ` Noah Watkins
2013-08-20 21:26   ` Noah Watkins
2013-08-21 12:11     ` Wido den Hollander [this message]
2013-08-21 19:47       ` Noah Watkins
2013-08-22  6:20         ` Wido den Hollander
2013-08-22 14:43           ` Noah Watkins

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=5214AE76.7070304@42on.com \
    --to=wido@42on.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=noah.watkins@inktank.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.