-
Notifications
You must be signed in to change notification settings - Fork 55.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crush: Ensuring at most num-rep osds are selected
Crush temporary buffers are allocated as per replica size configured by the user.When there are more final osds (to be selected as per rule) than the replicas, buffer overlaps and it causes crash.Now, it ensures that at most num-rep osds are selected even if more number of osds are allowed by indep rule. The fix for firstn rules is already merged as part of bug #9492. Required test files are added. Fixes: #9492 Signed-off-by: Johnu George johnugeo@cisco.com
- Loading branch information
Johnu George
committed
Oct 4, 2014
1 parent
38dde3d
commit 234b066
Showing
3 changed files
with
462 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$ crushtool -c "$TESTDIR/test-map-firstn-indep.txt" -o "$TESTDIR/test-map-firstn-indep.crushmap" | ||
$ crushtool -i "$TESTDIR/test-map-firstn-indep.crushmap" --test --rule 0 --x 1 --show-bad-mappings | ||
bad mapping rule 0 x 1 num_rep 9 result [93,80,88,87,56,50,53,72] | ||
bad mapping rule 0 x 1 num_rep 10 result [93,80,88,87,56,50,53,72] | ||
$ crushtool -i "$TESTDIR/test-map-firstn-indep.crushmap" --test --rule 1 --x 1 --show-bad-mappings | ||
bad mapping rule 1 x 1 num_rep 3 result [93,56] | ||
bad mapping rule 1 x 1 num_rep 4 result [93,56] | ||
bad mapping rule 1 x 1 num_rep 5 result [93,56] | ||
bad mapping rule 1 x 1 num_rep 6 result [93,56] | ||
bad mapping rule 1 x 1 num_rep 7 result [93,56] | ||
bad mapping rule 1 x 1 num_rep 8 result [93,56] | ||
bad mapping rule 1 x 1 num_rep 9 result [93,56] | ||
bad mapping rule 1 x 1 num_rep 10 result [93,56] | ||
$ rm -f "$TESTDIR/test-map-firstn-indep.crushmap" |
Oops, something went wrong.