Skip to content

Commit

Permalink
Merge pull request #7026 from xdonghai/master
Browse files Browse the repository at this point in the history
rbd: must specify both of stripe-unit and stripe-count when specifying stripingv2 feature

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
  • Loading branch information
jdurgin committed Dec 23, 2015
2 parents ea131fe + 54b12f5 commit f8c4d04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/rbd/Utils.cc
Expand Up @@ -366,6 +366,10 @@ int get_image_options(const boost::program_options::variables_map &vm,
}
features |= RBD_FEATURE_STRIPINGV2;
} else {
if (features_specified && ((features & RBD_FEATURE_STRIPINGV2) != 0)) {
std::cerr << "must specify both of stripe-unit and stripe-count when specify striping features" << std::endl;
return -EINVAL;
}
features &= ~RBD_FEATURE_STRIPINGV2;
}

Expand Down

0 comments on commit f8c4d04

Please sign in to comment.