From 445583a922c9eecf1eba60df4f9da49fb7bc8926 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 15 Nov 2017 08:24:50 -0500 Subject: [PATCH] test/librbd: disable compare and write if skipping partial discard Signed-off-by: Jason Dillaman (cherry picked from commit 4e8b0b60a72fe1e1ac10a2beb46b77d4b58c91c4) --- src/test/librbd/fsx.cc | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.47.3