]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: clean up opent a bit
authorSage Weil <sage@newdream.net>
Fri, 30 Jan 2009 18:08:44 +0000 (10:08 -0800)
committerSage Weil <sage@newdream.net>
Fri, 30 Jan 2009 19:44:33 +0000 (11:44 -0800)
src/mds/Server.cc
src/mds/Server.h

index 742692e961fc8b9a6b48125abe63b62ac4df3e4c..44789d7ff1c4084906719911166702faa4aa83db 100644 (file)
@@ -4937,7 +4937,7 @@ void Server::handle_client_open(MDRequest *mdr)
        return;
       }
 
-      handle_client_opent(mdr);
+      handle_client_opent(mdr, cmode);
       return;
     }
   } 
@@ -4996,11 +4996,13 @@ void Server::handle_client_open(MDRequest *mdr)
 }
 
 
-void Server::handle_client_opent(MDRequest *mdr)
+void Server::handle_client_opent(MDRequest *mdr, int cmode)
 {
   CInode *in = mdr->ref;
   assert(in);
 
+  dout(10) << "handle_client_opent " << *in << dendl;
+
   mdr->ls = mdlog->get_current_segment();
   EUpdate *le = new EUpdate(mdlog, "open_truncate");
 
@@ -5023,7 +5025,6 @@ void Server::handle_client_opent(MDRequest *mdr)
   
   // do the open
   bool is_new = false;
-  int cmode = ceph_flags_to_mode(mdr->client_request->head.args.open.flags);
   SnapRealm *realm = in->find_snaprealm();
   Capability *cap = mds->locker->issue_new_caps(in, cmode, mdr->session, is_new, realm);
   if (is_new)
index d6c6eb745e1c771b247ff02f754821533bb79630..83ccf793cc89cfe7cefd4d95b5853225bf5afa35 100644 (file)
@@ -123,7 +123,7 @@ public:
   // open
   void handle_client_open(MDRequest *mdr);
   void handle_client_openc(MDRequest *mdr);  // O_CREAT variant.
-  void handle_client_opent(MDRequest *mdr);  // O_TRUNC variant.
+  void handle_client_opent(MDRequest *mdr, int cmode);  // O_TRUNC variant.
 
   // namespace changes
   void handle_client_mknod(MDRequest *mdr);