hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/crush/crush.h
....@@ -17,7 +17,7 @@
1717 * The algorithm was originally described in detail in this paper
1818 * (although the algorithm has evolved somewhat since then):
1919 *
20
- * http://www.ssrc.ucsc.edu/Papers/weil-sc06.pdf
20
+ * https://www.ssrc.ucsc.edu/Papers/weil-sc06.pdf
2121 *
2222 * LGPL2
2323 */
....@@ -87,7 +87,7 @@
8787 struct crush_rule {
8888 __u32 len;
8989 struct crush_rule_mask mask;
90
- struct crush_rule_step steps[0];
90
+ struct crush_rule_step steps[];
9191 };
9292
9393 #define crush_rule_size(len) (sizeof(struct crush_rule) + \
....@@ -301,6 +301,12 @@
301301
302302 __u32 *choose_tries;
303303 #else
304
+ /* device/bucket type id -> type name (CrushWrapper::type_map) */
305
+ struct rb_root type_names;
306
+
307
+ /* device/bucket id -> name (CrushWrapper::name_map) */
308
+ struct rb_root names;
309
+
304310 /* CrushWrapper::choose_args */
305311 struct rb_root choose_args;
306312 #endif
....@@ -340,6 +346,15 @@
340346
341347 struct crush_work {
342348 struct crush_work_bucket **work; /* Per-bucket working store */
349
+#ifdef __KERNEL__
350
+ struct list_head item;
351
+#endif
343352 };
344353
354
+#ifdef __KERNEL__
355
+/* osdmap.c */
356
+void clear_crush_names(struct rb_root *root);
357
+void clear_choose_args(struct crush_map *c);
358
+#endif
359
+
345360 #endif