mds: Make SimpleLock wait shift bits unique like they should be.

This wasn't actually breaking stuff before, but it did mean
we woke up stuff we didn't need to.
This commit is contained in:
Greg Farnum 2010-09-22 11:14:08 -07:00
parent 2c5a3d99aa
commit 96c08e4fc3

View File

@ -228,16 +228,16 @@ public:
int get_wait_shift() {
switch (get_type()) {
case CEPH_LOCK_DN: return 8;
case CEPH_LOCK_DVERSION: return 8 + SimpleLock::WAIT_BITS;
case CEPH_LOCK_IAUTH: return 8 + 1*SimpleLock::WAIT_BITS;
case CEPH_LOCK_ILINK: return 8 + 2*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IDFT: return 8 + 3*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IFILE: return 8 + 4*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IVERSION: return 8 + 5*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IXATTR: return 8 + 6*SimpleLock::WAIT_BITS;
case CEPH_LOCK_ISNAP: return 8 + 7*SimpleLock::WAIT_BITS;
case CEPH_LOCK_INEST: return 8 + 8*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IFLOCK: return 8 + 9*SimpleLock::WAIT_BITS;
case CEPH_LOCK_DVERSION: return 8 + 1*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IAUTH: return 8 + 2*SimpleLock::WAIT_BITS;
case CEPH_LOCK_ILINK: return 8 + 3*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IDFT: return 8 + 4*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IFILE: return 8 + 5*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IVERSION: return 8 + 6*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IXATTR: return 8 + 7*SimpleLock::WAIT_BITS;
case CEPH_LOCK_ISNAP: return 8 + 8*SimpleLock::WAIT_BITS;
case CEPH_LOCK_INEST: return 8 + 9*SimpleLock::WAIT_BITS;
case CEPH_LOCK_IFLOCK: return 8 +10*SimpleLock::WAIT_BITS;
default:
assert(0);
}