Commit Graph

2 Commits

Author SHA1 Message Date
Ilya Dryomov
a9ed8d3279 qa: avoid page cache for krbd discard round off tests
rbd rounds off and ignores discards that are smaller than alloc_size,
but the page cache is invalidated according to the original offset and
length, before calling into the driver.  For a 512~4193792 discard, all
pages except for the first will be invalidated, but the first page may
remain cached after being partially zeroed out.  This results in an
inconsistency when alloc_size != 512.  E.g. for 64k:

                0       512     4k      64k             4M
                |       |       |       |               |
  page cache:   xxxxxxxx00000000xxxxxxxx0000000000000000
       RADOS:   xxxxxxxxxxxxxxxxxxxxxxxx0000000000000000

Given that these tests asserts on-disk state, we need to read directly
from disk.  krbd_discard_512b.t and krbd_zeroout.t are fine -- there is
no rounding there.

Fixes: https://tracker.ceph.com/issues/41753
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-09-17 22:20:27 +02:00
Ilya Dryomov
031bbea739 qa: krbd discard with alloc_size vs zeroout tests
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-02-02 18:33:32 +01:00