]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crush/builder.c
update sources to v12.1.1
[ceph.git] / ceph / src / crush / builder.c
index dc342d28a0168ceaa14952676a5933854fc28bc1..3b4ba25b277b4f35dc9c0816ec1783dbb629dedf 100644 (file)
@@ -1413,13 +1413,13 @@ struct crush_choose_arg *crush_make_choose_args(struct crush_map *map, int num_p
   int size = (sizeof(struct crush_choose_arg) * map->max_buckets +
               sizeof(struct crush_weight_set) * bucket_count * num_positions +
               sizeof(__u32) * sum_bucket_size * num_positions + // weights
-              sizeof(__u32) * sum_bucket_size); // ids
+              sizeof(__s32) * sum_bucket_size); // ids
   char *space = malloc(size);
   struct crush_choose_arg *arg = (struct crush_choose_arg *)space;
   struct crush_weight_set *weight_set = (struct crush_weight_set *)(arg + map->max_buckets);
   __u32 *weights = (__u32 *)(weight_set + bucket_count * num_positions);
   char *weight_set_ends = (char*)weights;
-  int *ids = (int *)(weights + sum_bucket_size * num_positions);
+  __s32 *ids = (__s32 *)(weights + sum_bucket_size * num_positions);
   char *weights_end = (char *)ids;
   char *ids_end = (char *)(ids + sum_bucket_size);
   BUG_ON(space + size != ids_end);
@@ -1442,7 +1442,7 @@ struct crush_choose_arg *crush_make_choose_args(struct crush_map *map, int num_p
     arg[b].weight_set_size = num_positions;
     weight_set += position;
 
-    memcpy(ids, bucket->h.items, sizeof(int) * bucket->h.size);
+    memcpy(ids, bucket->h.items, sizeof(__s32) * bucket->h.size);
     arg[b].ids = ids;
     arg[b].ids_size = bucket->h.size;
     ids += bucket->h.size;