]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Sat, 2 Jul 2005 19:02:05 +0000 (19:02 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Sat, 2 Jul 2005 19:02:05 +0000 (19:02 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@383 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/config.cc
ceph/messages/MClientReply.h
ceph/messages/MClientRequest.h
ceph/msg/FakeMessenger.cc
ceph/msg/MPIMessenger.cc
ceph/msg/Message.h
ceph/msg/TCPMessenger.cc
ceph/osd/FakeStore.cc

index 35be80e495bfc14a079a942206bf834c14d5728b..51ba1550e43a79270f3c2ed97acc354521588151 100644 (file)
@@ -26,8 +26,8 @@ OSDFileLayout g_OSD_FileLayout( 1<<20, 1, 1<<20 );   // stripe files over whole
 OSDFileLayout g_OSD_MDDirLayout( 1<<14, 1<<2, 1<<19 );
 
 // stripe mds log over 128 byte bits (see mds_log_pad_entry below to match!)
-//OSDFileLayout g_OSD_MDLogLayout( 1<<7, 32, 1<<20 );
-OSDFileLayout g_OSD_MDLogLayout( 57, 32, 1<<20 );  // pathological case to test striping buffer mapping
+OSDFileLayout g_OSD_MDLogLayout( 1<<7, 32, 1<<20 );
+//OSDFileLayout g_OSD_MDLogLayout( 57, 32, 1<<20 );  // pathological case to test striping buffer mapping
 //OSDFileLayout g_OSD_MDLogLayout( 1<<20, 1, 1<<20 );
 
 
index 1706379b3408cc988b1d8f2dfc4577ade77a06c9..da3e8a3489dccab7e317f0572c9b373ce6024cb8 100644 (file)
@@ -124,6 +124,7 @@ class MClientReply : public Message {
   MClientReply() {};
   MClientReply(MClientRequest *req, int result = 0) : 
        Message(MSG_CLIENT_REPLY) {
+       memset(&st, 0, sizeof(st));
        this->st.pcid = req->get_pcid();    // match up procedure call id!!!
        this->st.tid = req->get_tid();
        this->st.op = req->get_op();
index db9bea00db2c15348d49314f1d04f97ff9a033d8..02b372e77d9499babbb0a0a1f92db847edcea87a 100644 (file)
@@ -122,8 +122,8 @@ class MClientRequest : public Message {
 inline ostream& operator<<(ostream& out, MClientRequest& req) {
   out << &req << " ";
   out << "client" << req.get_client() 
-       //        << "." << req.get_tid() 
-       //<< ".pcid=" << req.get_pcid() 
+         << "." << req.get_tid() 
+         << ".pcid=" << req.get_pcid() 
          << ":";
   switch(req.get_op()) {
   case MDS_OP_STAT: 
index 985b7907894874579ec5e004b332961ef27194c5..b2233847aad3981c184eee36b6500a249aee87b5 100644 (file)
@@ -155,8 +155,8 @@ int fakemessenger_do_loop_2()
                
                if (g_conf.fakemessenger_serialize) {
                  // encode
-                 m->reset_payload();
-                 m->encode_payload();
+                 if (m->empty_payload()) 
+                       m->encode_payload();
                  msg_envelope_t env = m->get_envelope();
                  bufferlist bl;
                  bl.claim( m->get_payload() );
index c3e2c8785519f93c6b818a6b55c059bc44634f9f..59d78169d0dc6b2d9fd06c116edf10c77d5555ec 100644 (file)
@@ -240,8 +240,8 @@ int mpi_send(Message *m, int tag)
   } 
 
   // marshall
-  m->reset_payload();
-  m->encode_payload();
+  if (m->empty_payload())
+       m->encode_payload();
   msg_envelope_t *env = &m->get_envelope();
   bufferlist blist = m->get_payload();
   env->nchunks = blist.buffers().size();
index 4eb97457d1df8913690aa245a6c824de236005a5..6223778ec2f05758fc8ca03d2ea71faa911a8553 100644 (file)
@@ -160,6 +160,7 @@ class Message {
   virtual long get_pcid() { return 0; }
   virtual void set_pcid(long t) { assert(0); }  // overload me
 
+  bool empty_payload() { return payload.length() == 0; }
   bufferlist& get_payload() {
        return payload;
   }
index 4cfb3c5a1c0335b03edfe54ccaa83544dee48bf5..1a4e8c446f4b947656e4ddda3c60aef8ce731454 100644 (file)
@@ -346,8 +346,8 @@ int tcp_send(Message *m)
   int rank = MPI_DEST_TO_RANK(m->get_dest(), mpi_world);
 
   // marshall
-  m->reset_payload();
-  m->encode_payload();
+  if (m->empty_payload())
+       m->encode_payload();
   msg_envelope_t *env = &m->get_envelope();
   bufferlist blist;
   blist.claim( m->get_payload() );
@@ -467,8 +467,8 @@ void *tcp_inthread(void *r)
 
   dout(DBL) << "tcp_inthread closing " << who << endl;
 
-  ::close(in_sd[who]);
-  in_sd[who] = 0;
+  //::close(in_sd[who]);
+  //in_sd[who] = 0;
 
   return 0;  
 }
index 4f995fa0166cd7be00dd28c7af0dc5c48b343c40..27fd2b24c4dbe35b6748b45b13f679a418d021f8 100644 (file)
@@ -111,7 +111,7 @@ void FakeStore::wipe_dir(string mydir)
 
 int FakeStore::mkfs()
 {
-  int r;
+  int r = 0;
   struct stat st;
   string mydir;
   get_dir(mydir);
@@ -153,6 +153,8 @@ int FakeStore::mkfs()
        else
          wipe_dir( subdir );
   }
+
+  return r;
 }