]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: list obj which equals to pend 44978/head
authorKefu Chai <tchaikov@gmail.com>
Fri, 24 Sep 2021 15:33:03 +0000 (23:33 +0800)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 10 Feb 2022 14:44:51 +0000 (17:44 +0300)
commit088dd3f7d88a73f2c9470275a08c8eef791fc6f9
treed6b2b54a5dc6feeca60fabd88b9a6992fb44028d
parent007ee4f031c9630522cdf9e6df732d8cb0a1a424
os/bluestore: list obj which equals to pend

otherwise we could have failures like

scrub : stat mismatch, got 3/4 objects, 1/2 clones, 3/4 dirty, 3/4 omap, 0/0 pinned, 0/0 hit_set_archive, 0/0 whiteouts, 49/56 bytes, 0/0 manifest objects, 0/0 hit_set_archive bytes."

where the numbers of scrubbed object, clones, dirty and omap are always
less than the total number of corresponding numbers, if the PG contains
object(s) whose hash happens to be 0xffffffff.

in this change, if the calculated hash of the upper bound is greater
than the maximum possible number represented by uint32_t, in addition to
setting the hash of the upper bound hobj to 0xffffffff, we also set the
nspace of hobj of the upper bound to "\xff", so that the upper bound
is greater than an hobj whose hash happens to be 0xfffffff. please note,
the nspace of "\xff" is not an ascii string, so it's not likely to be
less than a real-world nspace of an hobj.

with this new *greater* upper bound, we are able to include the previous
missing hobj when listing the objects in a PG. so the scrub won't be
annoyed when the number of objects does not match.

Fixes: https://tracker.ceph.com/issues/52705
Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit ffab13bcd9006c1f961a24b8016df9d1fe06ba1d)

 Conflicts:
src/os/bluestore/BlueStore.cc
 - get_coll_range function signature alignment
src/os/bluestore/BlueStore.cc
src/test/objectstore/store_test.cc