From: Sage Weil Date: Wed, 30 Nov 2011 04:46:42 +0000 (-0800) Subject: osd: rename OSDSuperblock::fsid -> cluster_fsid X-Git-Tag: v0.40~137^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=237b19cd2273af60ff12c9e890c49146f511d5a8;p=ceph.git osd: rename OSDSuperblock::fsid -> cluster_fsid Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 5a7ec946d2dc..17a0a5cf5fd1 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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; } diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 9b3d2378c316..e39dfe4382bf 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; } diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index b73600385749..b5b522813b1c 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -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); diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 62c00cf395b3..cbd694d76abf 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -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 << "]"