]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: document create3
authorSage Weil <sage@inktank.com>
Tue, 2 Oct 2012 03:55:28 +0000 (20:55 -0700)
committerSage Weil <sage@inktank.com>
Mon, 15 Oct 2012 22:34:03 +0000 (15:34 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/include/rbd/librbd.h

index badb9c6eed04933fa61d391eaf27ca407f4095ad..551184d4c4f0a859ecd5d566e4c8dbad02541a2b 100644 (file)
@@ -70,6 +70,23 @@ int rbd_list(rados_ioctx_t io, char *names, size_t *size);
 int rbd_create(rados_ioctx_t io, const char *name, uint64_t size, int *order);
 int rbd_create2(rados_ioctx_t io, const char *name, uint64_t size,
                uint64_t features, int *order);
+/**
+ * create new rbd image
+ *
+ * The stripe_unit must be a factor of the object size (1 << order).
+ * The stripe_count can be one (no intra-object striping) or greater
+ * than one.  The RBD_FEATURE_STRIPINGV2 must be specified if the
+ * stripe_unit != the object size and the stripe_count is != 1.
+ *
+ * @param io ioctx
+ * @param name image name
+ * @param size image size in bytes
+ * @param features initial feature bits
+ * @param order object/block size, as a power of two (object size == 1 << order)
+ * @param stripe_unit stripe unit size, in bytes.
+ * @param stripe_count number of objects to stripe over before looping
+ * @return 0 on success, or negative error code
+ */
 int rbd_create3(rados_ioctx_t io, const char *name, uint64_t size,
                uint64_t features, int *order,
                uint64_t stripe_unit, uint64_t stripe_count);