]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
minor unix group tweaking
authoranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 27 Mar 2007 19:06:25 +0000 (19:06 +0000)
committeranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 27 Mar 2007 19:06:25 +0000 (19:06 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1308 29311d96-e01e-0410-9327-a35deaab8ce9

branches/aleung/security1/ceph/.groups
branches/aleung/security1/ceph/mds/Locker.cc
branches/aleung/security1/ceph/mds/MDS.cc
branches/aleung/security1/ceph/mds/Server.cc
branches/aleung/security1/ceph/trace_convert.pl

index 2a96f7b2268e80a990b3d8d49f1b6f1164e34ab0..1234342ef6b92313c12c677ba169e3d612cf382b 100644 (file)
@@ -1,4 +1,4 @@
 1000 1000 3500 -1
 100 3407 -1
 1500 384 555 -1
-1020 340 341 342 343 344 345 346 -1
\ No newline at end of file
+1020 340 341 342 343 344 345 346 347 348 349 350 -1
\ No newline at end of file
index 8013e826a8991c417d3cc21e800dda0a275c28d5..f4a5530edf5ac1e17ef8cfbb177cc770fb789d34 100644 (file)
@@ -249,7 +249,7 @@ ExtCap* Locker::issue_new_extcaps(CInode *in, int mode, MClientRequest *req) {
     else
       ext_cap = in->get_unix_world_cap();
   }
-  if (g_conf.mds_group == 4) {
+  else if (g_conf.mds_group == 4) {
     if (mds->predict_cap_cache[in->ino()].count(my_user) == 0)
       ext_cap = 0;
     else
@@ -313,14 +313,14 @@ ExtCap* Locker::issue_new_extcaps(CInode *in, int mode, MClientRequest *req) {
     else if (g_conf.mds_group == 4) {
       // can we make any predictions?
       if (mds->precompute_succ.count(in->ino()) != 0) {
-       cout << "Making a prediction in capability for " << in->ino() << endl;
+       //cout << "Making a prediction in capability for " << in->ino() << endl;
        // add the hash
        hash_t inode_hash = mds->precompute_succ[in->ino()];
        ext_cap = new ExtCap(FILE_MODE_RW, my_user, my_group, inode_hash);
        ext_cap->set_type(USER_BATCH);
       }
       else {
-       cout << "Can't make predictions for this cap for " << in->ino() << endl;
+       //cout << "Can't make predictions for this cap for " << in->ino() << endl;
        ext_cap = new ExtCap(my_want, my_user, in->ino());
        ext_cap->set_type(0);
       }
@@ -343,9 +343,11 @@ ExtCap* Locker::issue_new_extcaps(CInode *in, int mode, MClientRequest *req) {
 
     // caches this capability in the inode
     if (g_conf.mds_group == 1) {
-      if (my_user == in->get_uid())
+      if (my_user == in->get_uid()) {
        in->set_unix_user_cap(ext_cap);
-      else if(my_user == in->get_gid())
+       in->set_unix_group_cap(ext_cap);
+      }
+      else if(my_group == in->get_gid())
        in->set_unix_group_cap(ext_cap);
       else
        in->set_unix_world_cap(ext_cap);
index d461f8d2f25b8dcf1320b79cf25d78ead634f7b6..a81aa93c7d76151e4cb24e0b0af0291818ab62fd 100644 (file)
@@ -167,14 +167,14 @@ MDS::MDS(int whoami, Messenger *m, MonMap *mm) : timer(mds_lock) {
       inodeno_t prediction;
       prediction = rp_predicter.predict_successor(mi->first);
       
-      cout << "Predictions for " << mi->first << ": ";
+      //cout << "Predictions for " << mi->first << ": ";
       while(prediction != inodeno_t()) {
-       cout << prediction << ", ";
+       //cout << prediction << ", ";
        inode_list.add_inode(prediction);
        prediction = rp_predicter.predict_successor(prediction);
 
       }
-      cout << "Cannot make any further predictions" << endl;
+      //cout << "Cannot make any further predictions" << endl;
 
       // cache the list
       if (inode_list.num_inodes() != 0) {
index dac2eb23c5a0299d689dd39576c35b6ea47f3df3..b7b656f4e7244fec248c35dac37f0e29dbdd503d 100644 (file)
@@ -2495,7 +2495,7 @@ void Server::handle_client_open(MClientRequest *req,
   utime_t sec_time_start = g_clock.now();
   ext_cap = mds->locker->issue_new_extcaps(cur, mode, req);
   utime_t sec_time_end = g_clock.now();
-  dout(1) << "Get security cap time " << sec_time_end - sec_time_start << endl;
+  dout(2) << "Get security cap time " << sec_time_end - sec_time_start << endl;
 
   Capability *cap = mds->locker->issue_new_caps(cur, mode, req);
   if (!cap) return; // can't issue (yet), so wait!
@@ -2505,7 +2505,7 @@ void Server::handle_client_open(MClientRequest *req,
   mds->balancer->hit_inode(cur, META_POP_IRD);
 
   end_time = g_clock.now();
-  dout(1) << "Open() request latency " << end_time - start_time << endl;
+  dout(2) << "Open() request latency " << end_time - start_time << endl;
   if (mds->logger) {
     mds->logger->finc("lsum", (double) end_time - start_time);
     mds->logger->inc("lnum");
index 34d7d54ca3319c1bc4336d0de5d5ae73cf0ed3b3..8b2a913f74b71ef71d434b5759b00830873ef740 100755 (executable)
@@ -21,6 +21,7 @@ for $file_handle(@files) {
        @file_data = <FILE>;
        my $line;
        my @args;
+       my @unclosed_fds;
        foreach $line (@file_data) {
 
            my $timestamp;
@@ -46,6 +47,7 @@ for $file_handle(@files) {
                    ($op, $path, $rest) = split(/\"/, $op);
                    print OUT "open\n$path\n102\n$ret_val\n";
                }
+               push @unclosed_fds;
            }
            elsif ($op =~ /close\(/) {
                my $nothing;