Skip to contentSkip to conversation

additional librados functions

DISCUSSION Christian Brunner 3 participants 3 messages May 13, 2010

lore
Share & tools
lore
#0 lore raw

Hi Yehuda,
Hi Sage,

while thinking about using RBD in our environment I came across two things:

1. I would like to be able to clone an image. This doesn't need to be based on a snapshot. Doing a simple copy of the objects would be sufficient. I could do this by using rados_read and rados_write easily. However I think that calling something like rados_copy would be more efficient, since the client wouldn't be involved. Would it be possible to provide such a call?

2. For accounting purposes I would like to read pool statistics. In the librados header file I can see that there are two structures () where the data may get stored. However I can't find a function to fill these structures. Am I missing something here?

Thanks,
Christian

#1 lore raw
Quoted 6 lines · Christian Brunner

1. I would like to be able to clone an image. This doesn't need to be based on a snapshot. Doing a simple copy of the objects would be sufficient. I could do this by using rados_read and rados_write easily. However I think that calling something like rados_copy would be more efficient, since the client wouldn't be involved.  Would it be possible to provide such a call?

This is something we keep thinking about but discarding as not important enough yet.
Probably any implementation we do come up with would involve the client telling each OSD with a chunk to copy their chunk to another specific OSD.
One issue that comes to mind with any rados-based copy is that it won't be atomic since it has to involve a sequence of instructions. Making the client read and write makes sure they know they're responsible for consistency across the copy without freezing up access to every object being copied for the entire duration.

Quoted 4 lines

2. For accounting purposes I would like to read pool statistics. In the librados header file I can see that there are two structures () where the data may get stored. However I can't find a function to fill these structures. Am I missing something here?

For this one, it looks like we simply never developed the C interface for those functions -- they exist in the C++ header and implementation!
-Greg
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 8 lines · Gregory Farnum
Quoted 4 lines · Christian Brunner

2. For accounting purposes I would like to read pool statistics. In the librados header file I can see that there are two structures () where the data may get stored. However I can't find a function to fill these structures. Am I missing something here?

For this one, it looks like we simply never developed the C interface for those functions -- they exist in the C++ header and implementation!

I added this to the C API and pushed to the unstable branch.

sage