From f66e3b9251f1a5f8f83ec33e86aa570a50fc2729 Mon Sep 17 00:00:00 2001 From: sageweil Date: Wed, 11 Apr 2007 16:30:50 +0000 Subject: [PATCH] * lowered default pg count for now * fixed mds restart bug * osd quieter * default mds_beacon_grace is now higher git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1344 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/common/Mutex.h | 14 ++++++++++++++ trunk/ceph/config.cc | 2 +- trunk/ceph/mds/MDS.cc | 4 +++- trunk/ceph/mon/OSDMonitor.cc | 2 +- trunk/ceph/osd/OSD.cc | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/trunk/ceph/common/Mutex.h b/trunk/ceph/common/Mutex.h index c4615a3ff4c6e..325ba2a0e11fc 100755 --- a/trunk/ceph/common/Mutex.h +++ b/trunk/ceph/common/Mutex.h @@ -63,6 +63,20 @@ public: } friend class Cond; + + +public: + class Locker { + Mutex &mutex; + + public: + Locker(Mutex& m) : mutex(m) { + mutex.Lock(); + } + ~Locker() { + mutex.Unlock(); + } + }; }; #endif diff --git a/trunk/ceph/config.cc b/trunk/ceph/config.cc index ed5bb3eeb3ca7..6820ffa327b9f 100644 --- a/trunk/ceph/config.cc +++ b/trunk/ceph/config.cc @@ -166,7 +166,7 @@ md_config_t g_conf = { mds_decay_halflife: 30, mds_beacon_interval: 5.0, - mds_beacon_grace: 10.0, + mds_beacon_grace: 100.0, mds_log: true, mds_log_max_len: MDS_CACHE_SIZE / 3, diff --git a/trunk/ceph/mds/MDS.cc b/trunk/ceph/mds/MDS.cc index e5f3047ba51fd..c27cc98214fa3 100644 --- a/trunk/ceph/mds/MDS.cc +++ b/trunk/ceph/mds/MDS.cc @@ -571,10 +571,12 @@ void MDS::handle_osd_map(MOSDMap *m) { version_t had = osdmap->get_epoch(); + dout(10) << "handle_osd_map had " << had << endl; + // process locally objecter->handle_osd_map(m); - if (had == 0) { + if (had == 0 && osdmap->get_epoch() > 0) { if (is_creating()) boot_create(); // new tables, journal else if (is_starting()) diff --git a/trunk/ceph/mon/OSDMonitor.cc b/trunk/ceph/mon/OSDMonitor.cc index 8f0ee4484ea4f..8a1ff495515fd 100644 --- a/trunk/ceph/mon/OSDMonitor.cc +++ b/trunk/ceph/mon/OSDMonitor.cc @@ -139,7 +139,7 @@ void OSDMonitor::create_initial() } // 7 bits per osd. - osdmap.set_pg_bits(osdbits + 7); + osdmap.set_pg_bits(osdbits + 4); // FIXME } // start at epoch 0 until all osds boot diff --git a/trunk/ceph/osd/OSD.cc b/trunk/ceph/osd/OSD.cc index d2355cb4d32ff..c1e579db496fe 100644 --- a/trunk/ceph/osd/OSD.cc +++ b/trunk/ceph/osd/OSD.cc @@ -1647,7 +1647,7 @@ void OSD::handle_pg_notify(MOSDPGNotify *m) dout(10) << *pg << " osd" << from << " now clean (" << pg->clean_set << "): " << *it << dendl; if (pg->is_all_clean()) { - dout(-10) << *pg << " now clean on all replicas" << dendl; + dout(10) << *pg << " now clean on all replicas" << dendl; pg->state_set(PG::STATE_CLEAN); pg->clean_replicas(); } -- 2.39.5