Project

General

Profile

Subtask #5862

Updated by Loïc Dachary over 10 years ago

"pull request":https://github.com/ceph/ceph/pull/546 

 vhobjects should be basically tuple<hobject_t, version_t, chunk_id_t> where chunk_id_t is probably uint8_t.    A chunk_id_t of ~0 should be reserved for the case where the chunk field is unused, as for osd metadata or for Replicated pg objects.    Similarly, a version_t value of ~0 should be reserved for osd metadata or Replicated pg objects.    I suggest that an hobject_t value of x should implicitely convert into a vhobject_t value of (x, ~0, ~0) and be represented by the same filename as currently represents x (same for the keys generated for DBObjectMap).    This suggests a natural upgrade path, values of (x, ~0, ~0) will continue to have filenames generated as they currently are.    New values of (x, y, z) will have y and z appended to the end. 

 - Create a vhobject_t object in os/hobject.h 
 - Add a vhobject_t(const hobject_t &oid); implicit constructor to allow FileStore methods with vhobject_t parameters to accept hobject_t arguments. 
 - Convert all interfaces to use vhobject_t rather than hobject_t 
 - Convert internals to use vhobject_t 
 - Convert users of collection_list to handle vhobject_t return values 
 - Convert filename and KeyValueDB key generation to handle both flavors of vhobject_t

Back