]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: kill unused cap updating field
authorSage Weil <sage@newdream.net>
Sun, 19 Apr 2009 04:02:35 +0000 (21:02 -0700)
committerSage Weil <sage@newdream.net>
Sun, 19 Apr 2009 04:02:35 +0000 (21:02 -0700)
It was used to avoid cap release from occuring while cap flush/writeback
is happening, bc there is a cap pointer in the completion.  But the client
shouldn't be releasing a cap that is being written back in the first place.

src/mds/Capability.h
src/mds/Locker.cc

index d9dd6625e9f919ac03cff148907db1ed8e6d8467..d0bfe9ae2c7488bcc86b019b499e1756b8a18396 100644 (file)
@@ -172,8 +172,6 @@ private:
   bool stale;
 
 public:
-  int updating;   // do not release or expire until all updates commit
-
   snapid_t client_follows;
   version_t client_xattr_version;
   
@@ -188,7 +186,7 @@ public:
     _pending(0), _issued(0), _num_revoke(0),
     last_sent(0),
     mseq(0),
-    suppress(0), stale(false), updating(0),
+    suppress(0), stale(false),
     client_follows(0), client_xattr_version(0),
     session_caps_item(this), snaprealm_caps_item(this) { }
   
@@ -221,10 +219,6 @@ public:
     //check_rdcaps_list();
   }
 
-  bool can_expire() {
-    return updating == 0;
-  }
-
   ceph_seq_t get_last_seq() { return last_sent; }
   ceph_seq_t get_last_issue() { return last_issue; }
 
index aae949ac160f03e2f80649d1b0421daed82a7566..03389d4a8d9ae9efb7e40080319c8ac01ed57aed 100644 (file)
@@ -969,9 +969,6 @@ void Locker::file_update_finish(CInode *in, Mutation *mut, bool share, int clien
 
   mut->apply();
   
-  if (cap)
-    cap->updating--;
-
   if (ack)
     mds->send_message_client(ack, client);
 
@@ -1887,8 +1884,6 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap,
   mdcache->predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY, 0, follows);
   mdcache->journal_dirty_inode(mut, &le->metablob, in, follows);
 
-  cap->updating++;
-  
   mds->mdlog->submit_entry(le);
   mds->mdlog->wait_for_sync(new C_Locker_FileUpdate_finish(this, in, mut, change_max, 
                                                           client, cap, ack));