]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mknod mds event;
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 26 Oct 2006 02:43:18 +0000 (02:43 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 26 Oct 2006 02:43:18 +0000 (02:43 +0000)
type munging

git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@950 29311d96-e01e-0410-9327-a35deaab8ce9

16 files changed:
ceph/client/Client.cc
ceph/client/Client.h
ceph/client/fuse.cc
ceph/include/types.h
ceph/mds/CDir.cc
ceph/mds/CInode.cc
ceph/mds/LogEvent.cc
ceph/mds/LogEvent.h
ceph/mds/MDCache.cc
ceph/mds/Server.cc
ceph/mds/events/EMknod.h [new file with mode: 0644]
ceph/mds/events/ETraced.h
ceph/mon/Monitor.h
ceph/osd/OSD.cc
ceph/osdc/ObjectCacher.cc
ceph/osdc/Objecter.cc

index 6cb506b87551591788d329c0064a70abfa18e154..d11706f9e87b1a5741369c049d85fae4c8dc699b 100644 (file)
@@ -107,7 +107,7 @@ Client::Client(Messenger *m, MonMap *mm)
   set_cache_size(g_conf.client_cache_size);
 
   // file handles
-  free_fh_set.map_insert(10, 1<<30);
+  free_fh_set.insert(10, 1<<30);
 
   // set up messengers
   messenger = m;
@@ -140,7 +140,7 @@ void Client::tear_down_cache()
        it != fh_map.end();
        it++) {
     Fh *fh = it->second;
-    dout(1) << "tear_down_cache forcing close of fh " << it->first << " ino " << hex << fh->inode->inode.ino << dec << endl;
+    dout(1) << "tear_down_cache forcing close of fh " << it->first << " ino " << fh->inode->inode.ino << endl;
     put_inode(fh->inode);
     delete fh;
   }
