]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: cancel tick timer on unmount, clean up debug output
authorSage Weil <sage@newdream.net>
Tue, 1 Apr 2008 14:02:33 +0000 (07:02 -0700)
committerSage Weil <sage@newdream.net>
Tue, 1 Apr 2008 14:02:33 +0000 (07:02 -0700)
src/client/Client.cc
src/messages/MClientLease.h
src/messages/MClientReply.h

index 3182d53dd36836492f7d2aa670056ce256f97d82..9d0d80116a0e3947289e3e2168a9f7895afee36e 100644 (file)
@@ -391,7 +391,7 @@ Inode* Client::insert_dentry_inode(Dir *dir, const string& dname, LeaseStat *dle
   if (dir->dentries.count(dname))
     dn = dir->dentries[dname];
 
-  dout(12) << "insert_dentry_inode " << dname << " ino " << ist->ino 
+  dout(12) << "insert_dentry_inode " << dname << " ino " << ist->ino
            << "  size " << ist->size
            << "  mtime " << ist->mtime
           << " dmask " << dmask
@@ -1694,6 +1694,9 @@ int Client::unmount()
   dout(2) << "unmounting" << dendl;
   unmounting = true;
 
+  timer.cancel_event(tick_event);
+  tick_event = 0;
+
   // NOTE: i'm assuming all caches are already flushing (because all files are closed).
   assert(fd_map.empty());
 
index 879d3bedd6a9b949ae62ce0fc900ec8cb884ebf7..a95a3848f22759140efdfbf10ea7543a1fee180a 100644 (file)
@@ -35,7 +35,7 @@ struct MClientLease : public Message {
   
   int get_action() { return h.action; }
   int get_mask() { return le16_to_cpu(h.mask); }
-  __u64 get_ino() { return le64_to_cpu(h.ino); }
+  inodeno_t get_ino() { return inodeno_t(le64_to_cpu(h.ino)); }
 
   MClientLease() : Message(CEPH_MSG_CLIENT_LEASE) {}
   MClientLease(int ac, int m, __u64 i) :
@@ -56,7 +56,7 @@ struct MClientLease : public Message {
   void print(ostream& out) {
     out << "client_lease(a=" << get_lease_action_name(get_action())
        << " mask " << get_mask();
-    out << " " << inodeno_t(get_ino());
+    out << " " << get_ino();
     if (dname.length())
       out << "/" << dname;
     out << ")";
index 7d16220a5e406059fc70053913cc4c77cf3a9818..a509ca8f28cac791dcb11f6fd19c16fadbe7defb 100644 (file)
@@ -99,7 +99,7 @@ struct DirStat {
 
 struct InodeStat {
   //inode_t inode;
-  __u64 ino;
+  inodeno_t ino;
   ceph_file_layout layout;
   utime_t ctime, mtime, atime;
   unsigned mode, uid, gid, nlink, rdev;