Commit 76ed07d
committed
librbd: make group and group snapshot IDs more random
Image IDs suffered from the same issue -- it was addressed in commit
be83736 ("librbd: block_name_prefix is not created randomly").
The code for generating group IDs is duplicated in api/Group.cc and
got missed.
Instead of cut-and-pasting the fix, just call generate_image_id()
directly and rename variables for more explicitness.
Before:
$ rados -p rbd ls | grep rbd_group_header
rbd_group_header.10256b8b4567
rbd_group_header.10216b8b4567
rbd_group_header.10236b8b4567
rbd_group_header.101f6b8b4567
After:
$ rados -p rbd ls | grep rbd_group_header
rbd_group_header.10255f555a5
rbd_group_header.1023f347eafb
rbd_group_header.101f24c75111
rbd_group_header.1021dda4e122
Fixes: https://tracker.ceph.com/issues/65573
Signed-off-by: Ilya Dryomov <[email protected]>1 parent a654945 commit 76ed07d
2 files changed
+7
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 56 | | |
68 | 57 | | |
69 | 58 | | |
| |||
523 | 512 | | |
524 | 513 | | |
525 | 514 | | |
526 | | - | |
527 | | - | |
528 | 515 | | |
529 | 516 | | |
| 517 | + | |
530 | 518 | | |
531 | | - | |
| 519 | + | |
532 | 520 | | |
533 | 521 | | |
534 | 522 | | |
535 | 523 | | |
536 | 524 | | |
537 | 525 | | |
538 | | - | |
539 | 526 | | |
540 | | - | |
| 527 | + | |
| 528 | + | |
541 | 529 | | |
542 | 530 | | |
543 | 531 | | |
| |||
547 | 535 | | |
548 | 536 | | |
549 | 537 | | |
550 | | - | |
| 538 | + | |
551 | 539 | | |
552 | 540 | | |
553 | 541 | | |
| |||
929 | 917 | | |
930 | 918 | | |
931 | 919 | | |
932 | | - | |
| 920 | + | |
933 | 921 | | |
934 | 922 | | |
935 | 923 | | |
| |||
0 commit comments