pyocf: composite volume tests

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2022-06-13 11:35:16 +02:00
committed by Jan Musial
parent 81396681f4
commit 69ef673bd1
2 changed files with 416 additions and 51 deletions

View File

@@ -479,13 +479,13 @@ class ErrorDevice(Volume):
self.complete_with_error(io)
def do_submit_flush(self, flush):
if self.data_only and self.should_forward_io(flush):
if self.data_only or self.should_forward_io(flush):
self.vol.do_submit_flush(flush)
else:
self.complete_with_error(flush)
def do_submit_discard(self, discard):
if self.data_only and self.should_forward_io(discard):
if self.data_only or self.should_forward_io(discard):
self.vol.do_submit_discard(discard)
else:
self.complete_with_error(discard)