mirror of
https://github.com/ceph/ceph
synced 2025-01-11 05:29:51 +00:00
Merge pull request #29966 from idryomov/wip-krbd-zero-after-overlap
qa: krbd_parent_overlap.t: fix read test Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
commit
918fd28f88
@ -1,22 +1,27 @@
|
||||
|
||||
For reads, only the object extent needs to be reverse mapped:
|
||||
|
||||
$ rbd create --size 20M img
|
||||
$ rbd create --size 5M img
|
||||
$ DEV=$(sudo rbd map img)
|
||||
$ xfs_io -c 'pwrite 0 20M' $DEV >/dev/null
|
||||
$ xfs_io -c 'pwrite 0 5M' $DEV >/dev/null
|
||||
$ sudo rbd unmap $DEV
|
||||
$ rbd snap create img@snap
|
||||
$ rbd snap protect img@snap
|
||||
$ rbd clone img@snap cloneimg
|
||||
$ rbd resize --no-progress --size 5M --allow-shrink cloneimg
|
||||
$ rbd resize --no-progress --size 20M cloneimg
|
||||
$ rbd resize --no-progress --size 12M cloneimg
|
||||
$ DEV=$(sudo rbd map cloneimg)
|
||||
$ hexdump $DEV
|
||||
0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
|
||||
*
|
||||
0500000 0000 0000 0000 0000 0000 0000 0000 0000
|
||||
*
|
||||
1400000
|
||||
0c00000
|
||||
$ dd if=$DEV iflag=direct bs=4M status=none | hexdump
|
||||
0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
|
||||
*
|
||||
0500000 0000 0000 0000 0000 0000 0000 0000 0000
|
||||
*
|
||||
0c00000
|
||||
$ sudo rbd unmap $DEV
|
||||
$ rbd rm --no-progress cloneimg
|
||||
$ rbd snap unprotect img@snap
|
||||
|
Loading…
Reference in New Issue
Block a user