]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: rename OSDSuperblock::fsid -> cluster_fsid
authorSage Weil <sage.weil@dreamhost.com>
Wed, 30 Nov 2011 04:46:42 +0000 (20:46 -0800)
committerSage Weil <sage@newdream.net>
Mon, 19 Dec 2011 16:12:10 +0000 (08:12 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mon/OSDMonitor.cc
src/osd/OSD.cc
src/osd/osd_types.cc
src/osd/osd_types.h

index 5a7ec946d2dc2cb3a253ecbdc9db94e28367afb2..17a0a5cf5fd1a07c3d5fa9356db9c055598b2651 100644 (file)
@@ -572,8 +572,9 @@ bool OSDMonitor::preprocess_boot(MOSDBoot *m)
     goto ignore;
   }
 
-  if (m->sb.fsid != mon->monmap->fsid) {
-    dout(0) << "preprocess_boot on fsid " << m->sb.fsid << " != " << mon->monmap->fsid << dendl;
+  if (m->sb.cluster_fsid != mon->monmap->fsid) {
+    dout(0) << "preprocess_boot on fsid " << m->sb.cluster_fsid
+           << " != " << mon->monmap->fsid << dendl;
     goto ignore;
   }
 
index 9b3d2378c316943f55a7b85a87e22557aca31939..e39dfe4382bfdbc20826af489c52b36cd73433f7 100644 (file)
@@ -263,7 +263,7 @@ int OSD::mkfs(const std::string &dev, const std::string &jdev, uuid_d fsid, int
   int ret;
   ObjectStore *store = NULL;
   OSDSuperblock sb;
-  sb.fsid = fsid;
+  sb.cluster_fsid = fsid;
   sb.whoami = whoami;
 
   try {
@@ -1530,9 +1530,9 @@ void OSD::reset_heartbeat_peers()
 
 void OSD::handle_osd_ping(MOSDPing *m)
 {
-  if (superblock.fsid != m->fsid) {
+  if (superblock.cluster_fsid != m->fsid) {
     dout(20) << "handle_osd_ping from " << m->get_source_inst()
-            << " bad fsid " << m->fsid << " != " << superblock.fsid << dendl;
+            << " bad fsid " << m->fsid << " != " << superblock.cluster_fsid << dendl;
     m->put();
     return;
   }
index b736003857499e15c2836f26a6833ad527b31cd0..b5b522813b1c4d13d8d68053c6a18aaec254a71a 100644 (file)
@@ -525,7 +525,7 @@ void OSDSuperblock::encode(bufferlist &bl) const
   __u8 v = 3;
   ::encode(v, bl);
 
-  ::encode(fsid, bl);
+  ::encode(cluster_fsid, bl);
   ::encode(whoami, bl);
   ::encode(current_epoch, bl);
   ::encode(oldest_map, bl);
@@ -545,7 +545,7 @@ void OSDSuperblock::decode(bufferlist::iterator &bl)
     string magic;
     ::decode(magic, bl);
   }
-  ::decode(fsid, bl);
+  ::decode(cluster_fsid, bl);
   ::decode(whoami, bl);
   ::decode(current_epoch, bl);
   ::decode(oldest_map, bl);
index 62c00cf395b38f2655ec8db482275839885aff36..cbd694d76abf179756d0f488b94f308e9e750503 100644 (file)
@@ -1107,7 +1107,7 @@ inline ostream& operator<<(ostream& out, const ObjectExtent &ex)
 
 class OSDSuperblock {
 public:
-  uuid_d fsid;
+  uuid_d cluster_fsid;
   int32_t whoami;    // my role in this fs.
   epoch_t current_epoch;             // most recent epoch
   epoch_t oldest_map, newest_map;    // oldest/newest maps we have.
@@ -1123,7 +1123,6 @@ public:
     whoami(-1), 
     current_epoch(0), oldest_map(0), newest_map(0), weight(0),
     mounted(0), clean_thru(0) {
-    memset(&fsid, 0, sizeof(fsid));
   }
 
   void encode(bufferlist &bl) const;
@@ -1133,7 +1132,7 @@ WRITE_CLASS_ENCODER(OSDSuperblock)
 
 inline ostream& operator<<(ostream& out, const OSDSuperblock& sb)
 {
-  return out << "sb(" << sb.fsid
+  return out << "sb(" << sb.cluster_fsid
              << " osd." << sb.whoami
              << " e" << sb.current_epoch
              << " [" << sb.oldest_map << "," << sb.newest_map << "]"