]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ReplicatedPG::fill_in_copy_get: fix omap loop conditions 1372/head
authorSamuel Just <sam.just@inktank.com>
Wed, 5 Mar 2014 01:05:36 +0000 (17:05 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 5 Mar 2014 03:29:21 +0000 (19:29 -0800)
commit4cb1cbfbf336654e9884d5f5a3f110243ea893de
treedc8d26c4b22ec06b09d1b937024aa63ef5eb246f
parent11393ab7e5a5569d7d63652be71859336b747004
ReplicatedPG::fill_in_copy_get: fix omap loop conditions

cursor.omap_offet indicates the most recently recovered key, we continue
filling in at the smallest key k | k > cursor.omap_offset.  If the loop
as written terminates due to !(left > 0), iter points at the next key to
copy, rather than the last key copied, resulting in the next copy
operation skipping that key.

Now, iter, if valid, must point to the last key copied once the loop has
completed since we check left <= 0 prior to advancing iter.  We can
therefore use it to fill in cursor.omap_offset.

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