]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa: avoid page cache for krbd discard round off tests 30452/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 17 Sep 2019 16:55:18 +0000 (18:55 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 17 Sep 2019 20:20:27 +0000 (22:20 +0200)
commita9ed8d32791463d4b52985f688dd856d7aba7c60
treec4b82fa0b35377fcbf8cbd700dd51d73af9f7a55
parent712393daf303fd257ee0a3733a0f1d57ee131572
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>
qa/rbd/krbd_discard.t
qa/rbd/krbd_discard_4M.t