]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: set FUA on writes in remove_full_try()
authorIlya Dryomov <idryomov@gmail.com>
Sat, 16 Oct 2021 21:12:34 +0000 (23:12 +0200)
committerDeepika Upadhyay <dupadhya@redhat.com>
Sat, 23 Oct 2021 16:34:58 +0000 (22:04 +0530)
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 <idryomov@gmail.com>
src/test/librbd/test_librbd.cc

index 1ea88f1ca68e019cd07274f74478ebf984d82815..825b915d0992d591c50a5a32ee33886ec30e8aa8 100644 (file)
@@ -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;
     }