Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbd: deprecate image format 1 #7841

Merged
merged 1 commit into from
Mar 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions PendingReleaseNotes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ v10.0.0
limit max waiting time of monitor election process, which was previously
restricted by 'mon_lease'.

* The rbd legacy image format (version 1) is deprecated with the Jewel release.
Attempting to create a new version 1 RBD image will result in a warning.
Future releases of Ceph will remove support for version 1 RBD images.

v9.3.0
======
* Some symbols wrongly exposed by librados in v9.1.0 and v9.2.0 were removed.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/8/rbd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Parameters

Specifies which object layout to use. The default is 1.

* format 1 - Use the original format for a new rbd image. This format is
understood by all versions of librbd and the kernel rbd module, but
does not support newer features like cloning.
* format 1 - (deprecated) Use the original format for a new rbd image. This
format is understood by all versions of librbd and the kernel rbd module,
but does not support newer features like cloning.

* format 2 - Use the second rbd format, which is supported by
librbd and kernel since version 3.11 (except for striping). This adds
Expand Down
3 changes: 3 additions & 0 deletions src/librbd/image/OpenRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ Context *OpenRequest<I>::handle_v1_detect_header(int *result) {
}
send_close_image(*result);
} else {
lderr(cct) << "RBD image format 1 is deprecated. "
<< "Please copy this image to image format 2." << dendl;

m_image_ctx->old_format = true;
m_image_ctx->header_oid = util::old_header_name(m_image_ctx->name);
send_register_watch();
Expand Down
4 changes: 2 additions & 2 deletions src/test/cli/rbd/help.t
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
Optional arguments
-p [ --pool ] arg pool name
--image arg image name
--image-format arg image format [1 or 2]
--image-format arg image format [1 (deprecated) or 2]
--new-format use image format 2
(deprecated)
--order arg object order [12 <= order <= 25]
Expand Down Expand Up @@ -473,7 +473,7 @@
--path arg import file (or '-' for stdin)
--dest-pool arg destination pool name
--dest arg destination image name
--image-format arg image format [1 or 2]
--image-format arg image format [1 (deprecated) or 2]
--new-format use image format 2
(deprecated)
--order arg object order [12 <= order <= 25]
Expand Down
3 changes: 2 additions & 1 deletion src/tools/rbd/ArgumentTypes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ void add_create_image_options(po::options_description *opt,
// TODO get default image format from conf
if (include_format) {
opt->add_options()
(IMAGE_FORMAT.c_str(), po::value<ImageFormat>(), "image format [1 or 2]")
(IMAGE_FORMAT.c_str(), po::value<ImageFormat>(),
"image format [1 (deprecated) or 2]")
(IMAGE_NEW_FORMAT.c_str(),
po::value<ImageNewFormat>()->zero_tokens(),
"use image format 2\n(deprecated)");
Expand Down
3 changes: 3 additions & 0 deletions src/tools/rbd/Utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ int get_image_options(const boost::program_options::variables_map &vm,
} else {
format = g_conf->rbd_default_format;
}
if (format == 1) {
std::cerr << "rbd: image format 1 is deprecated" << std::endl;
}

if (features_specified && features != 0) {
if (format_specified && format == 1) {
Expand Down