We want to go mix if there is a mix of RD and WR wanted, not
just multiple writers.
it != client_caps.end();
it++)
if (!it->second->is_stale() &&
- ((it->second->wanted() & CEPH_CAP_ANY_WR) || inode.is_dir())) {
+ ((it->second->wanted() & (CEPH_CAP_ANY_WR|CEPH_CAP_FILE_WR|CEPH_CAP_FILE_RD))
+ || inode.is_dir())) {
if (n)
return false;
n++;
(in->inode.is_dir() && in->multiple_nonstale_caps())) { // FIXME.. :/
dout(20) << " should lose it" << dendl;
// we should lose it.
- if ((other_wanted & CEPH_CAP_GWR) ||
+ if ((other_wanted & (CEPH_CAP_GRD|CEPH_CAP_GWR)) ||
lock->is_waiter_for(SimpleLock::WAIT_WR))
file_mixed(lock, need_issue);
else if (!lock->is_wrlocked()) // let excl wrlocks drain first