]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ReplicatedPG: do not create whiteout clones
authorSamuel Just <sam.just@inktank.com>
Tue, 8 Apr 2014 21:03:59 +0000 (14:03 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 21 Apr 2014 22:11:04 +0000 (15:11 -0700)
commitf3df50188b54e60e28a276762c370477538bbb07
tree8b8907af0e5eabb79db7850876b5076604950d31
parentcaa63565dd567f30eda3a721ecb5cddcd27b54de
ReplicatedPG: do not create whiteout clones

First, make_writeable treats whiteout heads like snapdir for
cloning purposes.  Second, to ensure that we send the correct
deletes on flush to the backing pool, we instead use oi.snaps
on any clone we are flushing to infer the snaps during which
head did not exist and send a delete as appropriate prior to
the copy_from.

Normally, we'd have a problem if the delete and the copy_from
completed, but an interval change intervened before the dirty
flag was cleared since we'd end up re-deleting the object.
To avoid that, we use the CEPH_OSD_FLAG_ORDERSNAP flag.

Additionally, we will use the correct snap_seq on the delete
or flush as appropriate to ensure that the previous clone
gets created with the same clone id as in the cache pool.

Fixes: #7942
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc