From: Ilya Dryomov Date: Sat, 16 Oct 2021 21:12:34 +0000 (+0200) Subject: test/librbd: set FUA on writes in remove_full_try() X-Git-Tag: v17.1.0~615^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f5e1ce326e3bd55c8a16b4345a0bf284b6aef5a;p=ceph.git test/librbd: set FUA on writes in remove_full_try() Work around write-back or write-around cache getting enabled (e.g. if one runs the tests with rbd_cache_writethrough_until_flush disabled). Fixes: https://tracker.ceph.com/issues/52883 Signed-off-by: Ilya Dryomov --- diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 1ea88f1ca68e..825b915d0992 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -2145,7 +2145,8 @@ static void remove_full_try(rados_ioctx_t ioctx, const std::string& image_name, ssize_t ret; for (off = 0; off < size; off += len) { ret = rbd_write_zeroes(image, off, len, - RBD_WRITE_ZEROES_FLAG_THICK_PROVISION, 0); + RBD_WRITE_ZEROES_FLAG_THICK_PROVISION, + LIBRADOS_OP_FLAG_FADVISE_FUA); if (ret < 0) { break; }