Reading payload from rados_watchcb2_t callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I'm writing a small piece of code to call fsfreeze/unfreeze that can be invoked by a RADOS notify. I have the basic watch/notify
functionality working but I need to be able to determine if the notify message is to freeze or unfreeze, or maybe something
completely unrelated.

I'm looking at the rados_watchcb2_t callback and can see that the data payload is returned as a void pointer. This is where it all
starts to go a little pear shaped for my basic C skills. I think I have to cast the pointer to a (char *) but I still can't seem to
get anything useful from it.

I've been following some of the tests in the Ceph source and they seem to use some sort of typedef called a bufferlist, is this what
I need to try and look into?

Does anyone have any pointers (excuse the pun) as to how I would read the text part of the payload from it?

void watch_notify2_cb(void *arg, uint64_t notify_id, uint64_t cookie, uint64_t notifier_gid, void *data, size_t data_len)

Many Thanks,
Nick

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux