]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: disable compare and write if skipping partial discard 18887/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 15 Nov 2017 13:24:50 +0000 (08:24 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 16 Nov 2017 12:31:59 +0000 (07:31 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librbd/fsx.cc

index 9c3861acbfd8df3971183a59eb2c82a25152aa03..e5bd71bbf5046d4cc5956b28430e8a2b29d252f7 100644 (file)
@@ -2065,6 +2065,13 @@ docompareandwrite(unsigned offset, unsigned size)
 {
         int ret;
 
+        if (skip_partial_discard) {
+                if (!quiet && testcalls > simulatedopcount)
+                        prt("compare and write disabled\n");
+                log4(OP_SKIPPED, OP_COMPARE_AND_WRITE, offset, size);
+                return;
+        }
+
         offset -= offset % writebdy;
         if (o_direct)
                 size -= size % writebdy;