]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: don't disable rbd_discard_on_zeroed_write_same 41902/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 15 Jun 2021 14:56:13 +0000 (16:56 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 16 Jun 2021 20:07:07 +0000 (22:07 +0200)
After commit 0e8aa956a3b6 ("rbd: switch thick-provision image creation
to use new write_zeroes API") it is no longer necessary.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/tools/rbd/action/Create.cc

index 2199e009c84361e64455c5a489c8b760b33c96b0..9b38bee2eb3485cdacbff745bd6f1cbde2c9cf87 100644 (file)
@@ -175,14 +175,9 @@ err_writesame:
 
 int thick_write(const std::string &image_name,librados::IoCtx &io_ctx,
                 librbd::ImageOptions &opts, bool no_progress) {
-  int r = 0;
+  int r;
   librbd::Image image;
 
-  // To prevent writesame from discarding data, thick_write sets
-  // the rbd_discard_on_zeroed_write_same option to false.
-  ceph_assert(g_ceph_context != nullptr);
-  r = g_conf().set_val("rbd_discard_on_zeroed_write_same", "false");
-  ceph_assert(r == 0);
   r = utils::open_image(io_ctx, image_name, false, &image);
   if (r < 0) {
     return r;