From: Jason Dillaman Date: Wed, 15 Nov 2017 13:24:50 +0000 (-0500) Subject: test/librbd: disable compare and write if skipping partial discard X-Git-Tag: v12.2.3~84^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=445583a922c9eecf1eba60df4f9da49fb7bc8926;p=ceph.git test/librbd: disable compare and write if skipping partial discard Signed-off-by: Jason Dillaman (cherry picked from commit 4e8b0b60a72fe1e1ac10a2beb46b77d4b58c91c4) --- diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index 85596ef57562..baa1a21ea620 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -1962,6 +1962,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;