From: Loic Dachary Date: Fri, 27 Sep 2013 17:09:23 +0000 (+0200) Subject: common: document ghobject sort order rationale X-Git-Tag: v0.71~40^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F652%2Fhead;p=ceph.git common: document ghobject sort order rationale Intuition differs regarding the sort order of the ghobject shard and generation. Document the rationale for the chosen sort order. Reviewed-by: Samuel Just Reviewed-by: David Zafman Signed-off-by: Loic Dachary --- diff --git a/src/common/hobject.h b/src/common/hobject.h index 46fc67b893a4..82eecf3bfc7b 100644 --- a/src/common/hobject.h +++ b/src/common/hobject.h @@ -288,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 +WRITE_EQ_OPERATORS_3(ghobject_t, hobj, shard_id, generation) +// sort ghobject_t's by +// +// 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,