V1 image format has been deprecated since the jewel release, so
forbit it. However some internal test cases still need v1 images
so allow their creation if the RBD_FORCE_ALLOW_V1 env var is set.
Signed-off-by: Julien Collet <julien.collet@cern.ch>
}
if (old_format) {
+ if ( !getenv("RBD_FORCE_ALLOW_V1") ) {
+ lderr(cct) << "Format 1 image creation unsupported. " << dendl;
+ return -EINVAL;
+ }
+ lderr(cct) << "Forced V1 image creation. " << dendl;
r = create_v1(io_ctx, image_name.c_str(), size, order);
} else {
ThreadPool *thread_pool;