]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
qa: krbd_fallocate.sh: zero can be munged to truncate
authorIlya Dryomov <idryomov@gmail.com>
Mon, 25 Mar 2019 19:59:29 +0000 (20:59 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 25 Mar 2019 21:06:14 +0000 (22:06 +0100)
commit673673f53d0c258e6096a05d9de979b2c20adddf
tree7b6079a8781503de5c63e93683fd2330cd61b431
parent1fdd8ed552adef8cae0861de4afeca4779daf1a8
qa: krbd_fallocate.sh: zero can be munged to truncate

The test case is issuing discards that span two objects: the tail of
the first object is truncated, the head of the second object is zeroed.
These discards aren't serial, so there is a race:

  discard i ~ i + 1: truncate i, zero i + 1
  discard i + 1 ~ i + 2: truncate i + 1, zero i + 2

can be executed as

  truncate i + 1, zero i + 2, truncate i, zero i + 1

For object i + 1, the sequence ends up being truncate tail, then zero
head.  This zero op is munged to truncate on the OSD, resulting in size
0 instead of OBJECT_SIZE / 2.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
qa/workunits/rbd/krbd_fallocate.sh