From: Ilya Dryomov Date: Tue, 15 Jun 2021 14:56:13 +0000 (+0200) Subject: rbd: don't disable rbd_discard_on_zeroed_write_same X-Git-Tag: v17.1.0~1583^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f29e862f8fa70fb1fba24a001d09c74852e633d7;p=ceph.git rbd: don't disable rbd_discard_on_zeroed_write_same 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 --- diff --git a/src/tools/rbd/action/Create.cc b/src/tools/rbd/action/Create.cc index 2199e009c84..9b38bee2eb3 100644 --- a/src/tools/rbd/action/Create.cc +++ b/src/tools/rbd/action/Create.cc @@ -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;