]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
* use int for mds state var
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 4 Jun 2007 16:25:49 +0000 (16:25 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 4 Jun 2007 16:25:49 +0000 (16:25 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1389 29311d96-e01e-0410-9327-a35deaab8ce9

trunk/ceph/mds/FileLock.h
trunk/ceph/mds/ScatterLock.h
trunk/ceph/mds/SimpleLock.h

index 2a89e42d4796e4257d2d2311b085d450a2a50ff6..e0acc3df279b47cc2c73a8ee5808aaefe996fb66 100644 (file)
@@ -99,7 +99,7 @@ class FileLock : public SimpleLock {
  public:
   FileLock(MDSCacheObject *o, int t, int wo) : SimpleLock(o, t, wo) { }
   
-  char get_replica_state() {
+  int get_replica_state() {
     switch (state) {
     case LOCK_LOCK:
     case LOCK_GLOCKM:
index 421a24b99236abe25f192db8e3cbb16a69c1b77a..564bc9155a6e36da83135c30339eb634784ed95f 100644 (file)
@@ -42,7 +42,7 @@ public:
   ScatterLock(MDSCacheObject *o, int t, int wo) : SimpleLock(o, t, wo),
                                                  num_wrlock(0) {}
 
-  char get_replica_state() {
+  int get_replica_state() {
     switch (state) {
     case LOCK_SYNC: 
     case LOCK_GSYNCS:
index b3b341cdfb795d6ba2228b2c1c109d79b2ee4935..9b5631cbae03e8a07f43d7012ed6fb5f97d421d4 100644 (file)
@@ -76,7 +76,7 @@ protected:
   int wait_offset;
 
   // lock state
-  char           state;
+  int           state;
   set<__int32_t> gather_set;  // auth
 
   // local state
@@ -121,8 +121,8 @@ public:
   
 
   // state
-  char get_state() { return state; }
-  char set_state(char s) { 
+  int get_state() { return state; }
+  int set_state(int s) { 
     state = s; 
     assert(!is_stable() || gather_set.size() == 0);  // gather should be empty in stable states.
     return s;
@@ -186,7 +186,7 @@ public:
 
   
   // simplelock specifics
-  char get_replica_state() {
+  int get_replica_state() {
     switch (state) {
     case LOCK_LOCK:
     case LOCK_GLOCKR: