On Thu, Feb 24, 2011 at 10:02 AM, Josh Durgin <josh.durgin@xxxxxxxxxxxxx> wrote: > On 02/23/2011 11:11 PM, Colin McCabe wrote: >> Here is the proposed C++ API for librados 0.25. >> The main changes are that I created class Pool, class Snap, and the >> ObjectIterator interface. > > I like the idea of a more OO interface. This will allow easily > stacking librbd on top of librados, eliminating the need for a > separate librbd pool type. > > I have a couple suggestions: > > - The pool_t parameters in the self-managed snap methods can be > removed, since they're part of the Pool class. > > - The aio_read/write functions can be members of Pool instead of > having a pool_t parameter. Yeah. > - aio_create_completion could be moved into Pool since it's only > used within the context of a pool. (librbd would need this unless > Pool had a get_rados method). Hmm. I'm not seeing the pool dependency for aio_create_completion. It looks like this has nothing to do with any particular pool. It's just a callback? > > Also, what is the constructor Pool(Rados *rados_, pool_t *pool_) > intended to be used for? I don't see a method to get a pool_t from > this API. Rados has to create Pools somehow, and that means they need a constructor. It could be hidden deeper using the usual C++ bag of tricks (like private constructors and friend functions), but it didn't seem necessary. Colin > > -Josh Durgin > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html