mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
Merge pull request #652 from dachary/wip-ghobjects
common: ghobject sort order & get_filestore_key
This commit is contained in:
commit
e69baee07d
@ -241,14 +241,10 @@ public:
|
||||
return ret;
|
||||
}
|
||||
filestore_hobject_key_t get_filestore_key_u32() const {
|
||||
assert(!hobj.max);
|
||||
return hobj._reverse_nibbles(hobj.hash);
|
||||
return hobj.get_filestore_key_u32();
|
||||
}
|
||||
filestore_hobject_key_t get_filestore_key() const {
|
||||
if (hobj.max)
|
||||
return 0x100000000ull;
|
||||
else
|
||||
return get_filestore_key_u32();
|
||||
return hobj.get_filestore_key();
|
||||
}
|
||||
|
||||
// maximum sorted value.
|
||||
@ -292,8 +288,12 @@ namespace __gnu_cxx {
|
||||
|
||||
ostream& operator<<(ostream& out, const ghobject_t& o);
|
||||
|
||||
WRITE_EQ_OPERATORS_3(ghobject_t, hobj, generation, shard_id)
|
||||
// sort ghobject_t's by <hobj, generation, shard_id>
|
||||
WRITE_EQ_OPERATORS_3(ghobject_t, hobj, shard_id, generation)
|
||||
// sort ghobject_t's by <hobj, shard_id, generation>
|
||||
//
|
||||
// Two objects which differ by generation are more related than
|
||||
// two objects of the same generation which differ by shard.
|
||||
//
|
||||
WRITE_CMP_OPERATORS_3(ghobject_t,
|
||||
hobj,
|
||||
shard_id,
|
||||
|
Loading…
Reference in New Issue
Block a user