]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: less noisy
authorSage Weil <sage@newdream.net>
Fri, 11 Dec 2009 20:03:24 +0000 (12:03 -0800)
committerSage Weil <sage@newdream.net>
Fri, 11 Dec 2009 20:03:24 +0000 (12:03 -0800)
src/librados.cc
src/osdc/rados_bencher.h

index 36a3f5e579ae58db331689b0ac498a97d2f40777..4dbfa4fd0562026a851eb344f4d8e2d0cb052a1f 100644 (file)
@@ -56,7 +56,7 @@ class RadosClient : public Dispatcher
   bool ms_dispatch(Message *m);
 
   bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new) {
-    dout(0) << "RadosClient::ms_get_authorizer type=" << dest_type << dendl;
+    //dout(0) << "RadosClient::ms_get_authorizer type=" << dest_type << dendl;
     /* monitor authorization is being handled on different layer */
     if (dest_type == CEPH_ENTITY_TYPE_MON)
       return true;
@@ -282,7 +282,6 @@ public:
 
 bool RadosClient::init()
 {
-  dout(0) << "entity name=" << g_conf.entity_name->to_str() << dendl;
   // get monmap
   if (monclient.build_initial_monmap() < 0)
     return false;
@@ -684,8 +683,6 @@ int RadosClient::write(PoolCtx& pool, const object_t& oid, off_t off, bufferlist
 
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
-  dout(0) << "going to write" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->write(oid, layout,
@@ -701,8 +698,6 @@ int RadosClient::write(PoolCtx& pool, const object_t& oid, off_t off, bufferlist
   if (r < 0)
     return r;
 
-  dout(0) << "did write" << dendl;
-
   return len;
 }
 
@@ -721,8 +716,6 @@ int RadosClient::write_full(PoolCtx& pool, const object_t& oid, bufferlist& bl)
 
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
-  dout(0) << "going to write_full" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->write_full(oid, layout,
@@ -735,8 +728,6 @@ int RadosClient::write_full(PoolCtx& pool, const object_t& oid, bufferlist& bl)
     cond.Wait(mylock);
   mylock.Unlock();
 
-  dout(0) << "did write_full" << dendl;
-
   return r;
 }
 
@@ -808,8 +799,6 @@ int RadosClient::remove(PoolCtx& pool, const object_t& oid)
   int r;
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
-  dout(0) << "going to write" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->remove(oid, layout,
@@ -849,8 +838,6 @@ int RadosClient::exec(PoolCtx& pool, const object_t& oid, const char *cls, const
     cond.Wait(mylock);
   mylock.Unlock();
 
-  dout(0) << "after call got " << outbl.length() << " bytes" << dendl;
-
   return r;
 }
 
@@ -864,9 +851,6 @@ int RadosClient::read(PoolCtx& pool, const object_t& oid, off_t off, bufferlist&
   int r;
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
-
-  dout(0) << "going to read" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->read(oid, layout,
@@ -906,8 +890,6 @@ int RadosClient::stat(PoolCtx& pool, const object_t& oid, __u64 *psize, time_t *
   if (!psize)
     psize = &size;
 
-  dout(0) << "going to stat" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->stat(oid, layout,
@@ -938,9 +920,6 @@ int RadosClient::getxattr(PoolCtx& pool, const object_t& oid, const char *name,
   int r;
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
-
-  dout(0) << "going to getxattr" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->getxattr(oid, layout,
@@ -975,8 +954,6 @@ int RadosClient::setxattr(PoolCtx& pool, const object_t& oid, const char *name,
 
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
-  dout(0) << "going to setxattr" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->setxattr(oid, layout, name,
@@ -992,8 +969,6 @@ int RadosClient::setxattr(PoolCtx& pool, const object_t& oid, const char *name,
   if (r < 0)
     return r;
 
-  dout(0) << "did setxattr" << dendl;
-
   return bl.length();
 }
 
@@ -1012,8 +987,6 @@ int RadosClient::getxattrs(PoolCtx& pool, const object_t& oid, map<nstring, buff
 
   Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
 
-  dout(0) << "going to setxattr" << dendl;
-
   lock.Lock();
   ceph_object_layout layout = objecter->osdmap->make_object_layout(oid, pool.poolid);
   objecter->getxattrs(oid, layout, pool.snap_seq,
@@ -1026,8 +999,6 @@ int RadosClient::getxattrs(PoolCtx& pool, const object_t& oid, map<nstring, buff
     cond.Wait(mylock);
   mylock.Unlock();
 
-  dout(0) << "did setxattr" << dendl;
-
   return r;
 }
 
@@ -1351,12 +1322,6 @@ extern "C" int rados_initialize(int argc, const char **argv)
   if (!rados_initialized) {
     __rados_init(argc, argv);
     radosp = new RadosClient;
-
-    if (!radosp) {
-      dout(0) <<  "radosp is NULL" << dendl;
-      ret = -ENOMEM;
-      goto out;
-    }
     radosp->init();
   }
   ++rados_initialized;
index 1228d5ccda032b52a4ad4bcf39d59539d32442dc..994e34ea70a0c955ac629c80c9c8e3ee9597e1ec 100644 (file)
@@ -58,8 +58,8 @@ int aio_bench(Rados& rados, rados_pool_t pool, int operation,
   int r = 0;
 
   //set up the pool
-  cout << "open pool result = " << rados.open_pool("data",&pool)
-       << " pool = " << pool << std::endl;
+  r = rados.open_pool("data",&pool);
+  //cout << "open pool result = " << r << " pool = " << pool << std::endl;
   
   //get data from previous write run, if available
   if (operation != OP_WRITE) {