@@ -171,7 +171,7 @@ void Client::tear_down_cache()
 
 void Client::dump_inode(Inode *in, set<Inode*>& did)
 {
-  dout(1) << "dump_inode: inode " << hex << in->ino() << dec << " ref " << in->ref << " dir " << in->dir << endl;
+  dout(1) << "dump_inode: inode " << in->ino() << " ref " << in->ref << " dir " << in->dir << endl;
 
   if (in->dir) {
     dout(1) << "  dir size " << in->dir->dentries.size() << endl;
@@ -196,7 +196,7 @@ void Client::dump_cache()
        it++) {
     if (did.count(it->second)) continue;
     
-    dout(1) << "dump_cache: inode " << hex << it->first << dec
+    dout(1) << "dump_cache: inode " << it->first
             << " ref " << it->second->ref 
             << " dir " << it->second->dir << endl;
     if (it->second->dir) {
@@ -234,7 +234,7 @@ void Client::trim_cache()
     Dentry *dn = (Dentry*)lru.lru_expire();
     if (!dn) break;  // done
     
-    //dout(10) << "trim_cache unlinking dn " << dn->name << " in dir " << hex << dn->dir->inode->inode.ino << dec << endl;
+    //dout(10) << "trim_cache unlinking dn " << dn->name << " in dir " << hex << dn->dir->inode->inode.ino << endl;
     unlink(dn);
   }
 
@@ -256,7 +256,7 @@ Inode* Client::insert_inode(Dir *dir, InodeStat *st, const string& dname)
   if (dir->dentries.count(dname))
     dn = dir->dentries[dname];
 
-  dout(12) << "insert_inode " << dname << " ino " << hex << st->inode.ino << dec 
+  dout(12) << "insert_inode " << dname << " ino " << st->inode.ino 
            << "  size " << st->inode.size
            << "  mtime " << st->inode.mtime
            << "  hashed " << st->hashed
@@ -266,11 +266,11 @@ Inode* Client::insert_inode(Dir *dir, InodeStat *st, const string& dname)
     if (dn->inode->inode.ino == st->inode.ino) {
       touch_dn(dn);
       dout(12) << " had dentry " << dname
-               << " with correct ino " << hex << dn->inode->inode.ino << dec
+               << " with correct ino " << dn->inode->inode.ino
                << endl;
     } else {
       dout(12) << " had dentry " << dname
-               << " with WRONG ino " << hex << dn->inode->inode.ino << dec
+               << " with WRONG ino " << dn->inode->inode.ino
                << endl;
       unlink(dn);
       dn = NULL;
@@ -284,13 +284,13 @@ Inode* Client::insert_inode(Dir *dir, InodeStat *st, const string& dname)
       assert(in);
 
       if (in->dn) {
-        dout(12) << " had ino " << hex << in->inode.ino << dec
+        dout(12) << " had ino " << in->inode.ino
                  << " linked at wrong position, unlinking"
                  << endl;
         dn = relink(in->dn, dir, dname);
       } else {
         // link
-        dout(12) << " had ino " << hex << in->inode.ino << dec
+        dout(12) << " had ino " << in->inode.ino
                  << " unlinked, linking" << endl;
         dn = link(dir, dname, in);
       }
@@ -301,7 +301,7 @@ Inode* Client::insert_inode(Dir *dir, InodeStat *st, const string& dname)
     Inode *in = new Inode(st->inode, objectcacher);
     inode_map[st->inode.ino] = in;
     dn = link(dir, dname, in);
-    dout(12) << " new dentry+node with ino " << hex << st->inode.ino << dec << endl;
+    dout(12) << " new dentry+node with ino " << st->inode.ino << endl;
   } else {
     // actually update info
     dout(12) << " stat inode mask is " << st->inode.mask << endl;
@@ -351,10 +351,10 @@ void Client::update_inode_dist(Inode *in, InodeStat *st)
   // dir replication
   if (st->spec_defined) {
     if (st->dist.empty() && !in->dir_contacts.empty())
-      dout(9) << "lost dist spec for " << hex << in->inode.ino << dec 
+      dout(9) << "lost dist spec for " << in->inode.ino 
               << " " << st->dist << endl;
     if (!st->dist.empty() && in->dir_contacts.empty()) 
-      dout(9) << "got dist spec for " << hex << in->inode.ino << dec 
+      dout(9) << "got dist spec for " << in->inode.ino 
               << " " << st->dist << endl;
     in->dir_contacts = st->dist;
   }
@@ -388,7 +388,7 @@ Inode* Client::insert_trace(MClientReply *reply)
       }
     } else {
       // not root.
-      dout(10) << "insert_trace dn " << *pdn << " ino " << hex << (*pin)->inode.ino << dec << endl;
+      dout(10) << "insert_trace dn " << *pdn << " ino " << (*pin)->inode.ino << endl;
       Dir *dir = cur->open_dir();
       cur = this->insert_inode(dir, *pin, *pdn);
       ++pdn;      
@@ -441,7 +441,7 @@ Dentry *Client::lookup(filepath& path)
   }
   
   if (dn) {
-    dout(11) << "lookup '" << path << "' found " << dn->name << " inode " << hex << dn->inode->inode.ino << dec << " valid_until " << dn->inode->valid_until<< endl;
+    dout(11) << "lookup '" << path << "' found " << dn->name << " inode " << dn->inode->inode.ino << " valid_until " << dn->inode->valid_until<< endl;
   }
 
   return dn;
@@ -473,7 +473,7 @@ MClientReply *Client::make_request(MClientRequest *req,
         break;
       }
       
-      dout(7) << " have path seg " << i << " on " << diri->dir_auth << " ino " << hex << diri->inode.ino << dec << " " << req->get_filepath()[i] << endl;
+      dout(7) << " have path seg " << i << " on " << diri->dir_auth << " ino " << diri->inode.ino << " " << req->get_filepath()[i] << endl;
 
       if (i == depth-1) {  // last one!
         item = dir->dentries[ req->get_filepath()[i] ]->inode;
@@ -757,7 +757,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
     int other = m->get_mds();
 
     if (in && in->stale_caps.count(other)) {
-      dout(5) << "handle_file_caps on ino " << hex << m->get_ino() << dec << " from mds" << mds << " reap on mds" << other << endl;
+      dout(5) << "handle_file_caps on ino " << m->get_ino() << " from mds" << mds << " reap on mds" << other << endl;
 
       // fresh from new mds?
       if (!in->caps.count(mds)) {
@@ -772,7 +772,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
       
       // fall-thru!
     } else {
-      dout(5) << "handle_file_caps on ino " << hex << m->get_ino() << dec << " from mds" << mds << " premature (!!) reap on mds" << other << endl;
+      dout(5) << "handle_file_caps on ino " << m->get_ino() << " from mds" << mds << " premature (!!) reap on mds" << other << endl;
       // delay!
       cap_reap_queue[in->ino()][other] = m;
       return;
@@ -783,7 +783,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
   
   // stale?
   if (m->get_special() == MClientFileCaps::FILECAP_STALE) {
-    dout(5) << "handle_file_caps on ino " << hex << m->get_ino() << dec << " seq " << m->get_seq() << " from mds" << mds << " now stale" << endl;
+    dout(5) << "handle_file_caps on ino " << m->get_ino() << " seq " << m->get_seq() << " from mds" << mds << " now stale" << endl;
     
     // move to stale list
     assert(in->caps.count(mds));
@@ -797,7 +797,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
     // delayed reap?
     if (cap_reap_queue.count(in->ino()) &&
         cap_reap_queue[in->ino()].count(mds)) {
-      dout(5) << "handle_file_caps on ino " << hex << m->get_ino() << dec << " from mds" << mds << " delayed reap on mds" << m->get_mds() << endl;
+      dout(5) << "handle_file_caps on ino " << m->get_ino() << " from mds" << mds << " delayed reap on mds" << m->get_mds() << endl;
       
       // process delayed reap
       handle_file_caps( cap_reap_queue[in->ino()][mds] );
@@ -811,7 +811,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
 
   // release?
   if (m->get_special() == MClientFileCaps::FILECAP_RELEASE) {
-    dout(5) << "handle_file_caps on ino " << hex << m->get_ino() << dec << " from mds" << mds << " release" << endl;
+    dout(5) << "handle_file_caps on ino " << m->get_ino() << " from mds" << mds << " release" << endl;
     assert(in->caps.count(mds));
     in->caps.erase(mds);
     for (map<int,InodeCap>::iterator p = in->caps.begin();
@@ -840,7 +840,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
 
   // don't want?
   if (in->file_caps_wanted() == 0) {
-    dout(5) << "handle_file_caps on ino " << hex << m->get_ino() << dec 
+    dout(5) << "handle_file_caps on ino " << m->get_ino() 
             << " seq " << m->get_seq() 
             << " " << cap_string(m->get_caps()) 
             << ", which we don't want caps for, releasing." << endl;
@@ -858,7 +858,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
   const int new_caps = m->get_caps();
   in->caps[mds].caps = new_caps;
   in->caps[mds].seq = m->get_seq();
-  dout(5) << "handle_file_caps on in " << hex << m->get_ino() << dec 
+  dout(5) << "handle_file_caps on in " << m->get_ino() 
           << " mds" << mds << " seq " << m->get_seq() 
           << " caps now " << cap_string(new_caps) 
           << " was " << cap_string(old_caps) << endl;
@@ -961,7 +961,7 @@ void Client::implemented_caps(MClientFileCaps *m, Inode *in)
 void Client::release_caps(Inode *in,
                           int retain)
 {
-  dout(5) << "releasing caps on ino " << hex << in->inode.ino << dec
+  dout(5) << "releasing caps on ino " << in->inode.ino << dec
           << " had " << cap_string(in->file_caps())
           << " retaining " << cap_string(retain) 
           << endl;
@@ -1079,10 +1079,10 @@ int Client::unmount()
       if (!in->caps.empty()) {
         in->fc.release_clean();
         if (in->fc.is_dirty()) {
-          dout(10) << "unmount residual caps on " << hex << in->ino() << dec << ", flushing" << endl;
+          dout(10) << "unmount residual caps on " << in->ino() << ", flushing" << endl;
           in->fc.empty(new C_Client_CloseRelease(this, in));
         } else {
-          dout(10) << "unmount residual caps on " << hex << in->ino() << dec  << ", releasing" << endl;
+          dout(10) << "unmount residual caps on " << in->ino()  << ", releasing" << endl;
           release_caps(in);
         }
       }
@@ -1511,7 +1511,7 @@ int Client::lstat(const char *relpath, struct stat *stbuf)
   if (res == 0) {
     assert(in);
     fill_stat(in->inode,stbuf);
-    dout(10) << "stat sez size = " << in->inode.size << " ino = " << hex << stbuf->st_ino << dec << endl;
+    dout(10) << "stat sez size = " << in->inode.size << " ino = " << stbuf->st_ino << endl;
   }
 
   trim_cache();
@@ -1544,7 +1544,7 @@ int Client::lstatlite(const char *relpath, struct statlite *stl)
   
   if (res == 0) {
     fill_statlite(in->inode,stl);
-    dout(10) << "stat sez size = " << in->inode.size << " ino = " << hex << in->inode.ino << dec << endl;
+    dout(10) << "stat sez size = " << in->inode.size << " ino = " << in->inode.ino << endl;
   }
 
   trim_cache();
@@ -2036,7 +2036,7 @@ int Client::open(const char *relpath, int flags)
     int mds = MSG_ADDR_NUM(reply->get_source());
 
     if (f->inode->caps.empty()) {// first caps?
-      dout(7) << " first caps on " << hex << f->inode->inode.ino << dec << endl;
+      dout(7) << " first caps on " << f->inode->inode.ino << endl;
       f->inode->get();
     }
 
@@ -2045,7 +2045,7 @@ int Client::open(const char *relpath, int flags)
     assert(reply->get_file_caps_seq() >= f->inode->caps[mds].seq);
     if (reply->get_file_caps_seq() > f->inode->caps[mds].seq) {   
       dout(7) << "open got caps " << cap_string(new_caps)
-              << " for " << hex << f->inode->ino() << dec 
+              << " for " << f->inode->ino() 
               << " seq " << reply->get_file_caps_seq() 
               << " from mds" << mds << endl;
 
@@ -2062,7 +2062,7 @@ int Client::open(const char *relpath, int flags)
 
     } else {
       dout(7) << "open got SAME caps " << cap_string(new_caps) 
-              << " for " << hex << f->inode->ino() << dec 
+              << " for " << f->inode->ino() 
               << " seq " << reply->get_file_caps_seq() 
               << " from mds" << mds << endl;
     }
@@ -2091,7 +2091,7 @@ int Client::open(const char *relpath, int flags)
 
 void Client::close_release(Inode *in)
 {
-  dout(10) << "close_release on " << hex << in->ino() << dec << endl;
+  dout(10) << "close_release on " << in->ino() << endl;
 
   if (!in->num_open_rd) 
     in->fc.release_clean();
@@ -2105,7 +2105,7 @@ void Client::close_release(Inode *in)
 
 void Client::close_safe(Inode *in)
 {
-  dout(10) << "close_safe on " << hex << in->ino() << dec << endl;
+  dout(10) << "close_safe on " << in->ino() << endl;
   put_inode(in);
   if (unmounting) 
     mount_cond.Signal();
@@ -2158,14 +2158,14 @@ int Client::close(fh_t fh)
 
     // pin until safe?
     if (in->num_open_wr == 0 && !in->fc.all_safe()) {
-      dout(10) << "pinning ino " << hex << in->ino() << dec << " until safe" << endl;
+      dout(10) << "pinning ino " << in->ino() << " until safe" << endl;
       in->get();
       in->fc.add_safe_waiter(new C_Client_CloseSafe(this, in));
     }
   } else {
     // caching off.
     if (in->num_open_rd == 0 && in->num_open_wr == 0) {
-      dout(10) << "  releasing caps on " << hex << in->ino() << dec << endl;
+      dout(10) << "  releasing caps on " << in->ino() << endl;
       release_caps(in);              // release caps now.
     }
   }
@@ -2466,7 +2466,7 @@ int Client::fsync(fh_t fh, bool syncdataonly)
   Fh *f = fh_map[fh];
   Inode *in = f->inode;
 
-  dout(3) << "fsync fh " << fh << " ino " << hex << in->inode.ino << dec << " syncdataonly " << syncdataonly << endl;
+  dout(3) << "fsync fh " << fh << " ino " << in->inode.ino << " syncdataonly " << syncdataonly << endl;
 
   // metadata?
   if (!syncdataonly) {
index 10c6005840c714cbc7a094b394f74d8fadae6a9a..2f3ddcd82cca812074d5c3464a58a645fbd11555 100644 (file)
@@ -33,7 +33,7 @@
 #include "include/types.h"
 #include "include/lru.h"
 #include "include/filepath.h"
-#include "include/rangeset.h"
+#include "include/interval_set.h"
 
 #include "common/Mutex.h"
 
@@ -349,16 +349,16 @@ protected:
 
   // file handles, etc.
   string                 cwd;
-  rangeset<fh_t>         free_fh_set;  // unused fh's
+  interval_set<fh_t>     free_fh_set;  // unused fh's
   hash_map<fh_t, Fh*>    fh_map;
   
   fh_t get_fh() {
-    fh_t fh = free_fh_set.first();
-    free_fh_set.erase(fh);
+    fh_t fh = free_fh_set.start();
+    free_fh_set.erase(fh, 1);
     return fh;
   }
   void put_fh(fh_t fh) {
-    free_fh_set.insert(fh);
+    free_fh_set.insert(fh, 1);
   }
 
   void mkabspath(const char *rel, string& abs) {
index a809f2bfde7a848d75f3684506ec3e95eaa40ae4..560a515a95240d1ddeb63f69ad2dc8649c56f498 100644 (file)
@@ -41,7 +41,6 @@
 
 // ceph stuff
 #include "include/types.h"
-#include "include/rangeset.h"
 
 #include "Client.h"
 
@@ -98,7 +97,7 @@ static int ceph_getdir(const char *path, fuse_dirh_t h, fuse_dirfil_t filler)
   return res;
 }
 
-static int ceph_mknod(const char *path, mode_t mode, dev_t rdev)
+static int ceph_mknod(const char *path, mode_t mode, dev_t rdev) 
 {
   return client->mknod(path, mode);
 }
index 05709159a1b1c8de70cc05cec2252f11718ac4f8..09a34ad2e6f5ce4a6313a6e604716a9cc13968d5 100644 (file)
@@ -170,19 +170,35 @@ struct FileLayout {
 
 // -- inode --
 
-/** object id
- * msb[ ino bits | ono bits ]lsb
- * from LSB to MSB 
- */
+//typedef __uint64_t inodeno_t;   
+
+struct inodeno_t {
+  __uint64_t val;
+  inodeno_t() : val() {}
+  inodeno_t(__uint64_t v) : val(v) {}
+  inodeno_t operator+=(inodeno_t o) { val += o.val; return *this; }
+  operator __uint64_t() const { return val; }
+};
 
-#define OID_ONO_BITS       32        // 1mb * 10^9 = 1 petabyte files
-#define OID_INO_BITS       (64-32)   // 2^34 =~ 16 billion files
+inline ostream& operator<<(ostream& out, inodeno_t ino) {
+  return out << hex << ino.val << dec;
+}
 
-typedef __uint64_t inodeno_t;   // 34-bit ino (for now!)
+namespace __gnu_cxx {
+  template<> struct hash< inodeno_t >
+  {
+    size_t operator()( const inodeno_t& x ) const
+    {
+      static hash<__uint64_t> H;
+      return H(x.val);
+    }
+  };
+}
 
 typedef __uint64_t version_t;
 
 
+
 #define INODE_MODE_FILE     0100000 // S_IFREG
 #define INODE_MODE_SYMLINK  0120000 // S_IFLNK
 #define INODE_MODE_DIR      0040000 // S_IFDIR
@@ -248,13 +264,44 @@ inline ostream& operator<<(ostream& out, lame128_t& oid) {
 
 
 // osd types
-typedef __uint32_t ps_t;          // placement seed
-typedef __uint32_t pg_t;          // placement group
+//typedef __uint32_t ps_t;          // placement seed
+//typedef __uint32_t pg_t;          // placement group
 typedef __uint64_t coll_t;        // collection id
 typedef __uint64_t tid_t;         // transaction id
 
 typedef __uint32_t epoch_t;       // map epoch  (32bits -> 13 epochs/second for 10 years)
 
+// placement group id
+struct pg_t {
+  __uint32_t val;
+  pg_t() : val() {}
+  pg_t(__uint32_t v) : val(v) {}
+  pg_t operator=(__uint32_t v) { val = v; return *this; }
+  pg_t operator&=(__uint32_t v) { val &= v; return *this; }
+  pg_t operator+=(pg_t o) { val += o.val; return *this; }
+  pg_t operator-=(pg_t o) { val -= o.val; return *this; }
+  pg_t operator++() { ++val; return *this; }
+  operator __uint32_t() const { return val; }
+};
+
+inline ostream& operator<<(ostream& out, pg_t pg) {
+  return out << hex << pg.val << dec;
+}
+
+namespace __gnu_cxx {
+  template<> struct hash< pg_t >
+  {
+    size_t operator()( const pg_t& x ) const
+    {
+      static hash<__uint32_t> H;
+      return H(x.val);
+    }
+  };
+}
+
+typedef pg_t ps_t;  // placement seed
+
+
 
 // compound rados version type
 class eversion_t {
index 73de70ec2d84b2f6a7fc25b026054a0aeeea6f68..84fd7a9bd978ac3a626ec823548fe757b059694d 100644 (file)
@@ -55,7 +55,7 @@ ostream& operator<<(ostream& out, CDir& dir)
 {
   string path;
   dir.get_inode()->make_path(path);
-  out << "[dir " << hex << dir.ino() << dec << " " << path << "/";
+  out << "[dir " << dir.ino() << " " << path << "/";
   if (dir.is_dirty()) out << " dirty";
   if (dir.is_import()) out << " import";
   if (dir.is_export()) out << " export";
index 02dea97db5732f6fe56da23e958689f69d6fbad6..581705acfb74fc927f389ec911e9199b4be7d1d5 100644 (file)
@@ -36,7 +36,7 @@ ostream& operator<<(ostream& out, CInode& in)
 {
   string path;
   in.make_path(path);
-  out << "[inode " << hex << in.inode.ino << dec << " " << path << (in.is_dir() ? "/ ":" ");
+  out << "[inode " << in.inode.ino << " " << path << (in.is_dir() ? "/ ":" ");
   if (in.is_auth()) {
     out << "auth";
     if (in.is_cached_by_anyone()) {
@@ -189,13 +189,13 @@ void CInode::make_anchor_trace(vector<Anchor*>& trace)
   if (parent) {
     parent->dir->inode->make_anchor_trace(trace);
     
-    dout(7) << "make_anchor_trace adding " << hex << ino() << " dirino " << parent->dir->inode->ino() << dec << " dn " << parent->name << endl;
+    dout(7) << "make_anchor_trace adding " << ino() << " dirino " << parent->dir->inode->ino() << " dn " << parent->name << endl;
     trace.push_back( new Anchor(ino(), 
                                 parent->dir->inode->ino(),
                                 parent->name) );
   }
   else if (state_test(CINODE_STATE_DANGLING)) {
-    dout(7) << "make_anchor_trace dangling " << hex << ino() << dec << " on mds " << dangling_auth << endl;
+    dout(7) << "make_anchor_trace dangling " << ino() << " on mds " << dangling_auth << endl;
     string ref_dn;
     trace.push_back( new Anchor(ino(),
                                 MDS_INO_INODEFILE_OFFSET+dangling_auth,
index 832c6c6732d79d2d13b3985acb7f872104baf9db..1c99ddda2952768fac5b7b5803e1886048ffe934 100644 (file)
 #include "events/EDirUpdate.h"
 #include "events/EUnlink.h"
 #include "events/EAlloc.h"
+#include "events/EMknod.h"
 
 LogEvent *LogEvent::decode(bufferlist& bl)
 {
   // parse type, length
   int off = 0;
-  __uint32_t type;
+  int type;
   bl.copy(off, sizeof(type), (char*)&type);
   off += sizeof(type);
 
@@ -58,6 +59,10 @@ LogEvent *LogEvent::decode(bufferlist& bl)
     le = new EAlloc();
     break;
 
+  case EVENT_MKNOD:
+    le = new EMknod();
+    break;
+
   default:
     dout(1) << "uh oh, unknown event type " << type << endl;
     assert(0);
index 410f2953a44a0ba0b60b945813261ed8aef7518e..d54b502e3083e45640cbee2a0ecf474022a148f4 100644 (file)
@@ -19,6 +19,7 @@
 #define EVENT_DIRUPDATE    3
 #define EVENT_UNLINK       4
 #define EVENT_ALLOC        5
+#define EVENT_MKNOD        6
 
 
 #include <string>
index 01781bcfe26b705f351d7011a6b170bee43c3ba4..109e7ed4fb4742b6bd2224b09df79cc5a83ff914 100644 (file)
@@ -818,7 +818,7 @@ int MDCache::path_traverse(filepath& origpath,
           dout(7) << "linking in remote in " << *in << endl;
           dn->link_remote(in);
         } else {
-          dout(7) << "remote link to " << hex << dn->get_remote_ino() << dec << ", which i don't have" << endl;
+          dout(7) << "remote link to " << dn->get_remote_ino() << ", which i don't have" << endl;
           open_remote_ino(dn->get_remote_ino(), req,
                           ondelay);
           return 1;
@@ -865,7 +865,7 @@ int MDCache::path_traverse(filepath& origpath,
 
         // forwarder wants replicas?
         if (is_client_req && ((MClientRequest*)req)->get_mds_wants_replica_in_dirino()) {
-          dout(30) << "traverse: REP is here, " << hex << ((MClientRequest*)req)->get_mds_wants_replica_in_dirino() << " vs " << cur->dir->ino() << dec << endl;
+          dout(30) << "traverse: REP is here, " << ((MClientRequest*)req)->get_mds_wants_replica_in_dirino() << " vs " << cur->dir->ino() << endl;
           
           if (((MClientRequest*)req)->get_mds_wants_replica_in_dirino() == cur->dir->ino() &&
               cur->dir->is_auth() && 
@@ -1698,7 +1698,7 @@ void MDCache::handle_discover_reply(MDiscoverReply *m)
     cur = get_inode(m->get_base_ino());
     
     if (!cur) {
-      dout(7) << "discover_reply don't have base ino " << hex << m->get_base_ino() << dec << ", dropping" << endl;
+      dout(7) << "discover_reply don't have base ino " << m->get_base_ino() << ", dropping" << endl;
       delete m;
       return;
     }
@@ -1874,7 +1874,7 @@ void MDCache::handle_inode_update(MInodeUpdate *m)
   CInode *in = get_inode(m->get_ino());
   if (!in) {
     //dout(7) << "inode_update on " << m->get_ino() << ", don't have it, ignoring" << endl;
-    dout(7) << "inode_update on " << hex << m->get_ino() << dec << ", don't have it, sending expire" << endl;
+    dout(7) << "inode_update on " << m->get_ino() << ", don't have it, sending expire" << endl;
     MCacheExpire *expire = new MCacheExpire(mds->get_nodeid());
     expire->add_inode(m->get_ino(), m->get_nonce());
     mds->send_message_mds(expire, m->get_source().num(), MDS_PORT_CACHE);
@@ -1919,7 +1919,7 @@ void MDCache::handle_cache_expire(MCacheExpire *m)
     int nonce = it->second;
     
     if (!in) {
-      dout(0) << "inode_expire on " << hex << it->first << dec << " from " << from << ", don't have it" << endl;
+      dout(0) << "inode_expire on " << it->first << " from " << from << ", don't have it" << endl;
       assert(in);  // i should be authority, or proxy .. and pinned
     }  
     if (!in->is_auth()) {
@@ -2063,7 +2063,7 @@ void MDCache::handle_dir_update(MDirUpdate *m)
 {
   CInode *in = get_inode(m->get_ino());
   if (!in || !in->dir) {
-    dout(5) << "dir_update on " << hex << m->get_ino() << dec << ", don't have it" << endl;
+    dout(5) << "dir_update on " << m->get_ino() << ", don't have it" << endl;
 
     // discover it?
     if (m->should_discover()) {
@@ -2271,7 +2271,7 @@ void MDCache::handle_dentry_unlink(MDentryUnlink *m)
   if (diri) dir = diri->dir;
 
   if (!diri || !dir) {
-    dout(7) << "handle_dentry_unlink don't have dir " << hex << m->get_dirino() << dec << endl;
+    dout(7) << "handle_dentry_unlink don't have dir " << m->get_dirino() << endl;
   }
   else {
     CDentry *dn = dir->lookup(m->get_dn());
index 7c74ecd8e44a2b8bbe5ec83a31c4fd930e739d1e..cce2fa3a2ac3de0a6d94cff26adab106175d45e0 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "events/EInodeUpdate.h"
 #include "events/EDirUpdate.h"
+#include "events/EMknod.h"
 
 #include "include/filepath.h"
 #include "common/Timer.h"
@@ -1015,7 +1016,7 @@ CInode *Server::mknod(MClientRequest *req, CInode *diri, bool okexist)
   newi->mark_dirty();
   
   // journal it
-  mdlog->submit_entry(new EDirUpdate(dir));  // FIXME WRONG EVENT
+  mdlog->submit_entry(new EMknod(newi));
 
   // ok!
   return newi;
diff --git a/ceph/mds/events/EMknod.h b/ceph/mds/events/EMknod.h
new file mode 100644 (file)
index 0000000..6d43fa7
--- /dev/null
@@ -0,0 +1,75 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software 
+ * Foundation.  See file COPYING.
+ * 
+ */
+
+#ifndef __EMKNOD_H
+#define __EMKNOD_H
+
+#include <assert.h>
+#include "config.h"
+#include "include/types.h"
+
+#include "ETraced.h"
+#include "../MDStore.h"
+
+
+class EMknod : public ETraced {
+ protected:
+ public:
+  EMknod(CInode *in) : ETraced(EVENT_MKNOD, in) {
+  }
+  EMknod() : ETraced(EVENT_MKNOD) { }
+  
+  void print(ostream& out) {
+    out << "mknod ";
+    ETraced::print(out);
+  }
+
+  virtual void encode_payload(bufferlist& bl) {
+    encode_trace(bl);
+  }
+  void decode_payload(bufferlist& bl, int& off) {
+    decode_trace(bl, off);
+  }
+  
+  bool can_expire(MDS *mds) {
+    // am i obsolete?
+    CInode *diri = mds->mdcache->get_inode( trace.back().dirino );
+    if (!diri) return true;
+       CDir *dir = diri->dir;
+       if (!dir) return true;
+
+    if (!dir->is_auth()) return true;     // not mine!
+    if (dir->is_frozen()) return true;    // frozen -> exporting -> obsolete? FIXME
+    
+    if (!dir->is_dirty()) return true;
+
+    if (dir->get_committing_version() > trace.back().dirv)
+      return true;
+
+    return false;
+  }
+
+  virtual void retire(MDS *mds, Context *c) {
+    // commit directory
+    CInode *in = mds->mdcache->get_inode( trace.back().dirino );
+    assert(in);
+    CDir *dir = in->dir;
+    assert(dir);
+
+    dout(10) << "EMknod committing dir " << *dir << endl;
+    mds->mdstore->commit_dir(dir, c);
+  }
+  
+};
+
+#endif
index a72f114a31dff29e002a256f74a967e5af4aef31..66f969d06567f94a4a92fb2af2cba32c8da420e8 100644 (file)
@@ -100,8 +100,10 @@ public:
     for (list<bit>::iterator p = trace.begin();
         p != trace.end();
         p++) {
-      if (p != trace.begin()) out << "/";
-      out << p->dn;
+      if (p == trace.begin()) 
+       out << "[" << p->dirino << "]/" << p->dn;
+      else 
+       out << "/" << p->dn;
     }
   }
 
index 7c68bd473b1c04c9e63cdb0c5c2e561614d90904..0b8890fcbae3b86c2b5a135c0f48d20f31f23c95 100644 (file)
@@ -44,12 +44,11 @@ protected:
   // my local store
   ObjectStore *store;
 
-  const static inodeno_t INO_ELECTOR = 1;
-  const static inodeno_t INO_MON_MAP = 2;
-  const static inodeno_t INO_OSD_MAP = 10;
-  const static inodeno_t INO_OSD_INC_MAP = 11;
-  const static inodeno_t INO_MDS_MAP = 20;
-  
+  const static int INO_ELECTOR = 1;
+  const static int INO_MON_MAP = 2;
+  const static int INO_OSD_MAP = 10;
+  const static int INO_OSD_INC_MAP = 11;
+  const static int INO_MDS_MAP = 20;
 
   // elector
   Elector elector;
index 958efabb4cad0a1870e05dfe4cbea14337af892d..044869fb05cca86711c0c08e6f93ff1a195ae20b 100644 (file)
@@ -361,8 +361,8 @@ PG *OSD::_lock_pg(pg_t pgid)
 
   if (pg_lock.count(pgid)) {
     Cond c;
-    dout(15) << "lock_pg " << hex << pgid << dec << " waiting as " << &c << endl;
-    //cerr << "lock_pg " << hex << pgid << dec << " waiting as " << &c << endl;
+    dout(15) << "lock_pg " << pgid << " waiting as " << &c << endl;
+    //cerr << "lock_pg " << pgid << " waiting as " << &c << endl;
 
     list<Cond*>& ls = pg_lock_waiters[pgid];   // this is commit, right?
     ls.push_back(&c);
@@ -377,7 +377,7 @@ PG *OSD::_lock_pg(pg_t pgid)
       pg_lock_waiters.erase(pgid);
   }
 
-  dout(15) << "lock_pg " << hex << pgid << dec << endl;
+  dout(15) << "lock_pg " << pgid << endl;
   pg_lock.insert(pgid);
 
   return pg_map[pgid];  
@@ -400,17 +400,17 @@ void OSD::_unlock_pg(pg_t pgid)
     // someone is in line
     Cond *c = pg_lock_waiters[pgid].front();
     assert(c);
-    dout(15) << "unlock_pg " << hex << pgid << dec << " waking up next guy " << c << endl;
+    dout(15) << "unlock_pg " << pgid << " waking up next guy " << c << endl;
     c->Signal();
   } else {
     // nobody waiting
-    dout(15) << "unlock_pg " << hex << pgid << dec << endl;
+    dout(15) << "unlock_pg " << pgid << endl;
   }
 }
 
 void OSD::_remove_pg(pg_t pgid) 
 {
-  dout(10) << "_remove_pg " << hex << pgid << dec << endl;
+  dout(10) << "_remove_pg " << pgid << endl;
 
   // remove from store
   list<object_t> olist;
@@ -1005,7 +1005,7 @@ void OSD::advance_map(ObjectStore::Transaction& t)
     for (int nrep = 1; 
          nrep <= MIN(g_conf.num_osd, g_conf.osd_max_rep);    // for low osd counts..  hackish bleh
          nrep++) {
-      for (pg_t ps = 0; ps < maxps; ps++) {
+      for (pg_t ps = 0; ps < maxps; ++ps) {
         pg_t pgid = osdmap->ps_nrep_to_pg(ps, nrep);
         vector<int> acting;
         int nrep = osdmap->pg_to_acting_osds(pgid, acting);
@@ -1434,7 +1434,7 @@ void OSD::load_pgs()
  */
 void OSD::project_pg_history(pg_t pgid, PG::Info::History& h, epoch_t from)
 {
-  dout(15) << "project_pg_history " << hex << pgid << dec
+  dout(15) << "project_pg_history " << pgid
            << " from " << from << " to " << osdmap->get_epoch()
            << ", start " << h
            << endl;
@@ -1455,7 +1455,7 @@ void OSD::project_pg_history(pg_t pgid, PG::Info::History& h, epoch_t from)
     // acting set change?
     if (acting != last && 
         e <= h.same_since) {
-      dout(15) << "project_pg_history " << hex << pgid << dec << " changed in " << e+1 
+      dout(15) << "project_pg_history " << pgid << " changed in " << e+1 
                 << " from " << acting << " -> " << last << endl;
       h.same_since = e+1;
     }
@@ -1463,7 +1463,7 @@ void OSD::project_pg_history(pg_t pgid, PG::Info::History& h, epoch_t from)
     // primary change?
     if (!(!acting.empty() && !last.empty() && acting[0] == last[0]) &&
         e <= h.same_primary_since) {
-      dout(15) << "project_pg_history " << hex << pgid << dec << " primary changed in " << e+1 << endl;
+      dout(15) << "project_pg_history " << pgid << " primary changed in " << e+1 << endl;
       h.same_primary_since = e+1;
     
       if (g_conf.osd_rep == OSD_REP_PRIMARY)
@@ -1474,7 +1474,7 @@ void OSD::project_pg_history(pg_t pgid, PG::Info::History& h, epoch_t from)
     if (g_conf.osd_rep != OSD_REP_PRIMARY) {
       if (!(!acting.empty() && !last.empty() && acting[acting.size()-1] == last[last.size()-1]) &&
           e <= h.same_acker_since) {
-        dout(15) << "project_pg_history " << hex << pgid << dec << " acker changed in " << e+1 << endl;
+        dout(15) << "project_pg_history " << pgid << " acker changed in " << e+1 << endl;
         h.same_acker_since = e+1;
       }
     }
@@ -1561,7 +1561,7 @@ void OSD::handle_pg_notify(MOSDPGNotify *m)
       project_pg_history(pgid, history, m->get_epoch());
 
       if (m->get_epoch() < history.same_primary_since) {
-        dout(10) << "handle_pg_notify pg " << hex << pgid << dec << " dne, and primary changed in "
+        dout(10) << "handle_pg_notify pg " << pgid << " dne, and primary changed in "
                  << history.same_primary_since << " (msg from " << m->get_epoch() << ")" << endl;
         continue;
       }
@@ -1664,7 +1664,7 @@ void OSD::handle_pg_log(MOSDPGLog *m)
 
   if (!require_same_or_newer_map(m, m->get_epoch())) return;
   if (pg_map.count(pgid) == 0) {
-    dout(10) << "handle_pg_log don't have pg " << hex << pgid << dec << ", dropping" << endl;
+    dout(10) << "handle_pg_log don't have pg " << pgid << ", dropping" << endl;
     assert(m->get_epoch() < osdmap->get_epoch());
     delete m;
     return;
@@ -1749,7 +1749,7 @@ void OSD::handle_pg_query(MOSDPGQuery *m)
       project_pg_history(pgid, history, m->get_epoch());
 
       if (m->get_epoch() < history.same_since) {
-        dout(10) << " pg " << hex << pgid << dec << " dne, and pg has changed in "
+        dout(10) << " pg " << pgid << " dne, and pg has changed in "
                  << history.same_primary_since << " (msg from " << m->get_epoch() << ")" << endl;
         continue;
       }
@@ -1760,7 +1760,7 @@ void OSD::handle_pg_query(MOSDPGQuery *m)
       int role = osdmap->calc_pg_role(whoami, acting, nrep);
 
       if (role < 0) {
-        dout(10) << " pg " << hex << pgid << dec << " dne, and i am not an active replica" << endl;
+        dout(10) << " pg " << pgid << " dne, and i am not an active replica" << endl;
         PG::Info empty(pgid);
         notify_list[from].push_back(empty);
         continue;
@@ -1858,7 +1858,7 @@ void OSD::handle_pg_remove(MOSDPGRemove *m)
     PG *pg;
 
     if (pg_map.count(pgid) == 0) {
-      dout(10) << " don't have pg " << hex << pgid << dec << endl;
+      dout(10) << " don't have pg " << pgid << endl;
       continue;
     }
 
@@ -2288,7 +2288,7 @@ void OSD::handle_op(MOSDOp *op)
     // have pg?
     if (!pg) {
       dout(7) << "hit non-existent pg " 
-              << hex << pgid << dec 
+              << pgid 
               << ", waiting" << endl;
       waiting_for_pg[pgid].push_back(op);
       return;
@@ -2351,7 +2351,7 @@ void OSD::handle_op(MOSDOp *op)
     // have pg?
     if (!pg) {
       derr(-7) << "handle_rep_op " << *op 
-               << " pgid " << hex << pgid << dec << " dne" << endl;
+               << " pgid " << pgid << " dne" << endl;
       delete op;
       //assert(0); // wtf, shouldn't happen.
       return;
@@ -2468,7 +2468,7 @@ void OSD::dequeue_op(pg_t pgid)
     ls.pop_front();
     
     if (pgid) {
-      dout(10) << "dequeue_op " << op << " write pg " << hex << pgid << dec 
+      dout(10) << "dequeue_op " << op << " write pg " << pgid 
                << ls.size() << " / " << (pending_ops-1) << " more pending" << endl;
     } else {
       dout(10) << "dequeue_op " << op << " read "
@@ -2965,12 +2965,12 @@ void OSD::op_modify_commit(pg_t pgid, tid_t rep_tid, eversion_t pg_complete_thru
       put_repop_gather(pg, repop);
       dout(10) << "op_modify_commit done on " << repop << endl;
     } else {
-      dout(10) << "op_modify_commit pg " << hex << pgid << dec << " rep_tid " << rep_tid << " dne" << endl;
+      dout(10) << "op_modify_commit pg " << pgid << " rep_tid " << rep_tid << " dne" << endl;
     }
 
     unlock_pg(pgid);
   } else {
-    dout(10) << "op_modify_commit pg " << hex << pgid << dec << " dne" << endl;
+    dout(10) << "op_modify_commit pg " << pgid << " dne" << endl;
   }
 }
 
index b3936c96bfa4b343df9efd05e98d2a38ac2ef1d6..e2520f595096dec63d13ee8d89a87da89cbc5a3f 100644 (file)
@@ -941,7 +941,7 @@ void ObjectCacher::flusher_entry()
 int ObjectCacher::atomic_sync_readx(Objecter::OSDRead *rd, inodeno_t ino, Mutex& lock)
 {
   dout(10) << "atomic_sync_readx " << rd
-           << " in " << hex << ino << dec
+           << " in " << ino
            << endl;
 
   if (rd->extents.size() == 1) {
@@ -998,7 +998,7 @@ int ObjectCacher::atomic_sync_readx(Objecter::OSDRead *rd, inodeno_t ino, Mutex&
 int ObjectCacher::atomic_sync_writex(Objecter::OSDWrite *wr, inodeno_t ino, Mutex& lock)
 {
   dout(10) << "atomic_sync_writex " << wr
-           << " in " << hex << ino << dec
+           << " in " << ino
            << endl;
 
   if (wr->extents.size() == 1 &&
@@ -1015,7 +1015,7 @@ int ObjectCacher::atomic_sync_writex(Objecter::OSDWrite *wr, inodeno_t ino, Mute
          o->lock_state != Object::LOCK_UPGRADING)) {
       // just write synchronously.
       dout(10) << "atomic_sync_writex " << wr
-               << " in " << hex << ino << dec
+               << " in " << ino
                << " doing sync write"
                << endl;
 
@@ -1280,11 +1280,11 @@ bool ObjectCacher::flush(Object *ob)
 bool ObjectCacher::flush_set(inodeno_t ino, Context *onfinish)
 {
   if (objects_by_ino.count(ino) == 0) {
-    dout(10) << "flush_set on " << hex << ino << dec << " dne" << endl;
+    dout(10) << "flush_set on " << ino << " dne" << endl;
     return true;
   }
 
-  dout(10) << "flush_set " << hex << ino << dec << endl;
+  dout(10) << "flush_set " << ino << endl;
 
   C_Gather *gather = 0; // we'll need to wait for all objects to flush!
 
@@ -1301,7 +1301,7 @@ bool ObjectCacher::flush_set(inodeno_t ino, Context *onfinish)
         gather = new C_Gather(onfinish);
       safe = false;
 
-      dout(10) << "flush_set " << hex << ino << dec << " will wait for ack tid " 
+      dout(10) << "flush_set " << ino << " will wait for ack tid " 
                << ob->last_write_tid 
                << " on " << *ob
                << endl;
@@ -1311,7 +1311,7 @@ bool ObjectCacher::flush_set(inodeno_t ino, Context *onfinish)
   }
   
   if (safe) {
-    dout(10) << "flush_set " << hex << ino << dec << " has no dirty|tx bhs" << endl;
+    dout(10) << "flush_set " << ino << " has no dirty|tx bhs" << endl;
     return true;
   }
   return false;
@@ -1325,11 +1325,11 @@ bool ObjectCacher::commit_set(inodeno_t ino, Context *onfinish)
   assert(onfinish);  // doesn't make any sense otherwise.
 
   if (objects_by_ino.count(ino) == 0) {
-    dout(10) << "commit_set on " << hex << ino << dec << " dne" << endl;
+    dout(10) << "commit_set on " << ino << " dne" << endl;
     return true;
   }
 
-  dout(10) << "commit_set " << hex << ino << dec << endl;
+  dout(10) << "commit_set " << ino << endl;
 
   C_Gather *gather = 0; // we'll need to wait for all objects to commit
 
@@ -1344,7 +1344,7 @@ bool ObjectCacher::commit_set(inodeno_t ino, Context *onfinish)
     flush_set(ino);
 
     if (ob->last_write_tid > ob->last_commit_tid) {
-      dout(10) << "commit_set " << hex << ino << dec << " " << *ob 
+      dout(10) << "commit_set " << ino << " " << *ob 
                << " will finish on commit tid " << ob->last_write_tid
                << endl;
       if (!gather && onfinish) gather = new C_Gather(onfinish);
@@ -1355,7 +1355,7 @@ bool ObjectCacher::commit_set(inodeno_t ino, Context *onfinish)
   }
 
   if (safe) {
-    dout(10) << "commit_set " << hex << ino << dec << " all committed" << endl;
+    dout(10) << "commit_set " << ino << " all committed" << endl;
     return true;
   }
   return false;
@@ -1391,11 +1391,11 @@ off_t ObjectCacher::release_set(inodeno_t ino)
   off_t unclean = 0;
 
   if (objects_by_ino.count(ino) == 0) {
-    dout(10) << "release_set on " << hex << ino << dec << " dne" << endl;
+    dout(10) << "release_set on " << ino << " dne" << endl;
     return 0;
   }
 
-  dout(10) << "release_set " << hex << ino << dec << endl;
+  dout(10) << "release_set " << ino << endl;
 
   set<Object*>& s = objects_by_ino[ino];
   for (set<Object*>::iterator i = s.begin();
@@ -1407,14 +1407,14 @@ off_t ObjectCacher::release_set(inodeno_t ino)
     unclean += o_unclean;
 
     if (o_unclean) 
-      dout(10) << "release_set " << hex << ino << dec << " " << *ob 
+      dout(10) << "release_set " << ino << " " << *ob 
                << " has " << o_unclean << " bytes left"
                << endl;
     
   }
 
   if (unclean) {
-    dout(10) << "release_set " << hex << ino << dec
+    dout(10) << "release_set " << ino
              << ", " << unclean << " bytes left" << endl;
   }
 
@@ -1425,11 +1425,11 @@ off_t ObjectCacher::release_set(inodeno_t ino)
 void ObjectCacher::kick_sync_writers(inodeno_t ino)
 {
   if (objects_by_ino.count(ino) == 0) {
-    dout(10) << "kick_sync_writers on " << hex << ino << dec << " dne" << endl;
+    dout(10) << "kick_sync_writers on " << ino << " dne" << endl;
     return;
   }
 
-  dout(10) << "kick_sync_writers on " << hex << ino << dec << endl;
+  dout(10) << "kick_sync_writers on " << ino << endl;
 
   list<Context*> ls;
 
@@ -1448,11 +1448,11 @@ void ObjectCacher::kick_sync_writers(inodeno_t ino)
 void ObjectCacher::kick_sync_readers(inodeno_t ino)
 {
   if (objects_by_ino.count(ino) == 0) {
-    dout(10) << "kick_sync_readers on " << hex << ino << dec << " dne" << endl;
+    dout(10) << "kick_sync_readers on " << ino << " dne" << endl;
     return;
   }
 
-  dout(10) << "kick_sync_readers on " << hex << ino << dec << endl;
+  dout(10) << "kick_sync_readers on " << ino << endl;
 
   list<Context*> ls;
 
index 1756fe26f27b199f513b479795c46be84e23fbbc..c97e8fbeade29ea49faf6d14f7fd75795f632f45 100644 (file)
@@ -143,7 +143,7 @@ void Objecter::scan_pgs(set<pg_t>& changed_pgs)
     }
     
     // changed significantly.
-    dout(10) << "scan_pgs pg " << hex << pgid << dec 
+    dout(10) << "scan_pgs pg " << pgid 
              << " (" << pg.active_tids << ")"
              << " " << other << " -> " << pg.acting
              << endl;
@@ -153,7 +153,7 @@ void Objecter::scan_pgs(set<pg_t>& changed_pgs)
 
 void Objecter::kick_requests(set<pg_t>& changed_pgs) 
 {
-  dout(10) << "kick_requests in pgs " << hex << changed_pgs << dec << endl;
+  dout(10) << "kick_requests in pgs " << changed_pgs << endl;
 
   for (set<pg_t>::iterator i = changed_pgs.begin();
        i != changed_pgs.end();
@@ -278,7 +278,7 @@ tid_t Objecter::stat_submit(OSDStat *st)
                          OSD_OP_STAT);
   dout(10) << "stat_submit " << st << " tid " << last_tid
            << " oid " << ex.oid
-           << " pg " << hex << ex.pgid << dec
+           << " pg " << ex.pgid
            << " osd" << pg.acker() 
            << endl;
 
@@ -390,7 +390,7 @@ tid_t Objecter::readx_submit(OSDRead *rd, ObjectExtent &ex)
   dout(10) << "readx_submit " << rd << " tid " << last_tid
            << " oid " << ex.oid << " " << ex.start << "~" << ex.length
            << " (" << ex.buffer_extents.size() << " buffer fragments)" 
-           << " pg " << hex << ex.pgid << dec
+           << " pg " << ex.pgid
            << " osd" << pg.acker() 
            << endl;
 
@@ -684,7 +684,7 @@ tid_t Objecter::modifyx_submit(OSDModify *wr, ObjectExtent &ex, tid_t usetid)
   dout(10) << "modifyx_submit " << MOSDOp::get_opname(wr->op) << " tid " << tid
            << "  oid " << ex.oid
            << " " << ex.start << "~" << ex.length 
-           << " pg " << hex << ex.pgid << dec 
+           << " pg " << ex.pgid 
            << " osd" << pg.primary()
            << endl;
   if (pg.primary() >= 0)