superblock.osd_fsid = store->get_fsid();
superblock.whoami = whoami;
superblock.compat_features = get_osd_initial_compat_set();
-
- logger().info(
- "{} writing superblock cluster_fsid {} osd_fsid {}",
- __func__,
- cluster_fsid,
- superblock.osd_fsid);
- return store->create_new_collection(coll_t::meta());
- }).then([this] (auto ch) {
- meta_coll = make_unique<OSDMeta>(ch , store.get());
- ceph::os::Transaction t;
- meta_coll->create(t);
- meta_coll->store_superblock(t, superblock);
- return store->do_transaction(meta_coll->collection(), std::move(t));
+ return _write_superblock();
}).then([cluster_fsid, this] {
return when_all_succeed(
store->write_meta("ceph_fsid", cluster_fsid.to_string()),
});
}
+seastar::future<> OSD::_write_superblock()
+{
+ logger().info(
+ "{} writing superblock cluster_fsid {} osd_fsid {}",
+ __func__,
+ superblock.cluster_fsid,
+ superblock.osd_fsid);
+ return store->create_new_collection(coll_t::meta()).then([this] (auto ch) {
+ meta_coll = make_unique<OSDMeta>(ch , store.get());
+ ceph::os::Transaction t;
+ meta_coll->create(t);
+ meta_coll->store_superblock(t, superblock);
+ return store->do_transaction(meta_coll->collection(), std::move(t));
+ });
+}
+
namespace {
entity_addrvec_t pick_addresses(int what) {
entity_addrvec_t addrs;
uint64_t send_pg_stats();
private:
+ seastar::future<> _write_superblock();
seastar::future<> start_boot();
seastar::future<> _preboot(version_t oldest_osdmap, version_t newest_osdmap);
seastar::future<> _send_boot();