*** empty log message ***

git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@398 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
sage 2005-07-05 17:28:24 +00:00
parent 1ea60c98b7
commit 54491e317c
4 changed files with 16 additions and 8 deletions

View File

@ -76,6 +76,7 @@ md_config_t g_conf = {
mds_bal_interval: 30, // seconds
mds_bal_idle_threshold: .1,
mds_bal_max: -1,
mds_bal_max_until: -1,
mds_commit_on_shutdown: true,
@ -188,6 +189,8 @@ void parse_config_options(int argc, char **argv,
g_conf.mds_bal_interval = atoi(argv[++i]);
else if (strcmp(argv[i], "--mds_bal_max") == 0)
g_conf.mds_bal_max = atoi(argv[++i]);
else if (strcmp(argv[i], "--mds_bal_max_until") == 0)
g_conf.mds_bal_max_until = atoi(argv[++i]);
else if (strcmp(argv[i], "--client_cache_size") == 0)
g_conf.client_cache_size = atoi(argv[++i]);

View File

@ -51,6 +51,7 @@ struct md_config_t {
int mds_bal_interval;
float mds_bal_idle_threshold;
int mds_bal_max;
int mds_bal_max_until;
bool mds_commit_on_shutdown;
bool mds_verify_export_dirauth; // debug flag

View File

@ -444,8 +444,12 @@ void MDS::my_dispatch(Message *m)
// balance?
static int num_bal_times = g_conf.mds_bal_max;
static timepair_t first = g_clock.gettimepair();
timepair_t now = g_clock.gettimepair();
if (true && num_bal_times && whoami == 0 &&
timepair_t elapsed = now - first;
if (true &&
whoami == 0 &&
(num_bal_times || (g_conf.mds_bal_max_until >= 0 && elapsed.first > g_conf.mds_bal_max_until)) &&
!shutting_down && !shut_down &&
now.first - last_balancer_heartbeat.first >= g_conf.mds_bal_interval) {
last_balancer_heartbeat = now;

View File

@ -442,21 +442,21 @@ void MDStore::do_commit_dir_2( int result,
// dentry
if (committed_version > dn->get_parent_dir_version()) {
dout(5) << " dir " << committed_version << " > dn " << dn->get_parent_dir_version() << " still clean " << *dn << endl;
dout(15) << " dir " << committed_version << " > dn " << dn->get_parent_dir_version() << " still clean " << *dn << endl;
assert(!dn->is_dirty());
}
else if (dn->get_parent_dir_version() == committed_version) {
dout(5) << " dir " << committed_version << " == dn " << dn->get_parent_dir_version() << " now clean " << *dn << endl;
dout(15) << " dir " << committed_version << " == dn " << dn->get_parent_dir_version() << " now clean " << *dn << endl;
dn->mark_clean(); // might not but could be dirty
// remove, if it's null and unlocked
if (dn->is_null() && dn->is_sync()) {
dout(5) << " removing clean and null " << *dn << endl;
dout(15) << " removing clean and null " << *dn << endl;
null_clean.push_back(dn);
continue;
}
} else {
dout(5) << " dir " << committed_version << " < dn " << dn->get_parent_dir_version() << " still dirty " << *dn << endl;
dout(15) << " dir " << committed_version << " < dn " << dn->get_parent_dir_version() << " still dirty " << *dn << endl;
assert(committed_version < dn->get_parent_dir_version());
assert(dn->is_dirty() || !dn->is_sync());
}
@ -469,14 +469,14 @@ void MDStore::do_commit_dir_2( int result,
assert(in->is_auth());
if (committed_version > in->get_parent_dir_version()) {
dout(5) << " dir " << committed_version << " > inode " << in->get_parent_dir_version() << " still clean " << *(in) << endl;
dout(15) << " dir " << committed_version << " > inode " << in->get_parent_dir_version() << " still clean " << *(in) << endl;
assert(!in->is_dirty());
}
else if (in->get_parent_dir_version() == committed_version) {
dout(5) << " dir " << committed_version << " == inode " << in->get_parent_dir_version() << " now clean " << *(in) << endl;
dout(15) << " dir " << committed_version << " == inode " << in->get_parent_dir_version() << " now clean " << *(in) << endl;
in->mark_clean(); // might not but could be dirty
} else {
dout(5) << " dir " << committed_version << " < inode " << in->get_parent_dir_version() << " still dirty " << *(in) << endl;
dout(15) << " dir " << committed_version << " < inode " << in->get_parent_dir_version() << " still dirty " << *(in) << endl;
assert(committed_version < in->get_parent_dir_version());
assert(in->is_dirty());
}