@@ -744,6 +744,7 @@ void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, list<C
case LOCK_EXCL_SYNC:
case LOCK_LOCK_SYNC:
case LOCK_MIX_SYNC:
+ case LOCK_XSYN_SYNC:
case LOCK_XLOCK:
case LOCK_XLOCKDONE:
if (lock->get_parent()->is_replicated()) {
@@ -3333,11 +3334,7 @@ bool Locker::simple_sync(SimpleLock *lock, bool *need_issue)
case LOCK_MIX: lock->set_state(LOCK_MIX_SYNC); break;
case LOCK_SCAN:
case LOCK_LOCK: lock->set_state(LOCK_LOCK_SYNC); break;
- case LOCK_XSYN:
- file_excl((ScatterLock*)lock, need_issue);
- if (lock->get_state() != LOCK_EXCL)
- return false;
- // fall-thru
+ case LOCK_XSYN: lock->set_state(LOCK_XSYN_SYNC); break;
case LOCK_EXCL: lock->set_state(LOCK_EXCL_SYNC); break;
default: assert(0);
}
@@ -110,6 +110,7 @@ public:
case LOCK_XSYN: return "xsyn";
case LOCK_XSYN_EXCL: return "xsyn->excl";
case LOCK_EXCL_XSYN: return "excl->xsyn";
+ case LOCK_XSYN_SYNC: return "xsyn->sync";
case LOCK_SYNC_MIX: return "sync->mix";
case LOCK_SYNC_MIX2: return "sync->mix(2)";
@@ -94,6 +94,7 @@ const struct sm_state_t filelock[LOCK_MAX] = {
[LOCK_MIX_SYNC] = { LOCK_SYNC, false, LOCK_MIX_SYNC2,0,0, 0, 0, 0, 0, 0, CEPH_CAP_GRD|CEPH_CAP_GLAZYIO,0,0,CEPH_CAP_GRD },
[LOCK_MIX_SYNC2] = { LOCK_SYNC, false, 0, 0, 0, 0, 0, 0, 0, 0, CEPH_CAP_GRD|CEPH_CAP_GLAZYIO,0,0,CEPH_CAP_GRD },
[LOCK_SNAP_SYNC] = { LOCK_SYNC, false, LOCK_LOCK, 0, 0, 0, 0, AUTH,0, 0, 0,0,0,0 },
+ [LOCK_XSYN_SYNC] = { LOCK_SYNC, true, LOCK_LOCK, AUTH, 0, AUTH,0, 0, 0, 0, 0,CEPH_CAP_GCACHE,0,0 },
[LOCK_LOCK] = { 0, false, LOCK_LOCK, AUTH, 0, REQ, AUTH,0, 0, 0, CEPH_CAP_GCACHE|CEPH_CAP_GBUFFER,0,0,0 },
[LOCK_SYNC_LOCK] = { LOCK_LOCK, false, LOCK_LOCK, AUTH, 0, REQ, 0, 0, 0, 0, CEPH_CAP_GCACHE,0,0,CEPH_CAP_GCACHE },
@@ -93,6 +93,7 @@ enum {
LOCK_XSYN,
LOCK_XSYN_EXCL,
LOCK_EXCL_XSYN,
+ LOCK_XSYN_SYNC,
LOCK_MAX,
};