]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rush disk groups
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 4 May 2005 17:14:07 +0000 (17:14 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 4 May 2005 17:14:07 +0000 (17:14 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@202 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/osd/OSDMap.h

index 0368ec821ad6867afc6499b79567e0b5d76541d6..27e3de3d8e1f8cdc88e142c73ca96a027bdff66d 100644 (file)
 #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<int> osds;     // the list of osd addrs
+};
+
+
+/** OSDCluster
+ */
 class OSDCluster {
-  int      num_osds;
-  set<int> 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<OSDGroup> disk_groups; // RUSH disk groups
+  set<int> 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; }