Merge branch 'next'

This commit is contained in:
Sage Weil 2011-07-06 13:49:14 -07:00
commit 528b615112
4 changed files with 13 additions and 6 deletions

View File

@ -2465,10 +2465,6 @@ int Client::mark_caps_flushing(Inode *in)
int flushing = in->dirty_caps;
assert(flushing);
in->flushing_caps |= flushing;
in->dirty_caps = 0;
in->flushing_cap_seq = ++last_flush_seq;
if (flushing && !in->flushing_caps) {
ldout(cct, 10) << "mark_caps_flushing " << ccap_string(flushing) << " " << *in << dendl;
@ -2476,6 +2472,12 @@ int Client::mark_caps_flushing(Inode *in)
} else {
ldout(cct, 10) << "mark_caps_flushing (more) " << ccap_string(flushing) << " " << *in << dendl;
}
in->flushing_caps |= flushing;
in->dirty_caps = 0;
in->flushing_cap_seq = ++last_flush_seq;
session->flushing_caps.push_back(&in->flushing_cap_item);
return flushing;
@ -2815,7 +2817,8 @@ void Client::handle_cap_import(Inode *in, MClientCaps *m)
CEPH_CAP_FLAG_AUTH);
// reflush any/all caps
flush_snaps(in, true);
if (in->cap_snaps.size())
flush_snaps(in, true);
if (in->flushing_caps)
flush_caps(in, mds);

View File

@ -585,6 +585,7 @@ void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<C
case LOCK_MIX_SYNC2:
((ScatterLock *)lock)->finish_flush();
((ScatterLock *)lock)->clear_flushed();
case LOCK_SYNC_MIX2:
// do nothing, we already acked
@ -4135,6 +4136,7 @@ void Locker::handle_file_lock(ScatterLock *lock, MLock *m)
}
((ScatterLock *)lock)->finish_flush();
((ScatterLock *)lock)->clear_flushed();
// ok
lock->decode_locked_state(m->get_data());
@ -4157,6 +4159,7 @@ void Locker::handle_file_lock(ScatterLock *lock, MLock *m)
case LOCK_AC_LOCKFLUSHED:
((ScatterLock *)lock)->finish_flush();
((ScatterLock *)lock)->clear_flushed();
break;
case LOCK_AC_MIX:

View File

@ -1225,7 +1225,6 @@ void MDS::boot_start(int step, int r)
if (is_starting() ||
whoami == mdsmap->get_root()) { // load root inode off disk if we are auth
mdcache->open_root_inode(gather.new_sub());
break;
} else {
// replay. make up fake root inode to start with
mdcache->create_root_inode();

View File

@ -179,6 +179,8 @@ public:
out << " dirty";
if (is_flushing())
out << " flushing";
if (is_flushed())
out << " flushed";
out << ")";
}
};