]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: add doxygen help for crush_destroy_{rule,bucket) 13589/head
authorLoic Dachary <ldachary@redhat.com>
Sun, 19 Feb 2017 09:24:13 +0000 (10:24 +0100)
committerLoic Dachary <ldachary@redhat.com>
Sun, 19 Feb 2017 09:24:13 +0000 (10:24 +0100)
Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/crush/builder.h
src/crush/crush.h

index 635d784266a1922f2878d3144c100e6bf16d21c1..aad103a97dea2530d9e138a76c5d2c8ba3edd03f 100644 (file)
@@ -55,6 +55,9 @@ extern void crush_finalize(struct crush_map *map);
  * crush_find_rule() when looking for a rule and by
  * __CRUSH_RULE_CHOOSE*__ steps when looking for items.
  *
+ * The caller is responsible for deallocating the returned pointer via
+ * crush_destroy_rule().
+ *
  * If __malloc(3)__ fails, return NULL.
  *
  * @param len number of steps in the rule
@@ -151,6 +154,9 @@ extern int crush_add_bucket(struct crush_map *map,
  * to have a weight equal to __weights[0]__, otherwise the weight of
  * __items[x]__ is set to be the value of __weights[x]__.
  *
+ * The caller is responsible for deallocating the returned pointer via
+ * crush_destroy_bucket().
+ *
  * @param map __unused__
  * @param alg algorithm for item selection
  * @param hash always set to CRUSH_HASH_RJENKINS1
@@ -158,6 +164,8 @@ extern int crush_add_bucket(struct crush_map *map,
  * @param size of the __items__ array
  * @param items array of __size__ items
  * @param weights the weight of each item in __items__, depending on __alg__
+ *
+ * @returns a pointer to the newly created bucket or NULL
  */
 struct crush_bucket *crush_make_bucket(struct crush_map *map, int alg, int hash, int type, int size, int *items, int *weights);
 /** @ingroup API
index 677ff565d148f30fafdbc534d16062c63a737340..6669bbf4b347eda21365219700affedf98083360 100644 (file)
@@ -393,7 +393,19 @@ extern void crush_destroy_bucket_list(struct crush_bucket_list *b);
 extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b);
 extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b);
 extern void crush_destroy_bucket_straw2(struct crush_bucket_straw2 *b);
+/** @ingroup API
+ *
+ * Deallocate a bucket created via crush_add_bucket().
+ *
+ * @param bucket the bucket to deallocate
+ */
 extern void crush_destroy_bucket(struct crush_bucket *b);
+/** @ingroup API
+ *
+ * Deallocate a rule created via crush_add_rule().
+ *
+ * @param r the rule to deallocate
+ */
 extern void crush_destroy_rule(struct crush_rule *r);
 /** @ingroup API
  *