n++;
return n;
}
+ bool multiple_nonstale_caps() {
+ int n = 0;
+ for (map<int,Capability*>::iterator it = client_caps.begin();
+ it != client_caps.end();
+ it++)
+ if (!it->second->is_stale()) {
+ if (n)
+ return true;
+ n++;
+ }
+ return false;
+
+ }
int get_loner() {
return loner_cap;
}
eval_cap_gather(in);
if (in->filelock.is_stable())
file_eval(&in->filelock);
+ if (in->authlock.is_stable())
+ eval(&in->authlock);
}
// done?
//!lock->is_rdlocked() &&
//!lock->is_waiter_for(SimpleLock::WAIT_WR) &&
(lock->get_scatter_wanted() ||
- (wanted & (CEPH_CAP_GRD|CEPH_CAP_GWR)))) {
+ (in->multiple_nonstale_caps() && (wanted & (CEPH_CAP_GRD|CEPH_CAP_GWR))))) {
dout(7) << "file_eval stable, bump to mixed " << *lock
<< " on " << *lock->get_parent() << dendl;
file_mixed(lock);