Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sage Weil committed Jul 6, 2011
2 parents 8f9eaf0 + 2aa146a commit 528b615
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2465,17 +2465,19 @@ 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;
num_flushing_caps++;
} 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;
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions src/mds/Locker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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());
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion src/mds/MDS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/mds/ScatterLock.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ class ScatterLock : public SimpleLock {
out << " dirty";
if (is_flushing())
out << " flushing";
if (is_flushed())
out << " flushed";
out << ")";
}
};
Expand Down

0 comments on commit 528b615

Please sign in to comment.