Re: proposed C API for librados

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

 



On Thu, Feb 24, 2011 at 7:25 AM, Sage Weil <sage@xxxxxxxxxxxx> wrote:
> On Wed, 23 Feb 2011, Colin McCabe wrote:
>> Yeah, should add something like that. Maybe something like this:
>>
>> int rados_pool_list(rados_t cluster, char ***pools)
>> void rados_pool_list_free(char **pools)
>>
>> Also should rename
>> rados_snap_set_read -> rados_snap_set_read_context for consistency.
>
> Well, on the read side, it's not actually a context.  You just need to
> specify a snapid.  On the write side, the context tells the OSDs which
> snapshots to keep/cow when doing a write.  You can't write to a snapshot.
> I'm not sure the details are relevant to API users, but at the very least
> I don't think there is a clear symmetry between the read/write side to
> make the calls look consistent.  This way it's clear they're not...
>

How about:
void rados_pool_snap_set_read(rados_pool_t pool, rados_snap_t snap);
int rados_pool_selfmanaged_snap_set_write_ctx(rados_pool_t pool,
rados_snap_t seq, rados_snap_t *snaps, int num_snaps);

The second one is getting long, but it ought to be clear that setting
the write context can only be done with selfmanaged snaps.

> ...
>
> The argument order for these is weird... not quite sure what I was
> thinking.  Let's do whatever pread and pwrite do?

pwrite has buf, count, offset, so we could go with that.

C.
--
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


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux