Skip to content

Commit

Permalink
mon: calculate min_size on osd pool set size
Browse files Browse the repository at this point in the history
currently `osd pool set size` only modifies min_size when it is above new size,
while it should be recalculated unconditionally.

fixes: https://tracker.ceph.com/issues/44862
Signed-off-by: Deepika Upadhyay <[email protected]>
  • Loading branch information
Deepika Upadhyay committed Apr 2, 2020
1 parent 48942dc commit b69dcaa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7950,8 +7950,7 @@ int OSDMonitor::prepare_command_pool_set(const cmdmap_t& cmdmap,
return r;
}
p.size = n;
if (n < p.min_size)
p.min_size = n;
p.min_size = g_conf().get_osd_pool_default_min_size(p.size);
} else if (var == "min_size") {
if (p.has_flag(pg_pool_t::FLAG_NOSIZECHANGE)) {
ss << "pool min size change is disabled; you must unset nosizechange flag for the pool first";
Expand Down

0 comments on commit b69dcaa

Please sign in to comment.