From 695e81ac0ffc875fe6b974e7a063893d9b964b4a Mon Sep 17 00:00:00 2001 From: sage Date: Wed, 4 May 2005 17:14:07 +0000 Subject: [PATCH] rush disk groups git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@202 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/osd/OSDMap.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/ceph/osd/OSDMap.h b/ceph/osd/OSDMap.h index 0368ec821ad68..27e3de3d8e1f8 100644 --- a/ceph/osd/OSDMap.h +++ b/ceph/osd/OSDMap.h @@ -19,18 +19,28 @@ #define MAX_FILE_SIZE (FILE_OBJECT_SIZE << OID_BLOCK_BITS) // 1 PB +/** OSDGroup + * a group of identical disks added to the OSD cluster + */ +class OSDGroup { + int size; // num disks in this group (aka num_disks_in_cluster[]) + int weight; // weight (for data migration etc.) (aka weight_cluster[]) + vector osds; // the list of osd addrs +}; + + +/** OSDCluster + */ class OSDCluster { - int num_osds; - set failed_disks; // list of failed disks (osd addr's) + __uint64_t version; // what version of the osd cluster descriptor is this - __uint64_t version; // what version of the osd cluster spec is this + // RUSH disk groups + vector disk_groups; // RUSH disk groups + set failed_disks; // list of failed disks - // state to handle migration to new size. public: - OSDCluster(int size) { - this->num_osds = size; - } + OSDCluster() : version(0) { } // cluster state bool is_failed(int osd) { return failed_disks.count(osd) ? true:false; } -- 2.39.5