]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Change tid_t to ceph_tid_t to avoid conflicts with a popular type 1500/head
authorDan Mick <dan.mick@inktank.com>
Fri, 28 Feb 2014 01:29:28 +0000 (17:29 -0800)
committerDan Mick <dan.mick@inktank.com>
Wed, 19 Mar 2014 02:06:55 +0000 (19:06 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
57 files changed:
src/client/Client.cc
src/client/Client.h
src/client/Inode.h
src/client/MetaRequest.h
src/client/ObjecterWriteback.h
src/include/types.h
src/librados/AioCompletionImpl.h
src/librados/IoCtxImpl.cc
src/librados/IoCtxImpl.h
src/librados/RadosClient.cc
src/librbd/LibrbdWriteback.cc
src/librbd/LibrbdWriteback.h
src/mds/LogSegment.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDS.h
src/mds/SessionMap.h
src/mds/mdstypes.cc
src/mds/mdstypes.h
src/messages/MClientRequest.h
src/messages/MClientRequestForward.h
src/messages/MGetPoolStats.h
src/messages/MGetPoolStatsReply.h
src/messages/MMDSFindIno.h
src/messages/MMDSFindInoReply.h
src/messages/MMDSOpenIno.h
src/messages/MMDSOpenInoReply.h
src/messages/MMonGetVersion.h
src/messages/MMonGetVersionReply.h
src/messages/MOSDOp.h
src/messages/MOSDSubOp.h
src/messages/MPoolOp.h
src/messages/MPoolOpReply.h
src/messages/MStatfs.h
src/messages/MStatfsReply.h
src/mon/MonClient.cc
src/mon/MonClient.h
src/msg/Message.h
src/msg/Pipe.cc
src/osd/ECBackend.cc
src/osd/ECBackend.h
src/osd/ECMsgTypes.h
src/osd/OSD.cc
src/osd/OSD.h
src/osd/OpRequest.h
src/osd/PGBackend.h
src/osd/ReplicatedBackend.cc
src/osd/ReplicatedBackend.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h
src/osdc/ObjectCacher.cc
src/osdc/ObjectCacher.h
src/osdc/Objecter.cc
src/osdc/Objecter.h
src/osdc/WritebackHandler.h
src/test/osdc/FakeWriteback.cc
src/test/osdc/FakeWriteback.h

index 3e7c4e6f1600371f1db63af22d75104eb7ae5270..8691cd7678e89007f05b50fc486bf61268d866d6 100644 (file)
@@ -1202,7 +1202,7 @@ void Client::dump_mds_sessions(Formatter *f)
 }
 void Client::dump_mds_requests(Formatter *f)
 {
-  for (map<tid_t, MetaRequest*>::iterator p = mds_requests.begin();
+  for (map<ceph_tid_t, MetaRequest*>::iterator p = mds_requests.begin();
        p != mds_requests.end();
        ++p) {
     f->open_object_section("request");
@@ -1315,7 +1315,7 @@ int Client::make_request(MetaRequest *request,
   int r = 0;
 
   // assign a unique tid
-  tid_t tid = ++last_tid;
+  ceph_tid_t tid = ++last_tid;
   request->set_tid(tid);
   // make note
   mds_requests[tid] = request->get();
@@ -1726,7 +1726,7 @@ void Client::handle_client_request_forward(MClientRequestForward *fwd)
     fwd->put();
     return;
   }
-  tid_t tid = fwd->get_tid();
+  ceph_tid_t tid = fwd->get_tid();
 
   if (mds_requests.count(tid) == 0) {
     ldout(cct, 10) << "handle_client_request_forward no pending request on tid " << tid << dendl;
@@ -1765,7 +1765,7 @@ void Client::handle_client_reply(MClientReply *reply)
     return;
   }
 
-  tid_t tid = reply->get_tid();
+  ceph_tid_t tid = reply->get_tid();
   bool is_safe = reply->is_safe();
 
   if (mds_requests.count(tid) == 0) {
@@ -2043,7 +2043,7 @@ void Client::send_reconnect(MetaSession *session)
 void Client::kick_requests(MetaSession *session)
 {
   ldout(cct, 10) << "kick_requests for mds." << session->mds_num << dendl;
-  for (map<tid_t, MetaRequest*>::iterator p = mds_requests.begin();
+  for (map<ceph_tid_t, MetaRequest*>::iterator p = mds_requests.begin();
        p != mds_requests.end();
        ++p) {
     if (p->second->mds == session->mds_num) {
@@ -2063,7 +2063,7 @@ void Client::resend_unsafe_requests(MetaSession *session)
 void Client::kick_requests_closed(MetaSession *session)
 {
   ldout(cct, 10) << "kick_requests_closed for mds." << session->mds_num << dendl;
-  for (map<tid_t, MetaRequest*>::iterator p = mds_requests.begin();
+  for (map<ceph_tid_t, MetaRequest*>::iterator p = mds_requests.begin();
        p != mds_requests.end();
        ++p) {
     if (p->second->mds == session->mds_num) {
@@ -6513,7 +6513,7 @@ int Client::_fsync(Fh *f, bool syncdataonly)
   int r = 0;
 
   Inode *in = f->inode;
-  tid_t wait_on_flush = 0;
+  ceph_tid_t wait_on_flush = 0;
   bool flushed_metadata = false;
   Mutex lock("Client::_fsync::lock");
   Cond cond;
index 20169fc7fd1b2dfedef236749a079d5a47fe83b3..0aa81706bdd6aa4e3a2bf4d2bf5f3231b3efae23 100644 (file)
@@ -255,8 +255,8 @@ public:
   void resend_unsafe_requests(MetaSession *s);
 
   // mds requests
-  tid_t last_tid, last_flush_seq;
-  map<tid_t, MetaRequest*> mds_requests;
+  ceph_tid_t last_tid, last_flush_seq;
+  map<ceph_tid_t, MetaRequest*> mds_requests;
   set<int>                 failed_mds;
 
   void dump_mds_requests(Formatter *f);
index 587a7ea6c45435764c89a0262562ef881195c6ee..d8e001fce7984befdf412fbe0def48aaaf9f0ca4 100644 (file)
@@ -149,7 +149,7 @@ class Inode {
   int snap_caps, snap_cap_refs;
   utime_t hold_caps_until;
   xlist<Inode*>::item cap_item, flushing_cap_item;
-  tid_t last_flush_tid;
+  ceph_tid_t last_flush_tid;
 
   SnapRealm *snaprealm;
   xlist<Inode*>::item snaprealm_item;
index 5583cd16281380ffdbbc8907b1973680a658a663..45a90dc02083c96fb289f57e22408a0b8bb6ad59 100644 (file)
@@ -140,8 +140,8 @@ public:
   }
 
   // normal fields
-  void set_tid(tid_t t) { tid = t; }
-  void set_oldest_client_tid(tid_t t) { head.oldest_client_tid = t; }
+  void set_tid(ceph_tid_t t) { tid = t; }
+  void set_oldest_client_tid(ceph_tid_t t) { head.oldest_client_tid = t; }
   void inc_num_fwd() { head.num_fwd = head.num_fwd + 1; }
   void set_retry_attempt(int a) { head.num_retry = a; }
   void set_filepath(const filepath& fp) { path = fp; }
@@ -154,7 +154,7 @@ public:
     head.flags = head.flags | CEPH_MDS_FLAG_WANT_DENTRY;
   }
   int get_op() { return head.op; }
-  tid_t get_tid() { return tid; }
+  ceph_tid_t get_tid() { return tid; }
   filepath& get_filepath() { return path; }
   filepath& get_filepath2() { return path2; }
 
index 9a10fb48a065664242bf4ff16df9cb87cda10ac6..f2d903a59b71f820c7185b4298156e586d48eb3c 100644 (file)
@@ -23,7 +23,7 @@ class ObjecterWriteback : public WritebackHandler {
     return false;
   }
 
-  virtual tid_t write(const object_t& oid, const object_locator_t& oloc,
+  virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
                      uint64_t off, uint64_t len, const SnapContext& snapc,
                      const bufferlist &bl, utime_t mtime, uint64_t trunc_size,
                      __u32 trunc_seq, Context *oncommit) {
@@ -31,7 +31,7 @@ class ObjecterWriteback : public WritebackHandler {
                                   trunc_size, trunc_seq, NULL, oncommit);
   }
 
-  virtual tid_t lock(const object_t& oid, const object_locator_t& oloc, int op,
+  virtual ceph_tid_t lock(const object_t& oid, const object_locator_t& oloc, int op,
                     int flags, Context *onack, Context *oncommit) {
     return m_objecter->lock(oid, oloc, op, flags, onack, oncommit);
   }
index 974edee02fd9fa20ad1790e6b31c7dd2cc95d02f..ffb0202b2d17e45444052a3a2ed54b7034cc9cd4 100644 (file)
@@ -235,7 +235,7 @@ WRITE_RAW_ENCODER(ceph_mon_statfs_reply)
 // some basic types
 
 // NOTE: these must match ceph_fs.h typedefs
-typedef uint64_t tid_t;         // transaction id
+typedef uint64_t ceph_tid_t; // transaction id
 typedef uint64_t version_t;
 typedef __u32 epoch_t;       // map epoch  (32bits -> 13 epochs/second for 10 years)
 
index 48941bb2b4942a3fde3d5a789641e24062ffce5b..521f3bc153b00a1ca287fc6b4919f5fa848cda3a 100644 (file)
@@ -43,7 +43,7 @@ struct librados::AioCompletionImpl {
   unsigned maxlen;
 
   IoCtxImpl *io;
-  tid_t aio_write_seq;
+  ceph_tid_t aio_write_seq;
   xlist<AioCompletionImpl*>::item aio_write_list_item;
 
   AioCompletionImpl() : lock("AioCompletionImpl lock", false, false),
index 692596160b622f1d6bed2bde172a3e87ac679e37..4f5387aa578c49e1f641a51a0981a9186383a989 100644 (file)
@@ -95,7 +95,7 @@ void librados::IoCtxImpl::complete_aio_write(AioCompletionImpl *c)
   assert(c->io == this);
   c->aio_write_list_item.remove_myself();
 
-  map<tid_t, std::list<AioCompletionImpl*> >::iterator waiters = aio_write_waiters.begin();
+  map<ceph_tid_t, std::list<AioCompletionImpl*> >::iterator waiters = aio_write_waiters.begin();
   while (waiters != aio_write_waiters.end()) {
     if (!aio_write_list.empty() &&
        aio_write_list.front()->aio_write_seq <= waiters->first) {
@@ -123,7 +123,7 @@ void librados::IoCtxImpl::flush_aio_writes_async(AioCompletionImpl *c)
   ldout(client->cct, 20) << "flush_aio_writes_async " << this
                         << " completion " << c << dendl;
   Mutex::Locker l(aio_write_list_lock);
-  tid_t seq = aio_write_seq;
+  ceph_tid_t seq = aio_write_seq;
   if (aio_write_list.empty()) {
     ldout(client->cct, 20) << "flush_aio_writes_async no writes. (tid "
                           << seq << ")" << dendl;
@@ -140,7 +140,7 @@ void librados::IoCtxImpl::flush_aio_writes()
 {
   ldout(client->cct, 20) << "flush_aio_writes" << dendl;
   aio_write_list_lock.Lock();
-  tid_t seq = aio_write_seq;
+  ceph_tid_t seq = aio_write_seq;
   while (!aio_write_list.empty() &&
         aio_write_list.front()->aio_write_seq <= seq)
     aio_write_cond.Wait(aio_write_list_lock);
index 58e27ed49c979ccd5dd8c3c724ba9e46f8fe0150..528022f3e0fa6f90bc1880a557f83ae7a5bdbe3a 100644 (file)
@@ -42,10 +42,10 @@ struct librados::IoCtxImpl {
   object_locator_t oloc;
 
   Mutex aio_write_list_lock;
-  tid_t aio_write_seq;
+  ceph_tid_t aio_write_seq;
   Cond aio_write_cond;
   xlist<AioCompletionImpl*> aio_write_list;
-  map<tid_t, std::list<AioCompletionImpl*> > aio_write_waiters;
+  map<ceph_tid_t, std::list<AioCompletionImpl*> > aio_write_waiters;
 
   Mutex *lock;
   Objecter *objecter;
index b656b5e25f23ff7b3b0439c0042d18afffeeab5a..249c34f564f00f8379ea7f4ba848abe26b07774d 100644 (file)
@@ -754,7 +754,7 @@ int librados::RadosClient::osd_command(int osd, vector<string>& cmd,
   Cond cond;
   bool done;
   int ret;
-  tid_t tid;
+  ceph_tid_t tid;
 
   if (osd < 0)
     return -EINVAL;
@@ -781,7 +781,7 @@ int librados::RadosClient::pg_command(pg_t pgid, vector<string>& cmd,
   Cond cond;
   bool done;
   int ret;
-  tid_t tid;
+  ceph_tid_t tid;
   lock.Lock();
   int r = objecter->pg_command(pgid, cmd, inbl, &tid, poutbl, prs,
                        new C_SafeCond(&mylock, &cond, &done, &ret));
index ddb882dfbbb9ca1fe09dcb6354a218c7e1b92b36..854ac9dc3e78becf328652f330d560e9bedadb39 100644 (file)
@@ -131,7 +131,7 @@ namespace librbd {
     return may;
   }
 
-  tid_t LibrbdWriteback::write(const object_t& oid,
+  ceph_tid_t LibrbdWriteback::write(const object_t& oid,
                               const object_locator_t& oloc,
                               uint64_t off, uint64_t len,
                               const SnapContext& snapc,
index 0967421e9e3c20dc96b39a598c9e2f93c9ec3e3f..a8bd9cb2b57a1436982b9b11b08ab6d9fdcfeefe 100644 (file)
@@ -32,7 +32,7 @@ namespace librbd {
     virtual bool may_copy_on_write(const object_t& oid, uint64_t read_off, uint64_t read_len, snapid_t snapid);
 
     // Note that oloc, trunc_size, and trunc_seq are ignored
-    virtual tid_t write(const object_t& oid, const object_locator_t& oloc,
+    virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
                        uint64_t off, uint64_t len, const SnapContext& snapc,
                        const bufferlist &bl, utime_t mtime, uint64_t trunc_size,
                        __u32 trunc_seq, Context *oncommit);
@@ -52,7 +52,7 @@ namespace librbd {
   private:
     void complete_writes(const std::string& oid);
 
-    tid_t m_tid;
+    ceph_tid_t m_tid;
     Mutex& m_lock;
     librbd::ImageCtx *m_ictx;
     ceph::unordered_map<std::string, std::queue<write_result_d*> > m_writes;
index c9fdfd7f4096e104779708a866af657cf6f977e8..2fffe3bbaf9337aee15be65067ee9020c8ab811b 100644 (file)
@@ -59,7 +59,7 @@ class LogSegment {
   set<dirfrag_t> uncommitted_fragments;
 
   // client request ids
-  map<int, tid_t> last_client_tids;
+  map<int, ceph_tid_t> last_client_tids;
 
   // table version
   version_t inotablev;
index 28930cd9119b157c659c4f7409a536c334712390..95c4ab9639f7962e0e0064590f5cd3b6c8ec8538 100644 (file)
@@ -8667,7 +8667,7 @@ void MDCache::find_ino_peers(inodeno_t ino, Context *c, int hint)
   dout(5) << "find_ino_peers " << ino << " hint " << hint << dendl;
   assert(!have_inode(ino));
   
-  tid_t tid = ++find_ino_peer_last_tid;
+  ceph_tid_t tid = ++find_ino_peer_last_tid;
   find_ino_peer_info_t& fip = find_ino_peer[tid];
   fip.ino = ino;
   fip.tid = tid;
@@ -8731,7 +8731,7 @@ void MDCache::handle_find_ino(MMDSFindIno *m)
 
 void MDCache::handle_find_ino_reply(MMDSFindInoReply *m)
 {
-  map<tid_t, find_ino_peer_info_t>::iterator p = find_ino_peer.find(m->tid);
+  map<ceph_tid_t, find_ino_peer_info_t>::iterator p = find_ino_peer.find(m->tid);
   if (p != find_ino_peer.end()) {
     dout(10) << "handle_find_ino_reply " << *m << dendl;
     find_ino_peer_info_t& fip = p->second;
@@ -8773,7 +8773,7 @@ void MDCache::handle_find_ino_reply(MMDSFindInoReply *m)
 void MDCache::kick_find_ino_peers(int who)
 {
   // find_ino_peers requests we should move on from
-  for (map<tid_t,find_ino_peer_info_t>::iterator p = find_ino_peer.begin();
+  for (map<ceph_tid_t,find_ino_peer_info_t>::iterator p = find_ino_peer.begin();
        p != find_ino_peer.end();
        ++p) {
     find_ino_peer_info_t& fip = p->second;
@@ -10053,7 +10053,7 @@ void MDCache::discover_ino(CDir *base,
 
 void MDCache::kick_discovers(int who)
 {
-  for (map<tid_t,discover_info_t>::iterator p = discovers.begin();
+  for (map<ceph_tid_t,discover_info_t>::iterator p = discovers.begin();
        p != discovers.end();
        ++p) {
     if (p->second.mds != who)
@@ -10387,7 +10387,7 @@ void MDCache::handle_discover_reply(MDiscoverReply *m)
 
   // decrement discover counters
   if (m->get_tid()) {
-    map<tid_t,discover_info_t>::iterator p = discovers.find(m->get_tid());
+    map<ceph_tid_t,discover_info_t>::iterator p = discovers.find(m->get_tid());
     if (p != discovers.end()) {
       dout(10) << " found tid " << m->get_tid() << dendl;
       discovers.erase(p);
index b3c5ad5535870283244299e16a3ab832e64d7597..500c23fb582ccf92c0df6a7fa270ff6023c6abed 100644 (file)
@@ -131,7 +131,7 @@ public:
 
   // -- discover --
   struct discover_info_t {
-    tid_t tid;
+    ceph_tid_t tid;
     int mds;
     inodeno_t ino;
     frag_t frag;
@@ -144,12 +144,12 @@ public:
     discover_info_t() : tid(0), mds(-1), snap(CEPH_NOSNAP), want_base_dir(false), want_xlocked(false) {}
   };
 
-  map<tid_t, discover_info_t> discovers;
-  tid_t discover_last_tid;
+  map<ceph_tid_t, discover_info_t> discovers;
+  ceph_tid_t discover_last_tid;
 
   void _send_discover(discover_info_t& dis);
   discover_info_t& _create_discover(int mds) {
-    tid_t t = ++discover_last_tid;
+    ceph_tid_t t = ++discover_last_tid;
     discover_info_t& d = discovers[t];
     d.tid = t;
     d.mds = mds;
@@ -802,7 +802,7 @@ protected:
     open_ino_info_t() : checking(-1), auth_hint(-1),
       check_peers(true), fetch_backtrace(true), discover(false) {}
   };
-  tid_t open_ino_last_tid;
+  ceph_tid_t open_ino_last_tid;
   map<inodeno_t,open_ino_info_t> opening_inodes;
 
   void _open_ino_backtrace_fetched(inodeno_t ino, bufferlist& bl, int err);
@@ -830,7 +830,7 @@ public:
   // -- find_ino_peer --
   struct find_ino_peer_info_t {
     inodeno_t ino;
-    tid_t tid;
+    ceph_tid_t tid;
     Context *fin;
     int hint;
     int checking;
@@ -839,8 +839,8 @@ public:
     find_ino_peer_info_t() : tid(0), fin(NULL), hint(-1), checking(-1) {}
   };
 
-  map<tid_t, find_ino_peer_info_t> find_ino_peer;
-  tid_t find_ino_peer_last_tid;
+  map<ceph_tid_t, find_ino_peer_info_t> find_ino_peer;
+  ceph_tid_t find_ino_peer_last_tid;
 
   void find_ino_peers(inodeno_t ino, Context *c, int hint=-1);
   void _do_find_ino_peer(find_ino_peer_info_t& fip);
index ac68fea83f3a3c1ec4c463ed7a5a5850adec50d3..10acd34843d48eb0c493bfdbcdbb6014a518f86b 100644 (file)
@@ -204,7 +204,7 @@ class MDS : public Dispatcher {
 
   map<int,version_t> peer_mdsmap_epoch;
 
-  tid_t last_tid;    // for mds-initiated requests (e.g. stray rename)
+  ceph_tid_t last_tid;    // for mds-initiated requests (e.g. stray rename)
 
  public:
   void wait_for_active(Context *c) { 
@@ -251,7 +251,7 @@ class MDS : public Dispatcher {
 
   void request_state(int s);
 
-  tid_t issue_tid() { return ++last_tid; }
+  ceph_tid_t issue_tid() { return ++last_tid; }
     
 
   // -- waiters --
index 8ddbacc666039ac5eee5934cf3e6df5fac3eeda1..e06a7b7dde3e977fb277e0ac5f67e7e375c2b3ba 100644 (file)
@@ -181,17 +181,17 @@ private:
 
 
 public:
-  void add_completed_request(tid_t t, inodeno_t created) {
+  void add_completed_request(ceph_tid_t t, inodeno_t created) {
     info.completed_requests[t] = created;
   }
-  void trim_completed_requests(tid_t mintid) {
+  void trim_completed_requests(ceph_tid_t mintid) {
     // trim
     while (!info.completed_requests.empty() && 
           (mintid == 0 || info.completed_requests.begin()->first < mintid))
       info.completed_requests.erase(info.completed_requests.begin());
   }
-  bool have_completed_request(tid_t tid, inodeno_t *pcreated) const {
-    map<tid_t,inodeno_t>::const_iterator p = info.completed_requests.find(tid);
+  bool have_completed_request(ceph_tid_t tid, inodeno_t *pcreated) const {
+    map<ceph_tid_t,inodeno_t>::const_iterator p = info.completed_requests.find(tid);
     if (p == info.completed_requests.end())
       return false;
     if (pcreated)
@@ -370,7 +370,7 @@ public:
     Session *session = get_session(rid.name);
     return session && session->have_completed_request(rid.tid, NULL);
   }
-  void trim_completed_requests(entity_name_t c, tid_t tid) {
+  void trim_completed_requests(entity_name_t c, ceph_tid_t tid) {
     Session *session = get_session(c);
     assert(session);
     session->trim_completed_requests(tid);
index aadf123ccae06f30765701c53d6a74f59e29937c..113cce6b87015fae0b1477d9a98c2ae870d3d1b9 100644 (file)
@@ -555,7 +555,7 @@ void session_info_t::decode(bufferlist::iterator& p)
   DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, p);
   ::decode(inst, p);
   if (struct_v <= 2) {
-    set<tid_t> s;
+    set<ceph_tid_t> s;
     ::decode(s, p);
     while (!s.empty()) {
       completed_requests[*s.begin()] = inodeno_t();
@@ -576,7 +576,7 @@ void session_info_t::dump(Formatter *f) const
   f->dump_stream("inst") << inst;
 
   f->open_array_section("completed_requests");
-  for (map<tid_t,inodeno_t>::const_iterator p = completed_requests.begin();
+  for (map<ceph_tid_t,inodeno_t>::const_iterator p = completed_requests.begin();
        p != completed_requests.end();
        ++p) {
     f->open_object_section("request");
index 117a80a8dfc94c0b85aab73c25ade869c7a860f3..184cf7042877355205d6e5b2b974f6fd67fb612d 100644 (file)
@@ -513,7 +513,7 @@ inline ostream& operator<<(ostream& out, const old_rstat_t& o) {
 
 struct session_info_t {
   entity_inst_t inst;
-  map<tid_t,inodeno_t> completed_requests;
+  map<ceph_tid_t,inodeno_t> completed_requests;
   interval_set<inodeno_t> prealloc_inos;   // preallocated, ready to use.
   interval_set<inodeno_t> used_inos;       // journaling use
 
@@ -651,7 +651,7 @@ struct metareqid_t {
   entity_name_t name;
   uint64_t tid;
   metareqid_t() : tid(0) {}
-  metareqid_t(entity_name_t n, tid_t t) : name(n), tid(t) {}
+  metareqid_t(entity_name_t n, ceph_tid_t t) : name(n), tid(t) {}
   void encode(bufferlist& bl) const {
     ::encode(name, bl);
     ::encode(tid, bl);
index 0c17b16bfba45ec62721d06dc0eb58a0480dcb18..c436368b9dc887216f2ccc4cf52b8a87016fa766 100644 (file)
@@ -110,7 +110,7 @@ public:
   }
 
   // normal fields
-  void set_oldest_client_tid(tid_t t) { head.oldest_client_tid = t; }
+  void set_oldest_client_tid(ceph_tid_t t) { head.oldest_client_tid = t; }
   void inc_num_fwd() { head.num_fwd = head.num_fwd + 1; }
   void set_retry_attempt(int a) { head.num_retry = a; }
   void set_filepath(const filepath& fp) { path = fp; }
@@ -125,7 +125,7 @@ public:
     head.flags = head.flags | CEPH_MDS_FLAG_REPLAY;
   }
     
-  tid_t get_oldest_client_tid() const { return head.oldest_client_tid; }
+  ceph_tid_t get_oldest_client_tid() const { return head.oldest_client_tid; }
   int get_num_fwd() const { return head.num_fwd; }
   int get_retry_attempt() const { return head.num_retry; }
   int get_op() const { return head.op; }
index e174d83e8e964dffbb9970eddc942ca2c8f0e54b..976d9dcdd933b8073362cd6fe342676daeefa971 100644 (file)
@@ -25,7 +25,7 @@ class MClientRequestForward : public Message {
   MClientRequestForward()
     : Message(CEPH_MSG_CLIENT_REQUEST_FORWARD),
       dest_mds(-1), num_fwd(-1), client_must_resend(false) {}
-  MClientRequestForward(tid_t t, int dm, int nf, bool cmr) : 
+  MClientRequestForward(ceph_tid_t t, int dm, int nf, bool cmr) :
     Message(CEPH_MSG_CLIENT_REQUEST_FORWARD),
     dest_mds(dm), num_fwd(nf), client_must_resend(cmr) {
     assert(client_must_resend);
index acf9637e4c516ec8eaa8decb5bd719c17bd25cbf..d004e2968aadcf32c9946834b1962ee696af6c2e 100644 (file)
@@ -26,7 +26,7 @@ public:
   list<string> pools;
 
   MGetPoolStats() : PaxosServiceMessage(MSG_GETPOOLSTATS, 0) {}
-  MGetPoolStats(const uuid_d& f, tid_t t, list<string>& ls, version_t l) :
+  MGetPoolStats(const uuid_d& f, ceph_tid_t t, list<string>& ls, version_t l) :
     PaxosServiceMessage(MSG_GETPOOLSTATS, l),
     fsid(f), pools(ls) {
     set_tid(t);
index 719d5b80e0e5393b194f72ad0e56abf67baa0a1a..07b99cffd17b749a59a0404888a066cb33154be0 100644 (file)
@@ -24,7 +24,7 @@ public:
   map<string,pool_stat_t> pool_stats;
 
   MGetPoolStatsReply() : PaxosServiceMessage(MSG_GETPOOLSTATSREPLY, 0) {}
-  MGetPoolStatsReply(uuid_d& f, tid_t t, version_t v) :
+  MGetPoolStatsReply(uuid_d& f, ceph_tid_t t, version_t v) :
     PaxosServiceMessage(MSG_GETPOOLSTATSREPLY, v),
     fsid(f) {
     set_tid(t);
index d8eddcb49b841e851a08b4c7f750580ac79a15b5..859a7c405f1536701c695b198d056986c724fe4e 100644 (file)
 #include "include/filepath.h"
 
 struct MMDSFindIno : public Message {
-  tid_t tid;
+  ceph_tid_t tid;
   inodeno_t ino;
 
   MMDSFindIno() : Message(MSG_MDS_FINDINO) {}
-  MMDSFindIno(tid_t t, inodeno_t i) : Message(MSG_MDS_FINDINO), tid(t), ino(i) {}
+  MMDSFindIno(ceph_tid_t t, inodeno_t i) : Message(MSG_MDS_FINDINO), tid(t), ino(i) {}
 
   const char *get_type_name() const { return "findino"; }
   void print(ostream &out) const {
index 3d6ec6c6ce6b57553a447e93cf90ee7a4d83f0d1..aaf2a6e7446cceb2568b45046f7aadf9c819bc0d 100644 (file)
 #include "include/filepath.h"
 
 struct MMDSFindInoReply : public Message {
-  tid_t tid;
+  ceph_tid_t tid;
   filepath path;
 
   MMDSFindInoReply() : Message(MSG_MDS_FINDINOREPLY) {}
-  MMDSFindInoReply(tid_t t) : Message(MSG_MDS_FINDINOREPLY), tid(t) {}
+  MMDSFindInoReply(ceph_tid_t t) : Message(MSG_MDS_FINDINOREPLY), tid(t) {}
 
   const char *get_type_name() const { return "findinoreply"; }
   void print(ostream &out) const {
index 0918e87e0d9828e4f3f3dcdd8b8992bb4f204cbd..a169fd0e79d0206f1b633d5218f5560014ee4eb0 100644 (file)
@@ -22,7 +22,7 @@ struct MMDSOpenIno : public Message {
   vector<inode_backpointer_t> ancestors;
 
   MMDSOpenIno() : Message(MSG_MDS_OPENINO) {}
-  MMDSOpenIno(tid_t t, inodeno_t i, vector<inode_backpointer_t>& a) :
+  MMDSOpenIno(ceph_tid_t t, inodeno_t i, vector<inode_backpointer_t>& a) :
     Message(MSG_MDS_OPENINO), ino(i), ancestors(a) {
     header.tid = t;
   }
index 245027f11f3a2e3b833d4553d5fd5a9773ba0843..5204d3c792b7f4fceb9fc5d0ccb24961294fccc4 100644 (file)
@@ -24,7 +24,7 @@ struct MMDSOpenInoReply : public Message {
   int32_t error;
 
   MMDSOpenInoReply() : Message(MSG_MDS_OPENINOREPLY) {}
-  MMDSOpenInoReply(tid_t t, inodeno_t i, int h=-1, int e=0) :
+  MMDSOpenInoReply(ceph_tid_t t, inodeno_t i, int h=-1, int e=0) :
     Message(MSG_MDS_OPENINOREPLY), ino(i), hint(h), error(e) {
     header.tid = t;
   }
index 14c648184769d4601d864a23e55e0d42648a36a8..e74daa6519cff6ea500621ee1a137750e6933abb 100644 (file)
@@ -48,7 +48,7 @@ public:
     ::decode(what, p);
   }
 
-  tid_t handle;
+  ceph_tid_t handle;
   string what;
 
 private:
index 95e384dbc62b431edc21e79a2825b3de528d4c11..b13b2f0098ae9ec29a0a47e71b177307109d632e 100644 (file)
@@ -53,7 +53,7 @@ public:
       ::decode(oldest_version, p);
   }
 
-  tid_t handle;
+  ceph_tid_t handle;
   version_t version;
   version_t oldest_version;
 
index 7a27838df624abf8ef708b9d5d6a6a03c827a5bb..ed0a669d9195a4ba0fe1a40e9e3da0782eb7a9f2 100644 (file)
@@ -74,7 +74,7 @@ public:
                       header.tid);
   }
   int get_client_inc() { return client_inc; }
-  tid_t get_client_tid() { return header.tid; }
+  ceph_tid_t get_client_tid() { return header.tid; }
   
   object_t& get_oid() { return oid; }
 
index 9c405e60f3f8e097e115d1b0ccf59933b325c0f2..7c9c5048b2aaba25516a355c869ba35fa6f6bd98 100644 (file)
@@ -223,7 +223,7 @@ public:
     : Message(MSG_OSD_SUBOP, HEAD_VERSION, COMPAT_VERSION) { }
   MOSDSubOp(osd_reqid_t r, pg_shard_t from,
            spg_t p, const hobject_t& po, bool noop_, int aw,
-           epoch_t mape, tid_t rtid, eversion_t v)
+           epoch_t mape, ceph_tid_t rtid, eversion_t v)
     : Message(MSG_OSD_SUBOP, HEAD_VERSION, COMPAT_VERSION),
       map_epoch(mape),
       reqid(r),
index e6d31ee226b03b976fee56f6e0cb4c1a6f92fbca..d864741204ba71a8e6120c52edcb1091cc1b5ee2 100644 (file)
@@ -34,13 +34,13 @@ public:
 
   MPoolOp()
     : PaxosServiceMessage(CEPH_MSG_POOLOP, 0, HEAD_VERSION, COMPAT_VERSION) { }
-  MPoolOp(const uuid_d& f, tid_t t, int p, string& n, int o, version_t v)
+  MPoolOp(const uuid_d& f, ceph_tid_t t, int p, string& n, int o, version_t v)
     : PaxosServiceMessage(CEPH_MSG_POOLOP, v, HEAD_VERSION, COMPAT_VERSION),
       fsid(f), pool(p), name(n), op(o),
       auid(0), snapid(0), crush_rule(0) {
     set_tid(t);
   }
-  MPoolOp(const uuid_d& f, tid_t t, int p, string& n,
+  MPoolOp(const uuid_d& f, ceph_tid_t t, int p, string& n,
          int o, uint64_t uid, version_t v)
     : PaxosServiceMessage(CEPH_MSG_POOLOP, v, HEAD_VERSION, COMPAT_VERSION),
       fsid(f), pool(p), name(n), op(o),
index 702fdf757d95f4c3d571db6789d87c387d909787..d4fa50a6e023d5c62db29fc98f641e7e21847f9d 100644 (file)
@@ -26,14 +26,14 @@ public:
 
   MPoolOpReply() : PaxosServiceMessage(CEPH_MSG_POOLOP_REPLY, 0)
   {}
-  MPoolOpReply( uuid_d& f, tid_t t, int rc, int e, version_t v) :
+  MPoolOpReply( uuid_d& f, ceph_tid_t t, int rc, int e, version_t v) :
     PaxosServiceMessage(CEPH_MSG_POOLOP_REPLY, v),
     fsid(f),
     replyCode(rc),
     epoch(e) {
     set_tid(t);
   }
-  MPoolOpReply( uuid_d& f, tid_t t, int rc, int e, version_t v,
+  MPoolOpReply( uuid_d& f, ceph_tid_t t, int rc, int e, version_t v,
                bufferlist *blp) :
     PaxosServiceMessage(CEPH_MSG_POOLOP_REPLY, v),
     fsid(f),
index 61370a943442d22180b9d9dd9b1ccc5776798881..ec19f6ee585256dbb9bf3e1e547597e167bb1922 100644 (file)
@@ -24,7 +24,7 @@ public:
   uuid_d fsid;
 
   MStatfs() : PaxosServiceMessage(CEPH_MSG_STATFS, 0) {}
-  MStatfs(const uuid_d& f, tid_t t, version_t v) :
+  MStatfs(const uuid_d& f, ceph_tid_t t, version_t v) :
     PaxosServiceMessage(CEPH_MSG_STATFS, v), fsid(f) {
     set_tid(t);
   }
index 8ceec9c7b10ee1a4ba535852b7748578b0018ce7..6bf42d894d73a5d160f9a58d1ee67c70afb8a3d1 100644 (file)
@@ -21,7 +21,7 @@ public:
   struct ceph_mon_statfs_reply h;
 
   MStatfsReply() : Message(CEPH_MSG_STATFS_REPLY) {}
-  MStatfsReply(uuid_d &f, tid_t t, epoch_t epoch) : Message(CEPH_MSG_STATFS_REPLY) {
+  MStatfsReply(uuid_d &f, ceph_tid_t t, epoch_t epoch) : Message(CEPH_MSG_STATFS_REPLY) {
     memcpy(&h.fsid, f.uuid, sizeof(h.fsid));
     header.tid = t;
     h.version = epoch;
index 25dd3cdfe367879be51f620c8b6492035af984fc..f494242e6df2d67d1cf60426190dba3b4d737407 100644 (file)
@@ -914,7 +914,7 @@ int MonClient::_cancel_mon_command(uint64_t tid, int r)
 {
   assert(monc_lock.is_locked());
 
-  map<tid_t, MonCommand*>::iterator it = mon_commands.find(tid);
+  map<ceph_tid_t, MonCommand*>::iterator it = mon_commands.find(tid);
   if (it == mon_commands.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
@@ -1018,7 +1018,7 @@ void MonClient::get_version(string map, version_t *newest, version_t *oldest, Co
 void MonClient::handle_get_version_reply(MMonGetVersionReply* m)
 {
   assert(monc_lock.is_locked());
-  map<tid_t, version_req_d*>::iterator iter = version_requests.find(m->handle);
+  map<ceph_tid_t, version_req_d*>::iterator iter = version_requests.find(m->handle);
   if (iter == version_requests.end()) {
     ldout(cct, 0) << __func__ << " version request with handle " << m->handle
                  << " not found" << dendl;
index a2998bb60c7a94a1f64b63c454bf88b7ec3d561f..239d91b45872ac05ae0abd8fdc0a2adc64ebe486 100644 (file)
@@ -434,8 +434,8 @@ private:
     version_req_d(Context *con, version_t *n, version_t *o) : context(con),newest(n), oldest(o) {}
   };
 
-  map<tid_t, version_req_d*> version_requests;
-  tid_t version_req_id;
+  map<ceph_tid_t, version_req_d*> version_requests;
+  ceph_tid_t version_req_id;
   void handle_get_version_reply(MMonGetVersionReply* m);
 
 
index 740be7be716c3a39b1034460ea6df43028d6578e..3a833726ac3222d382f143dac676011002155482 100644 (file)
@@ -184,7 +184,7 @@ public:
   bool failed;              /// true if we are a lossy connection that has failed.
 
   int rx_buffers_version;
-  map<tid_t,pair<bufferlist,int> > rx_buffers;
+  map<ceph_tid_t,pair<bufferlist,int> > rx_buffers;
 
   friend class boost::intrusive_ptr<Connection>;
 
@@ -284,12 +284,12 @@ public:
   void set_features(uint64_t f) { features = f; }
   void set_feature(uint64_t f) { features |= f; }
 
-  void post_rx_buffer(tid_t tid, bufferlist& bl) {
+  void post_rx_buffer(ceph_tid_t tid, bufferlist& bl) {
     Mutex::Locker l(lock);
     ++rx_buffers_version;
     rx_buffers[tid] = pair<bufferlist,int>(bl, rx_buffers_version);
   }
-  void revoke_rx_buffer(tid_t tid) {
+  void revoke_rx_buffer(ceph_tid_t tid) {
     Mutex::Locker l(lock);
     rx_buffers.erase(tid);
   }
index 9020888a2ffd84c0b6d0058cafbc798cc4d2a8ac..ea76cd712dea97f30175358de714994b2c46f0d8 100644 (file)
@@ -1827,7 +1827,7 @@ int Pipe::read_message(Message **pm)
 
       // get a buffer
       connection_state->lock.Lock();
-      map<tid_t,pair<bufferlist,int> >::iterator p = connection_state->rx_buffers.find(header.tid);
+      map<ceph_tid_t,pair<bufferlist,int> >::iterator p = connection_state->rx_buffers.find(header.tid);
       if (p != connection_state->rx_buffers.end()) {
        if (rxbuf.length() == 0 || p->second.second != rxbuf_version) {
          ldout(msgr->cct,10) << "reader seleting rx buffer v " << p->second.second
index 0751071bd5e8f3dfde32b7385ca138499eedb405..dc2a26fb619248a29e9bb9c5970893cfed5496fe 100644 (file)
@@ -703,13 +703,13 @@ bool ECBackend::handle_message(
 struct SubWriteCommitted : public Context {
   ECBackend *pg;
   OpRequestRef msg;
-  tid_t tid;
+  ceph_tid_t tid;
   eversion_t version;
   eversion_t last_complete;
   SubWriteCommitted(
     ECBackend *pg,
     OpRequestRef msg,
-    tid_t tid,
+    ceph_tid_t tid,
     eversion_t version,
     eversion_t last_complete)
     : pg(pg), msg(msg), tid(tid),
@@ -721,7 +721,7 @@ struct SubWriteCommitted : public Context {
   }
 };
 void ECBackend::sub_write_committed(
-  tid_t tid, eversion_t version, eversion_t last_complete) {
+  ceph_tid_t tid, eversion_t version, eversion_t last_complete) {
   if (get_parent()->pgb_is_primary()) {
     ECSubWriteReply reply;
     reply.tid = tid;
@@ -748,12 +748,12 @@ void ECBackend::sub_write_committed(
 struct SubWriteApplied : public Context {
   ECBackend *pg;
   OpRequestRef msg;
-  tid_t tid;
+  ceph_tid_t tid;
   eversion_t version;
   SubWriteApplied(
     ECBackend *pg,
     OpRequestRef msg,
-    tid_t tid,
+    ceph_tid_t tid,
     eversion_t version)
     : pg(pg), msg(msg), tid(tid), version(version) {}
   void finish(int) {
@@ -763,7 +763,7 @@ struct SubWriteApplied : public Context {
   }
 };
 void ECBackend::sub_write_applied(
-  tid_t tid, eversion_t version) {
+  ceph_tid_t tid, eversion_t version) {
   parent->op_applied(version);
   if (get_parent()->pgb_is_primary()) {
     ECSubWriteReply reply;
@@ -901,7 +901,7 @@ void ECBackend::handle_sub_write_reply(
   pg_shard_t from,
   ECSubWriteReply &op)
 {
-  map<tid_t, Op>::iterator i = tid_to_op_map.find(op.tid);
+  map<ceph_tid_t, Op>::iterator i = tid_to_op_map.find(op.tid);
   assert(i != tid_to_op_map.end());
   if (op.committed) {
     assert(i->second.pending_commit.count(from));
@@ -923,7 +923,7 @@ void ECBackend::handle_sub_read_reply(
   RecoveryMessages *m)
 {
   dout(10) << __func__ << ": reply " << op << dendl;
-  map<tid_t, ReadOp>::iterator iter = tid_to_read_map.find(op.tid);
+  map<ceph_tid_t, ReadOp>::iterator iter = tid_to_read_map.find(op.tid);
   if (iter == tid_to_read_map.end()) {
     //canceled
     return;
@@ -978,7 +978,8 @@ void ECBackend::handle_sub_read_reply(
       rop.complete[i->first].r = i->second;
   }
 
-  map<pg_shard_t, set<tid_t> >::iterator siter = shard_to_read_map.find(from);
+  map<pg_shard_t, set<ceph_tid_t> >::iterator siter =
+shard_to_read_map.find(from);
   assert(siter != shard_to_read_map.end());
   assert(siter->second.count(op.tid));
   siter->second.erase(op.tid);
@@ -1013,8 +1014,8 @@ void ECBackend::complete_read_op(ReadOp &rop, RecoveryMessages *m)
 
 struct FinishReadOp : public GenContext<ThreadPool::TPHandle&>  {
   ECBackend *ec;
-  tid_t tid;
-  FinishReadOp(ECBackend *ec, tid_t tid) : ec(ec), tid(tid) {}
+  ceph_tid_t tid;
+  FinishReadOp(ECBackend *ec, ceph_tid_t tid) : ec(ec), tid(tid) {}
   void finish(ThreadPool::TPHandle &handle) {
     assert(ec->tid_to_read_map.count(tid));
     int priority = ec->tid_to_read_map[tid].priority;
@@ -1088,8 +1089,9 @@ void ECBackend::filter_read_op(
 
 void ECBackend::check_recovery_sources(const OSDMapRef osdmap)
 {
-  set<tid_t> tids_to_filter;
-  for (map<pg_shard_t, set<tid_t> >::iterator i = shard_to_read_map.begin();
+  set<ceph_tid_t> tids_to_filter;
+  for (map<pg_shard_t, set<ceph_tid_t> >::iterator 
+       i = shard_to_read_map.begin();
        i != shard_to_read_map.end();
        ) {
     if (osdmap->is_down(i->first.osd)) {
@@ -1099,10 +1101,10 @@ void ECBackend::check_recovery_sources(const OSDMapRef osdmap)
       ++i;
     }
   }
-  for (set<tid_t>::iterator i = tids_to_filter.begin();
+  for (set<ceph_tid_t>::iterator i = tids_to_filter.begin();
        i != tids_to_filter.end();
        ++i) {
-    map<tid_t, ReadOp>::iterator j = tid_to_read_map.find(*i);
+    map<ceph_tid_t, ReadOp>::iterator j = tid_to_read_map.find(*i);
     assert(j != tid_to_read_map.end());
     filter_read_op(osdmap, j->second);
   }
@@ -1112,7 +1114,7 @@ void ECBackend::_on_change(ObjectStore::Transaction *t)
 {
   writing.clear();
   tid_to_op_map.clear();
-  for (map<tid_t, ReadOp>::iterator i = tid_to_read_map.begin();
+  for (map<ceph_tid_t, ReadOp>::iterator i = tid_to_read_map.begin();
        i != tid_to_read_map.end();
        ++i) {
     dout(10) << __func__ << ": cancelling " << i->second << dendl;
@@ -1157,7 +1159,7 @@ void ECBackend::dump_recovery_info(Formatter *f) const
   }
   f->close_section();
   f->open_array_section("read_ops");
-  for (map<tid_t, ReadOp>::const_iterator i = tid_to_read_map.begin();
+  for (map<ceph_tid_t, ReadOp>::const_iterator i = tid_to_read_map.begin();
        i != tid_to_read_map.end();
        ++i) {
     f->open_object_section("read_op");
@@ -1202,7 +1204,7 @@ void ECBackend::submit_transaction(
   Context *on_local_applied_sync,
   Context *on_all_applied,
   Context *on_all_commit,
-  tid_t tid,
+  ceph_tid_t tid,
   osd_reqid_t reqid,
   OpRequestRef client_op
   )
@@ -1343,7 +1345,7 @@ void ECBackend::start_read_op(
   map<hobject_t, read_request_t> &to_read,
   OpRequestRef _op)
 {
-  tid_t tid = get_parent()->get_tid();
+  ceph_tid_t tid = get_parent()->get_tid();
   assert(!tid_to_read_map.count(tid));
   ReadOp &op(tid_to_read_map[tid]);
   op.priority = priority;
@@ -1467,7 +1469,7 @@ void ECBackend::check_op(Op *op)
     writing.pop_front();
     tid_to_op_map.erase(op->tid);
   }
-  for (map<tid_t, Op>::iterator i = tid_to_op_map.begin();
+  for (map<ceph_tid_t, Op>::iterator i = tid_to_op_map.begin();
        i != tid_to_op_map.end();
        ++i) {
     dout(20) << __func__ << " tid " << i->first <<": " << i->second << dendl;
index 784456342ed52467a4876645bd881f19082aaac0..0aa37c154fa30cc2b66d3aec70f9759a52c1dadf 100644 (file)
@@ -55,9 +55,9 @@ public:
   friend struct SubWriteApplied;
   friend struct SubWriteCommitted;
   void sub_write_applied(
-    tid_t tid, eversion_t version);
+    ceph_tid_t tid, eversion_t version);
   void sub_write_committed(
-    tid_t tid, eversion_t version, eversion_t last_complete);
+    ceph_tid_t tid, eversion_t version, eversion_t last_complete);
   void handle_sub_write(
     pg_shard_t from,
     OpRequestRef msg,
@@ -101,7 +101,7 @@ public:
     Context *on_local_applied_sync,
     Context *on_all_applied,
     Context *on_all_commit,
-    tid_t tid,
+    ceph_tid_t tid,
     osd_reqid_t reqid,
     OpRequestRef op
     );
@@ -281,7 +281,7 @@ public:
 
   struct ReadOp {
     int priority;
-    tid_t tid;
+    ceph_tid_t tid;
     OpRequestRef op; // may be null if not on behalf of a client
 
     map<hobject_t, read_request_t> to_read;
@@ -300,8 +300,8 @@ public:
     ReadOp &op);
   void complete_read_op(ReadOp &rop, RecoveryMessages *m);
   friend ostream &operator<<(ostream &lhs, const ReadOp &rhs);
-  map<tid_t, ReadOp> tid_to_read_map;
-  map<pg_shard_t, set<tid_t> > shard_to_read_map;
+  map<ceph_tid_t, ReadOp> tid_to_read_map;
+  map<pg_shard_t, set<ceph_tid_t> > shard_to_read_map;
   void start_read_op(
     int priority,
     map<hobject_t, read_request_t> &to_read,
@@ -329,7 +329,7 @@ public:
     Context *on_local_applied_sync;
     Context *on_all_applied;
     Context *on_all_commit;
-    tid_t tid;
+    ceph_tid_t tid;
     osd_reqid_t reqid;
     OpRequestRef client_op;
 
@@ -370,7 +370,7 @@ public:
     pg_shard_t from,
     RecoveryMessages *m);
 
-  map<tid_t, Op> tid_to_op_map; /// lists below point into here
+  map<ceph_tid_t, Op> tid_to_op_map; /// lists below point into here
   list<Op*> writing;
 
   CephContext *cct;
index 2283dbba35b34214f5af4034a56941bd3bed15a7..d1ad2cba8f3d5d884d2d2ed1b245174c73fd3366 100644 (file)
@@ -21,7 +21,7 @@
 
 struct ECSubWrite {
   pg_shard_t from;
-  tid_t tid;
+  ceph_tid_t tid;
   osd_reqid_t reqid;
   hobject_t soid;
   pg_stat_t stats;
@@ -34,7 +34,7 @@ struct ECSubWrite {
   ECSubWrite() {}
   ECSubWrite(
     pg_shard_t from,
-    tid_t tid,
+    ceph_tid_t tid,
     osd_reqid_t reqid,
     hobject_t soid,
     const pg_stat_t &stats,
@@ -59,7 +59,7 @@ WRITE_CLASS_ENCODER(ECSubWrite)
 
 struct ECSubWriteReply {
   pg_shard_t from;
-  tid_t tid;
+  ceph_tid_t tid;
   eversion_t last_complete;
   bool committed;
   bool applied;
@@ -73,7 +73,7 @@ WRITE_CLASS_ENCODER(ECSubWriteReply)
 
 struct ECSubRead {
   pg_shard_t from;
-  tid_t tid;
+  ceph_tid_t tid;
   map<hobject_t, list<pair<uint64_t, uint64_t> > > to_read;
   set<hobject_t> attrs_to_read;
   void encode(bufferlist &bl) const;
@@ -85,7 +85,7 @@ WRITE_CLASS_ENCODER(ECSubRead)
 
 struct ECSubReadReply {
   pg_shard_t from;
-  tid_t tid;
+  ceph_tid_t tid;
   map<hobject_t, list<pair<uint64_t, bufferlist> > > buffers_read;
   map<hobject_t, map<string, bufferlist> > attrs_read;
   map<hobject_t, int> errors;
index 60a54a620b91a8ae6fe69553f19aff9303c856d2..e5d0449d74d7096ac718c318d5267d4b301381f2 100644 (file)
@@ -4168,7 +4168,7 @@ COMMAND("reset_pg_recovery_stats", "reset pg recovery statistics",
        "osd", "rw", "cli,rest")
 };
 
-void OSD::do_command(Connection *con, tid_t tid, vector<string>& cmd, bufferlist& data)
+void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, bufferlist& data)
 {
   int r = 0;
   stringstream ss, ds;
index 7ee3442793c7cbe51316f91c25a4e6b505a4c9f1..c753b931e6a91ecff490cdd48f72d7843a1c9d85 100644 (file)
@@ -580,10 +580,10 @@ public:
 
   // -- tids --
   // for ops i issue
-  tid_t last_tid;
+  ceph_tid_t last_tid;
   Mutex tid_lock;
-  tid_t get_tid() {
-    tid_t t;
+  ceph_tid_t get_tid() {
+    ceph_tid_t t;
     tid_lock.Lock();
     t = ++last_tid;
     tid_lock.Unlock();
@@ -1485,7 +1485,7 @@ protected:
     pg_stat_queue_lock.Unlock();
   }
 
-  tid_t get_tid() {
+  ceph_tid_t get_tid() {
     return service.get_tid();
   }
 
@@ -1530,11 +1530,11 @@ protected:
   // -- commands --
   struct Command {
     vector<string> cmd;
-    tid_t tid;
+    ceph_tid_t tid;
     bufferlist indata;
     ConnectionRef con;
 
-    Command(vector<string>& c, tid_t t, bufferlist& bl, Connection *co)
+    Command(vector<string>& c, ceph_tid_t t, bufferlist& bl, Connection *co)
       : cmd(c), tid(t), indata(bl), con(co) {}
   };
   list<Command*> command_queue;
@@ -1582,7 +1582,7 @@ protected:
 
   void handle_command(class MMonCommand *m);
   void handle_command(class MCommand *m);
-  void do_command(Connection *con, tid_t tid, vector<string>& cmd, bufferlist& data);
+  void do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, bufferlist& data);
 
   // -- pg recovery --
   xlist<PG*> recovery_queue;
index 7e07340d0fa29a483bb562b3fd58d122327c0e37..569b6fc581ea37041592ea5fc177a35b2a5f3040 100644 (file)
  */
 struct osd_reqid_t {
   entity_name_t name; // who
-  tid_t         tid;
+  ceph_tid_t         tid;
   int32_t       inc;  // incarnation
 
   osd_reqid_t()
     : tid(0), inc(0) {}
-  osd_reqid_t(const entity_name_t& a, int i, tid_t t)
+  osd_reqid_t(const entity_name_t& a, int i, ceph_tid_t t)
     : name(a), tid(t), inc(i) {}
 
   void encode(bufferlist &bl) const;
index f3dc0ad970c5c92f99a4d8fd42aab50464ede884..88ce4345797b52a904cb162f2e625a1a9c358809 100644 (file)
 
      virtual PerfCounters *get_logger() = 0;
 
-     virtual tid_t get_tid() = 0;
+     virtual ceph_tid_t get_tid() = 0;
 
      virtual LogClientTemp clog_error() = 0;
 
      const eversion_t &trim_to,           ///< [in] trim log to here
      vector<pg_log_entry_t> &log_entries, ///< [in] log entries for t
      Context *on_local_applied_sync,      ///< [in] called when applied locally
-     Context *on_all_applied,               ///< [in] called when all acked
+     Context *on_all_applied,             ///< [in] called when all acked
      Context *on_all_commit,              ///< [in] called when all commit
-     tid_t tid,                           ///< [in] tid
+     ceph_tid_t tid,                      ///< [in] tid
      osd_reqid_t reqid,                   ///< [in] reqid
      OpRequestRef op                      ///< [in] op
      ) = 0;
index 5a9e8144328efda7b215d2f0b69530fbf3300588..8856461a8bc9265f8af3a555e7a9206f16c343d7 100644 (file)
@@ -194,7 +194,7 @@ void ReplicatedBackend::clear_state()
 
 void ReplicatedBackend::_on_change(ObjectStore::Transaction *t)
 {
-  for (map<tid_t, InProgressOp>::iterator i = in_progress_ops.begin();
+  for (map<ceph_tid_t, InProgressOp>::iterator i = in_progress_ops.begin();
        i != in_progress_ops.end();
        in_progress_ops.erase(i++)) {
     if (i->second.on_commit)
@@ -497,7 +497,7 @@ void ReplicatedBackend::submit_transaction(
   Context *on_local_applied_sync,
   Context *on_all_acked,
   Context *on_all_commit,
-  tid_t tid,
+  ceph_tid_t tid,
   osd_reqid_t reqid,
   OpRequestRef orig_op)
 {
@@ -611,11 +611,11 @@ void ReplicatedBackend::sub_op_modify_reply(OpRequestRef op)
   op->mark_started();
 
   // must be replication.
-  tid_t rep_tid = r->get_tid();
+  ceph_tid_t rep_tid = r->get_tid();
   pg_shard_t from = r->from;
 
   if (in_progress_ops.count(rep_tid)) {
-    map<tid_t, InProgressOp>::iterator iter =
+    map<ceph_tid_t, InProgressOp>::iterator iter =
       in_progress_ops.find(rep_tid);
     InProgressOp &ip_op = iter->second;
     MOSDOp *m = NULL;
index 64e91a69d28387f5e9408c3d0a78d5e4485e6f75..cfad2edae6a41f8577b2dd71f4835f2e25ec6365 100644 (file)
@@ -315,7 +315,7 @@ private:
    * Client IO
    */
   struct InProgressOp {
-    tid_t tid;
+    ceph_tid_t tid;
     set<pg_shard_t> waiting_for_commit;
     set<pg_shard_t> waiting_for_applied;
     Context *on_commit;
@@ -323,7 +323,7 @@ private:
     OpRequestRef op;
     eversion_t v;
     InProgressOp(
-      tid_t tid, Context *on_commit, Context *on_applied,
+      ceph_tid_t tid, Context *on_commit, Context *on_applied,
       OpRequestRef op, eversion_t v)
       : tid(tid), on_commit(on_commit), on_applied(on_applied),
        op(op), v(v) {}
@@ -332,7 +332,7 @@ private:
        waiting_for_applied.empty();
     }
   };
-  map<tid_t, InProgressOp> in_progress_ops;
+  map<ceph_tid_t, InProgressOp> in_progress_ops;
 public:
   PGTransaction *get_transaction();
   friend class C_OSD_OnOpCommit;
@@ -346,7 +346,7 @@ public:
     Context *on_local_applied_sync,
     Context *on_all_applied,
     Context *on_all_commit,
-    tid_t tid,
+    ceph_tid_t tid,
     osd_reqid_t reqid,
     OpRequestRef op
     );
@@ -355,7 +355,7 @@ private:
   void issue_op(
     const hobject_t &soid,
     const eversion_t &at_version,
-    tid_t tid,
+    ceph_tid_t tid,
     osd_reqid_t reqid,
     eversion_t pg_trim_to,
     hobject_t new_temp_oid,
index b957b3504947d9c27d0ddfe009fdf1d839aae751..6d962a54e94ee44a59de7da6158261fdb70dd01d 100644 (file)
@@ -1776,10 +1776,10 @@ void ReplicatedPG::execute_ctx(OpContext *ctx)
 
   // verify that we are doing this in order?
   if (cct->_conf->osd_debug_op_order && m->get_source().is_client()) {
-    map<client_t,tid_t>& cm = debug_op_order[obc->obs.oi.soid];
-    tid_t t = m->get_tid();
+    map<client_t,ceph_tid_t>& cm = debug_op_order[obc->obs.oi.soid];
+    ceph_tid_t t = m->get_tid();
     client_t n = m->get_source().num();
-    map<client_t,tid_t>::iterator p = cm.find(n);
+    map<client_t,ceph_tid_t>::iterator p = cm.find(n);
     if (p == cm.end()) {
       dout(20) << " op order client." << n << " tid " << t << " (first)" << dendl;
       cm[n] = t;
@@ -1794,7 +1794,7 @@ void ReplicatedPG::execute_ctx(OpContext *ctx)
   }
 
   // issue replica writes
-  tid_t rep_tid = osd->get_tid();
+  ceph_tid_t rep_tid = osd->get_tid();
   RepGather *repop = new_repop(ctx, obc, rep_tid);  // new repop claims our obc, src_obc refs
   // note: repop now owns ctx AND ctx->op
 
@@ -5185,7 +5185,7 @@ struct C_Copyfrom : public Context {
   ReplicatedPGRef pg;
   hobject_t oid;
   epoch_t last_peering_reset;
-  tid_t tid;
+  ceph_tid_t tid;
   C_Copyfrom(ReplicatedPG *p, hobject_t o, epoch_t lpr)
     : pg(p), oid(o), last_peering_reset(lpr),
       tid(0)
@@ -5403,7 +5403,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
     ObjectOperation op;
     op.list_snaps(&cop->results.snapset, NULL);
     osd->objecter_lock.Lock();
-    tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op,
+    ceph_tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op,
                                    CEPH_SNAPDIR, NULL,
                                    flags, gather.new_sub(), NULL);
     cop->objecter_tid2 = tid;
@@ -5431,7 +5431,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
                                       &osd->objecter_finisher));
 
   osd->objecter_lock.Lock();
-  tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op,
+  ceph_tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op,
                                  cop->src.snap, NULL,
                                  flags,
                                  gather.new_sub(),
@@ -5443,7 +5443,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
   osd->objecter_lock.Unlock();
 }
 
-void ReplicatedPG::process_copy_chunk(hobject_t oid, tid_t tid, int r)
+void ReplicatedPG::process_copy_chunk(hobject_t oid, ceph_tid_t tid, int r)
 {
   dout(10) << __func__ << " " << oid << " tid " << tid
           << " " << cpp_strerror(r) << dendl;
@@ -5855,7 +5855,7 @@ struct C_Flush : public Context {
   ReplicatedPGRef pg;
   hobject_t oid;
   epoch_t last_peering_reset;
-  tid_t tid;
+  ceph_tid_t tid;
   C_Flush(ReplicatedPG *p, hobject_t o, epoch_t lpr)
     : pg(p), oid(o), last_peering_reset(lpr),
       tid(0)
@@ -5982,7 +5982,7 @@ int ReplicatedPG::start_flush(OpContext *ctx, bool blocking)
   }
 
   osd->objecter_lock.Lock();
-  tid_t tid = osd->objecter->mutate(soid.oid, base_oloc, o, snapc, oi.mtime,
+  ceph_tid_t tid = osd->objecter->mutate(soid.oid, base_oloc, o, snapc, oi.mtime,
                                    CEPH_OSD_FLAG_IGNORE_OVERLAY,
                                    NULL,
                                    new C_OnFinisher(fin,
@@ -5995,7 +5995,7 @@ int ReplicatedPG::start_flush(OpContext *ctx, bool blocking)
   return -EINPROGRESS;
 }
 
-void ReplicatedPG::finish_flush(hobject_t oid, tid_t tid, int r)
+void ReplicatedPG::finish_flush(hobject_t oid, ceph_tid_t tid, int r)
 {
   dout(10) << __func__ << " " << oid << " tid " << tid
           << " " << cpp_strerror(r) << dendl;
@@ -6091,7 +6091,7 @@ int ReplicatedPG::try_flush_mark_clean(FlushOpRef fop)
   }
 
   dout(10) << __func__ << " clearing DIRTY flag for " << oid << dendl;
-  tid_t rep_tid = osd->get_tid();
+  ceph_tid_t rep_tid = osd->get_tid();
   RepGather *repop = new_repop(fop->ctx, obc, rep_tid);
   OpContext *ctx = fop->ctx;
   if (!fop->blocking) {
@@ -6452,7 +6452,7 @@ void ReplicatedPG::issue_repop(RepGather *repop, utime_t now)
 void ReplicatedBackend::issue_op(
   const hobject_t &soid,
   const eversion_t &at_version,
-  tid_t tid,
+  ceph_tid_t tid,
   osd_reqid_t reqid,
   eversion_t pg_trim_to,
   hobject_t new_temp_oid,
@@ -6519,7 +6519,7 @@ void ReplicatedBackend::issue_op(
 }
 
 ReplicatedPG::RepGather *ReplicatedPG::new_repop(OpContext *ctx, ObjectContextRef obc,
-                                                tid_t rep_tid)
+                                                ceph_tid_t rep_tid)
 {
   if (ctx->op)
     dout(10) << "new_repop rep_tid " << rep_tid << " on " << *ctx->op->get_req() << dendl;
@@ -6554,7 +6554,7 @@ ReplicatedPG::RepGather *ReplicatedPG::simple_repop_create(ObjectContextRef obc)
 {
   dout(20) << __func__ << " " << obc->obs.oi.soid << dendl;
   vector<OSDOp> ops;
-  tid_t rep_tid = osd->get_tid();
+  ceph_tid_t rep_tid = osd->get_tid();
   osd_reqid_t reqid(osd->get_cluster_msgr_name(), 0, rep_tid);
   OpContext *ctx = new OpContext(OpRequestRef(), reqid, ops,
                                 &obc->obs, obc->ssc, this);
@@ -6698,7 +6698,7 @@ void ReplicatedPG::handle_watch_timeout(WatchRef watch)
   watch->remove();
 
   vector<OSDOp> ops;
-  tid_t rep_tid = osd->get_tid();
+  ceph_tid_t rep_tid = osd->get_tid();
   osd_reqid_t reqid(osd->get_cluster_msgr_name(), 0, rep_tid);
   OpContext *ctx = new OpContext(OpRequestRef(), reqid, ops,
                                 &obc->obs, obc->ssc, this);
@@ -7609,7 +7609,7 @@ int ReplicatedPG::recover_missing(
 void ReplicatedPG::send_remove_op(
   const hobject_t& oid, eversion_t v, pg_shard_t peer)
 {
-  tid_t tid = osd->get_tid();
+  ceph_tid_t tid = osd->get_tid();
   osd_reqid_t rid(osd->get_cluster_msgr_name(), 0, tid);
 
   dout(10) << "send_remove_op " << oid << " from osd." << peer
@@ -7742,7 +7742,7 @@ int ReplicatedBackend::send_pull_legacy(int prio, pg_shard_t peer,
                                        ObjectRecoveryProgress progress)
 {
   // send op
-  tid_t tid = get_parent()->get_tid();
+  ceph_tid_t tid = get_parent()->get_tid();
   osd_reqid_t rid(get_parent()->get_cluster_msgr_name(), 0, tid);
 
   dout(10) << "send_pull_op " << recovery_info.soid << " "
@@ -8194,7 +8194,7 @@ int ReplicatedBackend::build_push_op(const ObjectRecoveryInfo &recovery_info,
 
 int ReplicatedBackend::send_push_op_legacy(int prio, pg_shard_t peer, PushOp &pop)
 {
-  tid_t tid = get_parent()->get_tid();
+  ceph_tid_t tid = get_parent()->get_tid();
   osd_reqid_t rid(get_parent()->get_cluster_msgr_name(), 0, tid);
   MOSDSubOp *subop = new MOSDSubOp(
     rid, parent->whoami_shard(),
@@ -10750,7 +10750,7 @@ bool ReplicatedPG::agent_maybe_flush(ObjectContextRef& obc)
   // ages we expect.
 
   vector<OSDOp> ops;
-  tid_t rep_tid = osd->get_tid();
+  ceph_tid_t rep_tid = osd->get_tid();
   osd_reqid_t reqid(osd->get_cluster_msgr_name(), 0, rep_tid);
   OpContext *ctx = new OpContext(OpRequestRef(), reqid, ops,
                                 &obc->obs, obc->ssc, this);
index 52a77174c0febf50d558623bb48e1eb69add89f3..925d581054ee65253011da5f8baa9d458595960c 100644 (file)
@@ -138,8 +138,8 @@ public:
 
     CopyResults results;
 
-    tid_t objecter_tid;
-    tid_t objecter_tid2;
+    ceph_tid_t objecter_tid;
+    ceph_tid_t objecter_tid2;
 
     object_copy_cursor_t cursor;
     map<string,bufferlist> attrs;
@@ -199,7 +199,7 @@ public:
     OpContext *ctx;             ///< the parent OpContext
     list<OpRequestRef> dup_ops; ///< dup flush requests
     version_t flushed_version;  ///< user version we are flushing
-    tid_t objecter_tid;         ///< copy-from request tid
+    ceph_tid_t objecter_tid;    ///< copy-from request tid
     int rval;                   ///< copy-from result
     bool blocking;              ///< whether we are blocking updates
     bool removal;               ///< we are removing the backend object
@@ -400,7 +400,7 @@ public:
 
   PerfCounters *get_logger();
 
-  tid_t get_tid() { return osd->get_tid(); }
+  ceph_tid_t get_tid() { return osd->get_tid(); }
 
   LogClientTemp clog_error() { return osd->clog.error(); }
 
@@ -585,7 +585,7 @@ public:
     ObjectContextRef obc;
     map<hobject_t,ObjectContextRef> src_obc;
 
-    tid_t rep_tid;
+    ceph_tid_t rep_tid;
 
     bool rep_aborted, rep_done;
 
@@ -603,7 +603,7 @@ public:
 
     Context *on_applied;
     
-    RepGather(OpContext *c, ObjectContextRef pi, tid_t rt, 
+    RepGather(OpContext *c, ObjectContextRef pi, ceph_tid_t rt,
              eversion_t lc) :
       queue_item(this),
       nref(1),
@@ -710,7 +710,7 @@ protected:
   // replica ops
   // [primary|tail]
   xlist<RepGather*> repop_queue;
-  map<tid_t, RepGather*> repop_map;
+  map<ceph_tid_t, RepGather*> repop_map;
 
   friend class C_OSD_RepopApplied;
   friend class C_OSD_RepopCommit;
@@ -718,7 +718,7 @@ protected:
   void repop_all_committed(RepGather *repop);
   void eval_repop(RepGather*);
   void issue_repop(RepGather *repop, utime_t now);
-  RepGather *new_repop(OpContext *ctx, ObjectContextRef obc, tid_t rep_tid);
+  RepGather *new_repop(OpContext *ctx, ObjectContextRef obc, ceph_tid_t rep_tid);
   void remove_repop(RepGather *repop);
 
   RepGather *simple_repop_create(ObjectContextRef obc);
@@ -809,7 +809,7 @@ protected:
   Mutex snapset_contexts_lock;
 
   // debug order that client ops are applied
-  map<hobject_t, map<client_t, tid_t> > debug_op_order;
+  map<hobject_t, map<client_t, ceph_tid_t> > debug_op_order;
 
   void populate_obc_watchers(ObjectContextRef obc);
   void check_blacklisted_obc_watchers(ObjectContextRef obc);
@@ -1136,7 +1136,7 @@ protected:
   void start_copy(CopyCallback *cb, ObjectContextRef obc, hobject_t src,
                  object_locator_t oloc, version_t version, unsigned flags,
                  bool mirror_snapset);
-  void process_copy_chunk(hobject_t oid, tid_t tid, int r);
+  void process_copy_chunk(hobject_t oid, ceph_tid_t tid, int r);
   void _write_copy_chunk(CopyOpRef cop, PGBackend::PGTransaction *t);
   uint64_t get_copy_chunk_size() const {
     uint64_t size = cct->_conf->osd_copyfrom_max_chunk;
@@ -1163,7 +1163,7 @@ protected:
   map<hobject_t, FlushOpRef> flush_ops;
 
   int start_flush(OpContext *ctx, bool blocking);
-  void finish_flush(hobject_t oid, tid_t tid, int r);
+  void finish_flush(hobject_t oid, ceph_tid_t tid, int r);
   int try_flush_mark_clean(FlushOpRef fop);
   void cancel_flush(FlushOpRef fop, bool requeue);
   void cancel_flush_ops(bool requeue);
index 29dcaaaba5fd0b8a3ec47b0b7834998455f28e92..eaa7c52e2c2d786838737b9b2e80e2a8be960f25 100644 (file)
@@ -625,7 +625,7 @@ void ObjectCacher::bh_read(BufferHead *bh)
   ++reads_outstanding;
 }
 
-void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, tid_t tid,
+void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, ceph_tid_t tid,
                                  loff_t start, uint64_t length,
                                  bufferlist &bl, int r,
                                  bool trust_enoent)
@@ -810,7 +810,7 @@ void ObjectCacher::bh_write(BufferHead *bh)
   C_WriteCommit *oncommit = new C_WriteCommit(this, bh->ob->oloc.pool,
                                               bh->ob->get_soid(), bh->start(), bh->length());
   // go
-  tid_t tid = writeback_handler.write(bh->ob->get_oid(), bh->ob->get_oloc(),
+  ceph_tid_t tid = writeback_handler.write(bh->ob->get_oid(), bh->ob->get_oloc(),
                                      bh->start(), bh->length(),
                                      bh->snapc, bh->bl, bh->last_write,
                                      bh->ob->truncate_size, bh->ob->truncate_seq,
@@ -830,7 +830,7 @@ void ObjectCacher::bh_write(BufferHead *bh)
 }
 
 void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid, loff_t start,
-                                  uint64_t length, tid_t tid, int r)
+                                  uint64_t length, ceph_tid_t tid, int r)
 {
   assert(lock.is_locked());
   ldout(cct, 7) << "bh_write_commit " 
index 54f028fdd74308adcaa7cdefab95bfcee453fcda..01d18cececc8f7affe6779b31f8b2c82a67e72d5 100644 (file)
@@ -103,8 +103,8 @@ class ObjectCacher {
   public:
     Object *ob;
     bufferlist  bl;
-    tid_t last_write_tid;  // version of bh (if non-zero)
-    tid_t last_read_tid;   // tid of last read op (if any)
+    ceph_tid_t last_write_tid;  // version of bh (if non-zero)
+    ceph_tid_t last_read_tid;   // tid of last read op (if any)
     utime_t last_write;
     SnapContext snapc;
     int error; // holds return value for failed reads
@@ -181,12 +181,12 @@ class ObjectCacher {
   public:
     map<loff_t, BufferHead*>     data;
 
-    tid_t last_write_tid;  // version of bh (if non-zero)
-    tid_t last_commit_tid; // last update commited.
+    ceph_tid_t last_write_tid;  // version of bh (if non-zero)
+    ceph_tid_t last_commit_tid; // last update commited.
 
     int dirty_or_tx;
 
-    map< tid_t, list<Context*> > waitfor_commit;
+    map< ceph_tid_t, list<Context*> > waitfor_commit;
     xlist<C_ReadFinish*> reads;
 
   public:
@@ -341,7 +341,7 @@ class ObjectCacher {
 
   vector<ceph::unordered_map<sobject_t, Object*> > objects; // indexed by pool_id
 
-  tid_t last_read_tid;
+  ceph_tid_t last_read_tid;
 
   set<BufferHead*>    dirty_bh;
   LRU   bh_lru_dirty, bh_lru_rest;
@@ -459,12 +459,12 @@ class ObjectCacher {
             bool external_call);
 
  public:
-  void bh_read_finish(int64_t poolid, sobject_t oid, tid_t tid,
+  void bh_read_finish(int64_t poolid, sobject_t oid, ceph_tid_t tid,
                      loff_t offset, uint64_t length,
                      bufferlist &bl, int r,
                      bool trust_enoent);
   void bh_write_commit(int64_t poolid, sobject_t oid, loff_t offset,
-                      uint64_t length, tid_t t, int r);
+                      uint64_t length, ceph_tid_t t, int r);
 
   class C_ReadFinish : public Context {
     ObjectCacher *oc;
@@ -474,11 +474,11 @@ class ObjectCacher {
     uint64_t length;
     xlist<C_ReadFinish*>::item set_item;
     bool trust_enoent;
-    tid_t tid;
+    ceph_tid_t tid;
 
   public:
     bufferlist bl;
-    C_ReadFinish(ObjectCacher *c, Object *ob, tid_t t, loff_t s, uint64_t l) :
+    C_ReadFinish(ObjectCacher *c, Object *ob, ceph_tid_t t, loff_t s, uint64_t l) :
       oc(c), poolid(ob->oloc.pool), oid(ob->get_soid()), start(s), length(l),
       set_item(this), trust_enoent(true),
       tid(t) {
@@ -505,7 +505,7 @@ class ObjectCacher {
     loff_t start;
     uint64_t length;
   public:
-    tid_t tid;
+    ceph_tid_t tid;
     C_WriteCommit(ObjectCacher *c, int64_t _poolid, sobject_t o, loff_t s, uint64_t l) :
       oc(c), poolid(_poolid), oid(o), start(s), length(l), tid(0) {}
     void finish(int r) {
index a2954662605cfb5a0f2b723d4aae3c0ae3ee09c5..6018f1102ad5f3e0b4599cc90d84b33b815e7fab 100644 (file)
@@ -383,7 +383,7 @@ void Objecter::unregister_linger(uint64_t linger_id)
   }
 }
 
-tid_t Objecter::linger_mutate(const object_t& oid, const object_locator_t& oloc,
+ceph_tid_t Objecter::linger_mutate(const object_t& oid, const object_locator_t& oloc,
                              ObjectOperation& op,
                              const SnapContext& snapc, utime_t mtime,
                              bufferlist& inbl, int flags,
@@ -415,7 +415,7 @@ tid_t Objecter::linger_mutate(const object_t& oid, const object_locator_t& oloc,
   return info->linger_id;
 }
 
-tid_t Objecter::linger_read(const object_t& oid, const object_locator_t& oloc,
+ceph_tid_t Objecter::linger_read(const object_t& oid, const object_locator_t& oloc,
                            ObjectOperation& op,
                            snapid_t snap, bufferlist& inbl, bufferlist *poutbl, int flags,
                            Context *onfinish,
@@ -479,12 +479,12 @@ void Objecter::dispatch(Message *m)
 
 void Objecter::scan_requests(bool force_resend,
                             bool force_resend_writes,
-                            map<tid_t, Op*>& need_resend,
+                            map<ceph_tid_t, Op*>& need_resend,
                             list<LingerOp*>& need_resend_linger,
-                            map<tid_t, CommandOp*>& need_resend_command)
+                            map<ceph_tid_t, CommandOp*>& need_resend_command)
 {
   // check for changed linger mappings (_before_ regular ops)
-  map<tid_t,LingerOp*>::iterator lp = linger_ops.begin();
+  map<ceph_tid_t,LingerOp*>::iterator lp = linger_ops.begin();
   while (lp != linger_ops.end()) {
     LingerOp *op = lp->second;
     ++lp;   // check_linger_pool_dne() may touch linger_ops; prevent iterator invalidation
@@ -506,7 +506,7 @@ void Objecter::scan_requests(bool force_resend,
   }
 
   // check for changed request mappings
-  map<tid_t,Op*>::iterator p = ops.begin();
+  map<ceph_tid_t,Op*>::iterator p = ops.begin();
   while (p != ops.end()) {
     Op *op = p->second;
     ++p;   // check_op_pool_dne() may touch ops; prevent iterator invalidation
@@ -529,7 +529,7 @@ void Objecter::scan_requests(bool force_resend,
   }
 
   // commands
-  map<tid_t,CommandOp*>::iterator cp = command_ops.begin();
+  map<ceph_tid_t,CommandOp*>::iterator cp = command_ops.begin();
   while (cp != command_ops.end()) {
     CommandOp *c = cp->second;
     ++cp;
@@ -571,8 +571,8 @@ void Objecter::handle_osd_map(MOSDMap *m)
   bool was_pausewr = osdmap->test_flag(CEPH_OSDMAP_PAUSEWR) || was_full;
 
   list<LingerOp*> need_resend_linger;
-  map<tid_t, Op*> need_resend;
-  map<tid_t, CommandOp*> need_resend_command;
+  map<ceph_tid_t, Op*> need_resend;
+  map<ceph_tid_t, CommandOp*> need_resend_command;
 
   if (m->get_last() <= osdmap->get_epoch()) {
     ldout(cct, 3) << "handle_osd_map ignoring epochs [" 
@@ -662,7 +662,7 @@ void Objecter::handle_osd_map(MOSDMap *m)
     maybe_request_map();
 
   // resend requests
-  for (map<tid_t, Op*>::iterator p = need_resend.begin(); p != need_resend.end(); ++p) {
+  for (map<ceph_tid_t, Op*>::iterator p = need_resend.begin(); p != need_resend.end(); ++p) {
     Op *op = p->second;
     if (op->should_resend) {
       if (op->session && !op->paused) {
@@ -680,7 +680,7 @@ void Objecter::handle_osd_map(MOSDMap *m)
       send_linger(op);
     }
   }
-  for (map<tid_t,CommandOp*>::iterator p = need_resend_command.begin(); p != need_resend_command.end(); ++p) {
+  for (map<ceph_tid_t,CommandOp*>::iterator p = need_resend_command.begin(); p != need_resend_command.end(); ++p) {
     CommandOp *c = p->second;
     if (c->session) {
       _send_command(c);
@@ -722,7 +722,7 @@ void Objecter::C_Op_Map_Latest::finish(int r)
 
   Mutex::Locker l(objecter->client_lock);
 
-  map<tid_t, Op*>::iterator iter =
+  map<ceph_tid_t, Op*>::iterator iter =
     objecter->check_latest_map_ops.find(tid);
   if (iter == objecter->check_latest_map_ops.end()) {
     lgeneric_subdout(objecter->cct, objecter, 10) << "op_map_latest op " << tid << " not found" << dendl;
@@ -781,7 +781,7 @@ void Objecter::_send_op_map_check(Op *op)
 void Objecter::op_cancel_map_check(Op *op)
 {
   assert(client_lock.is_locked());
-  map<tid_t, Op*>::iterator iter =
+  map<ceph_tid_t, Op*>::iterator iter =
     check_latest_map_ops.find(op->tid);
   if (iter != check_latest_map_ops.end()) {
     check_latest_map_ops.erase(iter);
@@ -1043,7 +1043,7 @@ void Objecter::kick_requests(OSDSession *session)
   ldout(cct, 10) << "kick_requests for osd." << session->osd << dendl;
 
   // resend ops
-  map<tid_t,Op*> resend;  // resend in tid order
+  map<ceph_tid_t,Op*> resend;  // resend in tid order
   for (xlist<Op*>::iterator p = session->ops.begin(); !p.end();) {
     Op *op = *p;
     ++p;
@@ -1107,7 +1107,7 @@ void Objecter::tick()
   cutoff -= cct->_conf->objecter_timeout;  // timeout
 
   unsigned laggy_ops = 0;
-  for (map<tid_t,Op*>::iterator p = ops.begin();
+  for (map<ceph_tid_t,Op*>::iterator p = ops.begin();
        p != ops.end();
        ++p) {
     Op *op = p->second;
@@ -1164,22 +1164,22 @@ void Objecter::resend_mon_ops()
   assert(client_lock.is_locked());
   ldout(cct, 10) << "resend_mon_ops" << dendl;
 
-  for (map<tid_t,PoolStatOp*>::iterator p = poolstat_ops.begin(); p!=poolstat_ops.end(); ++p) {
+  for (map<ceph_tid_t,PoolStatOp*>::iterator p = poolstat_ops.begin(); p!=poolstat_ops.end(); ++p) {
     poolstat_submit(p->second);
     logger->inc(l_osdc_poolstat_resend);
   }
 
-  for (map<tid_t,StatfsOp*>::iterator p = statfs_ops.begin(); p!=statfs_ops.end(); ++p) {
+  for (map<ceph_tid_t,StatfsOp*>::iterator p = statfs_ops.begin(); p!=statfs_ops.end(); ++p) {
     fs_stats_submit(p->second);
     logger->inc(l_osdc_statfs_resend);
   }
 
-  for (map<tid_t,PoolOp*>::iterator p = pool_ops.begin(); p!=pool_ops.end(); ++p) {
+  for (map<ceph_tid_t,PoolOp*>::iterator p = pool_ops.begin(); p!=pool_ops.end(); ++p) {
     _pool_op_submit(p->second);
     logger->inc(l_osdc_poolop_resend);
   }
 
-  for (map<tid_t, Op*>::iterator p = check_latest_map_ops.begin();
+  for (map<ceph_tid_t, Op*>::iterator p = check_latest_map_ops.begin();
        p != check_latest_map_ops.end();
        ++p) {
     C_Op_Map_Latest *c = new C_Op_Map_Latest(this, p->second->tid);
@@ -1218,7 +1218,7 @@ public:
   }
 };
 
-tid_t Objecter::op_submit(Op *op)
+ceph_tid_t Objecter::op_submit(Op *op)
 {
   assert(client_lock.is_locked());
   assert(initialized);
@@ -1239,10 +1239,10 @@ tid_t Objecter::op_submit(Op *op)
   return _op_submit(op);
 }
 
-tid_t Objecter::_op_submit(Op *op)
+ceph_tid_t Objecter::_op_submit(Op *op)
 {
   // pick tid
-  tid_t mytid = ++last_tid;
+  ceph_tid_t mytid = ++last_tid;
   op->tid = mytid;
   assert(client_inc >= 0);
 
@@ -1348,12 +1348,12 @@ tid_t Objecter::_op_submit(Op *op)
   return op->tid;
 }
 
-int Objecter::op_cancel(tid_t tid, int r)
+int Objecter::op_cancel(ceph_tid_t tid, int r)
 {
   assert(client_lock.is_locked());
   assert(initialized);
 
-  map<tid_t, Op*>::iterator p = ops.find(tid);
+  map<ceph_tid_t, Op*>::iterator p = ops.find(tid);
   if (p == ops.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
@@ -1707,7 +1707,7 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
   ldout(cct, 10) << "in handle_osd_op_reply" << dendl;
 
   // get pio
-  tid_t tid = m->get_tid();
+  ceph_tid_t tid = m->get_tid();
 
   if (ops.count(tid) == 0) {
     ldout(cct, 7) << "handle_osd_op_reply " << tid
@@ -2144,11 +2144,11 @@ int Objecter::change_pool_auid(int64_t pool, Context *onfinish, uint64_t auid)
 
 class C_CancelPoolOp : public Context
 {
-  tid_t tid;
+  ceph_tid_t tid;
   Objecter *objecter;
 public:
-  C_CancelPoolOp(tid_t tid, Objecter *objecter) : tid(tid),
-                                                 objecter(objecter) {}
+  C_CancelPoolOp(ceph_tid_t tid, Objecter *objecter) : tid(tid),
+                                                      objecter(objecter) {}
   void finish(int r) {
     // note that objecter lock == timer lock, and is already held
     objecter->pool_op_cancel(tid, -ETIMEDOUT);
@@ -2190,7 +2190,7 @@ void Objecter::handle_pool_op_reply(MPoolOpReply *m)
   assert(client_lock.is_locked());
   assert(initialized);
   ldout(cct, 10) << "handle_pool_op_reply " << *m << dendl;
-  tid_t tid = m->get_tid();
+  ceph_tid_t tid = m->get_tid();
   if (pool_ops.count(tid)) {
     PoolOp *op = pool_ops[tid];
     ldout(cct, 10) << "have request " << tid << " at " << op << " Op: " << ceph_pool_op_name(op->pool_op) << dendl;
@@ -2214,12 +2214,12 @@ void Objecter::handle_pool_op_reply(MPoolOpReply *m)
   m->put();
 }
 
-int Objecter::pool_op_cancel(tid_t tid, int r)
+int Objecter::pool_op_cancel(ceph_tid_t tid, int r)
 {
   assert(client_lock.is_locked());
   assert(initialized);
 
-  map<tid_t, PoolOp*>::iterator it = pool_ops.find(tid);
+  map<ceph_tid_t, PoolOp*>::iterator it = pool_ops.find(tid);
   if (it == pool_ops.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
@@ -2249,11 +2249,11 @@ void Objecter::finish_pool_op(PoolOp *op)
 
 class C_CancelPoolStatOp : public Context
 {
-  tid_t tid;
+  ceph_tid_t tid;
   Objecter *objecter;
 public:
-  C_CancelPoolStatOp(tid_t tid, Objecter *objecter) : tid(tid),
-                                                     objecter(objecter) {}
+  C_CancelPoolStatOp(ceph_tid_t tid, Objecter *objecter) : tid(tid),
+                                                          objecter(objecter) {}
   void finish(int r) {
     // note that objecter lock == timer lock, and is already held
     objecter->pool_stat_op_cancel(tid, -ETIMEDOUT);
@@ -2296,7 +2296,7 @@ void Objecter::handle_get_pool_stats_reply(MGetPoolStatsReply *m)
   assert(client_lock.is_locked());
   assert(initialized);
   ldout(cct, 10) << "handle_get_pool_stats_reply " << *m << dendl;
-  tid_t tid = m->get_tid();
+  ceph_tid_t tid = m->get_tid();
 
   if (poolstat_ops.count(tid)) {
     PoolStatOp *op = poolstat_ops[tid];
@@ -2313,12 +2313,12 @@ void Objecter::handle_get_pool_stats_reply(MGetPoolStatsReply *m)
   m->put();
 }
 
-int Objecter::pool_stat_op_cancel(tid_t tid, int r)
+int Objecter::pool_stat_op_cancel(ceph_tid_t tid, int r)
 {
   assert(client_lock.is_locked());
   assert(initialized);
 
-  map<tid_t, PoolStatOp*>::iterator it = poolstat_ops.find(tid);
+  map<ceph_tid_t, PoolStatOp*>::iterator it = poolstat_ops.find(tid);
   if (it == poolstat_ops.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
@@ -2346,11 +2346,11 @@ void Objecter::finish_pool_stat_op(PoolStatOp *op)
 
 class C_CancelStatfsOp : public Context
 {
-  tid_t tid;
+  ceph_tid_t tid;
   Objecter *objecter;
 public:
-  C_CancelStatfsOp(tid_t tid, Objecter *objecter) : tid(tid),
-                                                   objecter(objecter) {}
+  C_CancelStatfsOp(ceph_tid_t tid, Objecter *objecter) : tid(tid),
+                                                        objecter(objecter) {}
   void finish(int r) {
     // note that objecter lock == timer lock, and is already held
     objecter->statfs_op_cancel(tid, -ETIMEDOUT);
@@ -2391,7 +2391,7 @@ void Objecter::handle_fs_stats_reply(MStatfsReply *m)
   assert(client_lock.is_locked());
   assert(initialized);
   ldout(cct, 10) << "handle_fs_stats_reply " << *m << dendl;
-  tid_t tid = m->get_tid();
+  ceph_tid_t tid = m->get_tid();
 
   if (statfs_ops.count(tid)) {
     StatfsOp *op = statfs_ops[tid];
@@ -2408,12 +2408,12 @@ void Objecter::handle_fs_stats_reply(MStatfsReply *m)
   m->put();
 }
 
-int Objecter::statfs_op_cancel(tid_t tid, int r)
+int Objecter::statfs_op_cancel(ceph_tid_t tid, int r)
 {
   assert(client_lock.is_locked());
   assert(initialized);
 
-  map<tid_t, StatfsOp*>::iterator it = statfs_ops.find(tid);
+  map<ceph_tid_t, StatfsOp*>::iterator it = statfs_ops.find(tid);
   if (it == statfs_ops.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
@@ -2511,7 +2511,7 @@ void Objecter::ms_handle_remote_reset(Connection *con)
 void Objecter::dump_active()
 {
   ldout(cct, 20) << "dump_active .. " << num_homeless_ops << " homeless" << dendl;
-  for (map<tid_t,Op*>::iterator p = ops.begin(); p != ops.end(); ++p) {
+  for (map<ceph_tid_t,Op*>::iterator p = ops.begin(); p != ops.end(); ++p) {
     Op *op = p->second;
     ldout(cct, 20) << op->tid << "\t" << op->pgid << "\tosd." << (op->session ? op->session->osd : -1)
            << "\t" << op->base_oid << "\t" << op->ops << dendl;
@@ -2535,7 +2535,7 @@ void Objecter::dump_requests(Formatter *fmt) const
 void Objecter::dump_ops(Formatter *fmt) const
 {
   fmt->open_array_section("ops");
-  for (map<tid_t,Op*>::const_iterator p = ops.begin();
+  for (map<ceph_tid_t,Op*>::const_iterator p = ops.begin();
        p != ops.end();
        ++p) {
     Op *op = p->second;
@@ -2611,7 +2611,7 @@ void Objecter::dump_command_ops(Formatter *fmt) const
 void Objecter::dump_pool_ops(Formatter *fmt) const
 {
   fmt->open_array_section("pool_ops");
-  for (map<tid_t, PoolOp*>::const_iterator p = pool_ops.begin();
+  for (map<ceph_tid_t, PoolOp*>::const_iterator p = pool_ops.begin();
        p != pool_ops.end();
        ++p) {
     PoolOp *op = p->second;
@@ -2632,7 +2632,7 @@ void Objecter::dump_pool_ops(Formatter *fmt) const
 void Objecter::dump_pool_stat_ops(Formatter *fmt) const
 {
   fmt->open_array_section("pool_stat_ops");
-  for (map<tid_t, PoolStatOp*>::const_iterator p = poolstat_ops.begin();
+  for (map<ceph_tid_t, PoolStatOp*>::const_iterator p = poolstat_ops.begin();
        p != poolstat_ops.end();
        ++p) {
     PoolStatOp *op = p->second;
@@ -2656,7 +2656,7 @@ void Objecter::dump_pool_stat_ops(Formatter *fmt) const
 void Objecter::dump_statfs_ops(Formatter *fmt) const
 {
   fmt->open_array_section("statfs_ops");
-  for (map<tid_t, StatfsOp*>::const_iterator p = statfs_ops.begin();
+  for (map<ceph_tid_t, StatfsOp*>::const_iterator p = statfs_ops.begin();
        p != statfs_ops.end();
        ++p) {
     StatfsOp *op = p->second;
@@ -2711,7 +2711,7 @@ void Objecter::blacklist_self(bool set)
 
 void Objecter::handle_command_reply(MCommandReply *m)
 {
-  map<tid_t,CommandOp*>::iterator p = command_ops.find(m->get_tid());
+  map<ceph_tid_t,CommandOp*>::iterator p = command_ops.find(m->get_tid());
   if (p == command_ops.end()) {
     ldout(cct, 10) << "handle_command_reply tid " << m->get_tid() << " not found" << dendl;
     m->put();
@@ -2734,20 +2734,20 @@ void Objecter::handle_command_reply(MCommandReply *m)
 
 class C_CancelCommandOp : public Context
 {
-  tid_t tid;
+  ceph_tid_t tid;
   Objecter *objecter;
 public:
-  C_CancelCommandOp(tid_t tid, Objecter *objecter) : tid(tid),
-                                                    objecter(objecter) {}
+  C_CancelCommandOp(ceph_tid_t tid, Objecter *objecter) : tid(tid),
+                                                         objecter(objecter) {}
   void finish(int r) {
     // note that objecter lock == timer lock, and is already held
     objecter->command_op_cancel(tid, -ETIMEDOUT);
   }
 };
 
-int Objecter::_submit_command(CommandOp *c, tid_t *ptid)
+int Objecter::_submit_command(CommandOp *c, ceph_tid_t *ptid)
 {
-  tid_t tid = ++last_tid;
+  ceph_tid_t tid = ++last_tid;
   ldout(cct, 10) << "_submit_command " << tid << " " << c->cmd << dendl;
   c->tid = tid;
   if (osd_timeout > 0) {
@@ -2828,12 +2828,12 @@ void Objecter::_send_command(CommandOp *c)
   logger->inc(l_osdc_command_send);
 }
 
-int Objecter::command_op_cancel(tid_t tid, int r)
+int Objecter::command_op_cancel(ceph_tid_t tid, int r)
 {
   assert(client_lock.is_locked());
   assert(initialized);
 
-  map<tid_t, CommandOp*>::iterator it = command_ops.find(tid);
+  map<ceph_tid_t, CommandOp*>::iterator it = command_ops.find(tid);
   if (it == command_ops.end()) {
     ldout(cct, 10) << __func__ << " tid " << tid << " dne" << dendl;
     return -ENOENT;
index 2311f55ce3676f82313811d04f54239ada4e88f5..da8c430224a41a6b1d766eed8ccc1cced2edde4b 100644 (file)
@@ -1013,7 +1013,7 @@ public:
   bool initialized;
 
 private:
-  tid_t last_tid;
+  ceph_tid_t last_tid;
   int client_inc;
   uint64_t max_linger_id;
   int num_unacked;
@@ -1095,7 +1095,7 @@ public:
     int flags, priority;
     Context *onack, *oncommit, *ontimeout;
 
-    tid_t tid;
+    ceph_tid_t tid;
     eversion_t replay_version;        // for op replay
     int attempts;
 
@@ -1158,9 +1158,9 @@ public:
 
   struct C_Op_Map_Latest : public Context {
     Objecter *objecter;
-    tid_t tid;
+    ceph_tid_t tid;
     version_t latest;
-    C_Op_Map_Latest(Objecter *o, tid_t t) : objecter(o), tid(t), latest(0) {}
+    C_Op_Map_Latest(Objecter *o, ceph_tid_t t) : objecter(o), tid(t), latest(0) {}
     void finish(int r);
   };
 
@@ -1168,7 +1168,7 @@ public:
     Objecter *objecter;
     uint64_t tid;
     version_t latest;
-    C_Command_Map_Latest(Objecter *o, tid_t t) :  objecter(o), tid(t), latest(0) {}
+    C_Command_Map_Latest(Objecter *o, ceph_tid_t t) :  objecter(o), tid(t), latest(0) {}
     void finish(int r);
   };
 
@@ -1263,7 +1263,7 @@ public:
   };
   
   struct PoolStatOp {
-    tid_t tid;
+    ceph_tid_t tid;
     list<string> pools;
 
     map<string,pool_stat_t> *pool_stats;
@@ -1273,7 +1273,7 @@ public:
   };
 
   struct StatfsOp {
-    tid_t tid;
+    ceph_tid_t tid;
     struct ceph_statfs *stats;
     Context *onfinish, *ontimeout;
 
@@ -1281,7 +1281,7 @@ public:
   };
 
   struct PoolOp {
-    tid_t tid;
+    ceph_tid_t tid;
     int64_t pool;
     string name;
     Context *onfinish, *ontimeout;
@@ -1300,7 +1300,7 @@ public:
   struct CommandOp : public RefCountedObject {
     xlist<CommandOp*>::item session_item;
     OSDSession *session;
-    tid_t tid;
+    ceph_tid_t tid;
     vector<string> cmd;
     bufferlist inbl;
     bufferlist *poutbl;
@@ -1322,10 +1322,10 @@ public:
        onfinish(NULL), ontimeout(NULL) {}
   };
 
-  int _submit_command(CommandOp *c, tid_t *ptid);
+  int _submit_command(CommandOp *c, ceph_tid_t *ptid);
   int recalc_command_target(CommandOp *c);
   void _send_command(CommandOp *c);
-  int command_op_cancel(tid_t tid, int r);
+  int command_op_cancel(ceph_tid_t tid, int r);
   void _finish_command(CommandOp *c, int r, string rs);
   void handle_command_reply(MCommandReply *m);
 
@@ -1357,7 +1357,7 @@ public:
     OSDSession *session;
     xlist<LingerOp*>::item session_item;
 
-    tid_t register_tid;
+    ceph_tid_t register_tid;
     epoch_t map_dne_bound;
 
     LingerOp() : linger_id(0), primary(-1),
@@ -1429,19 +1429,19 @@ public:
 
  private:
   // pending ops
-  map<tid_t,Op*>            ops;
+  map<ceph_tid_t,Op*>       ops;
   int                       num_homeless_ops;
   map<uint64_t, LingerOp*>  linger_ops;
-  map<tid_t,PoolStatOp*>    poolstat_ops;
-  map<tid_t,StatfsOp*>      statfs_ops;
-  map<tid_t,PoolOp*>        pool_ops;
-  map<tid_t,CommandOp*>     command_ops;
+  map<ceph_tid_t,PoolStatOp*>    poolstat_ops;
+  map<ceph_tid_t,StatfsOp*>      statfs_ops;
+  map<ceph_tid_t,PoolOp*>        pool_ops;
+  map<ceph_tid_t,CommandOp*>     command_ops;
 
   // ops waiting for an osdmap with a new pool or confirmation that
   // the pool does not exist (may be expanded to other uses later)
-  map<uint64_t, LingerOp*>  check_latest_map_lingers;
-  map<tid_t, Op*>           check_latest_map_ops;
-  map<tid_t, CommandOp*>    check_latest_map_commands;
+  map<uint64_t, LingerOp*>       check_latest_map_lingers;
+  map<ceph_tid_t, Op*>           check_latest_map_ops;
+  map<ceph_tid_t, CommandOp*>    check_latest_map_commands;
 
   map<epoch_t,list< pair<Context*, int> > > waiting_for_map;
 
@@ -1565,9 +1565,9 @@ public:
 
   void scan_requests(bool force_resend,
                     bool force_resend_writes,
-                    map<tid_t, Op*>& need_resend,
+                    map<ceph_tid_t, Op*>& need_resend,
                     list<LingerOp*>& need_resend_linger,
-                    map<tid_t, CommandOp*>& need_resend_command);
+                    map<ceph_tid_t, CommandOp*>& need_resend_command);
 
   int64_t get_object_hash_position(int64_t pool, const string& key, const string& ns);
   int64_t get_object_pg_hash_position(int64_t pool, const string& key, const string& ns);
@@ -1581,12 +1581,12 @@ public:
 
 private:
   // low-level
-  tid_t _op_submit(Op *op);
+  ceph_tid_t _op_submit(Op *op);
   inline void unregister_op(Op *op);
 
   // public interface
 public:
-  tid_t op_submit(Op *op);
+  ceph_tid_t op_submit(Op *op);
   bool is_active() {
     return !(ops.empty() && linger_ops.empty() && poolstat_ops.empty() && statfs_ops.empty());
   }
@@ -1618,11 +1618,11 @@ public:
   void clear_global_op_flag(int flags) { global_op_flags &= ~flags; }
 
   /// cancel an in-progress request with the given return code
-  int op_cancel(tid_t tid, int r);
+  int op_cancel(ceph_tid_t tid, int r);
 
   // commands
   int osd_command(int osd, vector<string>& cmd,
-                 const bufferlist& inbl, tid_t *ptid,
+                 const bufferlist& inbl, ceph_tid_t *ptid,
                  bufferlist *poutbl, string *prs, Context *onfinish) {
     assert(osd >= 0);
     CommandOp *c = new CommandOp;
@@ -1635,7 +1635,7 @@ public:
     return _submit_command(c, ptid);
   }
   int pg_command(pg_t pgid, vector<string>& cmd,
-                const bufferlist& inbl, tid_t *ptid,
+                const bufferlist& inbl, ceph_tid_t *ptid,
                 bufferlist *poutbl, string *prs, Context *onfinish) {
     CommandOp *c = new CommandOp;
     c->cmd = cmd;
@@ -1648,7 +1648,7 @@ public:
   }
 
   // mid-level helpers
-  Op *prepare_mutate_op(const object_t& oid, const object_locator_t& oloc, 
+  Op *prepare_mutate_op(const object_t& oid, const object_locator_t& oloc,
               ObjectOperation& op,
               const SnapContext& snapc, utime_t mtime, int flags,
               Context *onack, Context *oncommit, version_t *objver = NULL) {
@@ -1659,7 +1659,7 @@ public:
     o->out_rval.swap(op.out_rval);
     return o;
   }
-  tid_t mutate(const object_t& oid, const object_locator_t& oloc, 
+  ceph_tid_t mutate(const object_t& oid, const object_locator_t& oloc,
               ObjectOperation& op,
               const SnapContext& snapc, utime_t mtime, int flags,
               Context *onack, Context *oncommit, version_t *objver = NULL) {
@@ -1679,14 +1679,14 @@ public:
     o->out_rval.swap(op.out_rval);
     return o;
   }
-  tid_t read(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t read(const object_t& oid, const object_locator_t& oloc,
             ObjectOperation& op,
             snapid_t snapid, bufferlist *pbl, int flags,
             Context *onack, version_t *objver = NULL) {
     Op *o = prepare_read_op(oid, oloc, op, snapid, pbl, flags, onack, objver);
     return op_submit(o);
   }
-  tid_t pg_read(uint32_t hash, object_locator_t oloc,
+  ceph_tid_t pg_read(uint32_t hash, object_locator_t oloc,
                ObjectOperation& op,
                bufferlist *pbl, int flags,
                Context *onack,
@@ -1705,13 +1705,13 @@ public:
     o->reply_epoch = reply_epoch;
     return op_submit(o);
   }
-  tid_t linger_mutate(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t linger_mutate(const object_t& oid, const object_locator_t& oloc,
                      ObjectOperation& op,
                      const SnapContext& snapc, utime_t mtime,
                      bufferlist& inbl, int flags,
                      Context *onack, Context *onfinish,
                      version_t *objver);
-  tid_t linger_read(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t linger_read(const object_t& oid, const object_locator_t& oloc,
                    ObjectOperation& op,
                    snapid_t snap, bufferlist& inbl, bufferlist *poutbl, int flags,
                    Context *onack,
@@ -1746,7 +1746,7 @@ public:
 
 
   // high-level helpers
-  tid_t stat(const object_t& oid, const object_locator_t& oloc, snapid_t snap,
+  ceph_tid_t stat(const object_t& oid, const object_locator_t& oloc, snapid_t snap,
             uint64_t *psize, utime_t *pmtime, int flags, 
             Context *onfinish,
             version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1760,7 +1760,7 @@ public:
     return op_submit(o);
   }
 
-  tid_t read(const object_t& oid, const object_locator_t& oloc, 
+  ceph_tid_t read(const object_t& oid, const object_locator_t& oloc,
             uint64_t off, uint64_t len, snapid_t snap, bufferlist *pbl, int flags,
             Context *onfinish,
             version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1777,7 +1777,7 @@ public:
     return op_submit(o);
   }
 
-  tid_t read_trunc(const object_t& oid, const object_locator_t& oloc, 
+  ceph_tid_t read_trunc(const object_t& oid, const object_locator_t& oloc,
             uint64_t off, uint64_t len, snapid_t snap, bufferlist *pbl, int flags,
             uint64_t trunc_size, __u32 trunc_seq,
             Context *onfinish,
@@ -1794,7 +1794,7 @@ public:
     o->outbl = pbl;
     return op_submit(o);
   }
-  tid_t mapext(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t mapext(const object_t& oid, const object_locator_t& oloc,
             uint64_t off, uint64_t len, snapid_t snap, bufferlist *pbl, int flags,
             Context *onfinish,
             version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1810,7 +1810,7 @@ public:
     o->outbl = pbl;
     return op_submit(o);
   }
-  tid_t getxattr(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t getxattr(const object_t& oid, const object_locator_t& oloc,
             const char *name, snapid_t snap, bufferlist *pbl, int flags,
             Context *onfinish,
             version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1827,7 +1827,7 @@ public:
     return op_submit(o);
   }
 
-  tid_t getxattrs(const object_t& oid, const object_locator_t& oloc, snapid_t snap,
+  ceph_tid_t getxattrs(const object_t& oid, const object_locator_t& oloc, snapid_t snap,
                  map<string,bufferlist>& attrset,
                  int flags, Context *onfinish,
                  version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1841,7 +1841,7 @@ public:
     return op_submit(o);
   }
 
-  tid_t read_full(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t read_full(const object_t& oid, const object_locator_t& oloc,
                  snapid_t snap, bufferlist *pbl, int flags,
                  Context *onfinish,
                  version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1850,7 +1850,7 @@ public:
 
      
   // writes
-  tid_t _modify(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t _modify(const object_t& oid, const object_locator_t& oloc,
                vector<OSDOp>& ops, utime_t mtime,
                const SnapContext& snapc, int flags,
                Context *onack, Context *oncommit,
@@ -1860,7 +1860,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t write(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
              uint64_t off, uint64_t len, const SnapContext& snapc, const bufferlist &bl,
              utime_t mtime, int flags,
              Context *onack, Context *oncommit,
@@ -1878,7 +1878,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t append(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t append(const object_t& oid, const object_locator_t& oloc,
               uint64_t len, const SnapContext& snapc, const bufferlist &bl,
               utime_t mtime, int flags,
               Context *onack, Context *oncommit,
@@ -1896,7 +1896,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t write_trunc(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t write_trunc(const object_t& oid, const object_locator_t& oloc,
              uint64_t off, uint64_t len, const SnapContext& snapc, const bufferlist &bl,
              utime_t mtime, int flags,
              uint64_t trunc_size, __u32 trunc_seq,
@@ -1915,7 +1915,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t write_full(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t write_full(const object_t& oid, const object_locator_t& oloc,
                   const SnapContext& snapc, const bufferlist &bl, utime_t mtime, int flags,
                   Context *onack, Context *oncommit,
                   version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1930,7 +1930,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t trunc(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t trunc(const object_t& oid, const object_locator_t& oloc,
              const SnapContext& snapc,
              utime_t mtime, int flags,
              uint64_t trunc_size, __u32 trunc_seq,
@@ -1947,7 +1947,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t zero(const object_t& oid, const object_locator_t& oloc, 
+  ceph_tid_t zero(const object_t& oid, const object_locator_t& oloc,
             uint64_t off, uint64_t len, const SnapContext& snapc, utime_t mtime, int flags,
              Context *onack, Context *oncommit,
             version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1961,7 +1961,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t rollback_object(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t rollback_object(const object_t& oid, const object_locator_t& oloc,
                 const SnapContext& snapc, snapid_t snapid,
                 utime_t mtime, Context *onack, Context *oncommit,
                 version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -1974,7 +1974,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t create(const object_t& oid, const object_locator_t& oloc, 
+  ceph_tid_t create(const object_t& oid, const object_locator_t& oloc,
             const SnapContext& snapc, utime_t mtime,
              int global_flags, int create_flags,
              Context *onack, Context *oncommit,
@@ -1988,7 +1988,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t remove(const object_t& oid, const object_locator_t& oloc, 
+  ceph_tid_t remove(const object_t& oid, const object_locator_t& oloc,
               const SnapContext& snapc, utime_t mtime, int flags,
               Context *onack, Context *oncommit,
               version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
@@ -2001,7 +2001,7 @@ public:
     return op_submit(o);
   }
 
-  tid_t lock(const object_t& oid, const object_locator_t& oloc, int op, int flags,
+  ceph_tid_t lock(const object_t& oid, const object_locator_t& oloc, int op, int flags,
             Context *onack, Context *oncommit, version_t *objver = NULL, ObjectOperation *extra_ops = NULL) {
     SnapContext snapc;  // no snapc for lock ops
     vector<OSDOp> ops;
@@ -2011,7 +2011,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t setxattr(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t setxattr(const object_t& oid, const object_locator_t& oloc,
              const char *name, const SnapContext& snapc, const bufferlist &bl,
              utime_t mtime, int flags,
              Context *onack, Context *oncommit,
@@ -2029,7 +2029,7 @@ public:
     o->snapc = snapc;
     return op_submit(o);
   }
-  tid_t removexattr(const object_t& oid, const object_locator_t& oloc,
+  ceph_tid_t removexattr(const object_t& oid, const object_locator_t& oloc,
              const char *name, const SnapContext& snapc,
              utime_t mtime, int flags,
              Context *onack, Context *oncommit,
@@ -2067,7 +2067,7 @@ public:
   int change_pool_auid(int64_t pool, Context *onfinish, uint64_t auid);
 
   void handle_pool_op_reply(MPoolOpReply *m);
-  int pool_op_cancel(tid_t tid, int r);
+  int pool_op_cancel(ceph_tid_t tid, int r);
   void finish_pool_op(PoolOp *op);
 
   // --------------------------
@@ -2078,7 +2078,7 @@ public:
   void handle_get_pool_stats_reply(MGetPoolStatsReply *m);
   void get_pool_stats(list<string>& pools, map<string,pool_stat_t> *result,
                      Context *onfinish);
-  int pool_stat_op_cancel(tid_t tid, int r);
+  int pool_stat_op_cancel(ceph_tid_t tid, int r);
   void finish_pool_stat_op(PoolStatOp *op);
 
   // ---------------------------
@@ -2088,7 +2088,7 @@ private:
 public:
   void handle_fs_stats_reply(MStatfsReply *m);
   void get_fs_stats(struct ceph_statfs& result, Context *onfinish);
-  int statfs_op_cancel(tid_t tid, int r);
+  int statfs_op_cancel(ceph_tid_t tid, int r);
   void finish_statfs_op(StatfsOp *op);
 
   // ---------------------------
index 17e1f683bec0b9f19c82cfc778ea1e35edb734f7..4869837306858521218495afa3b199ce8df92230 100644 (file)
@@ -28,12 +28,13 @@ class WritebackHandler {
    * @param snapid read snapid
    */
   virtual bool may_copy_on_write(const object_t& oid, uint64_t read_off, uint64_t read_len, snapid_t snapid) = 0;
-  virtual tid_t write(const object_t& oid, const object_locator_t& oloc,
-                     uint64_t off, uint64_t len, const SnapContext& snapc,
-                     const bufferlist &bl, utime_t mtime, uint64_t trunc_size,
-                     __u32 trunc_seq, Context *oncommit) = 0;
-  virtual tid_t lock(const object_t& oid, const object_locator_t& oloc, int op,
-                    int flags, Context *onack, Context *oncommit) {
+  virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
+                          uint64_t off, uint64_t len, const SnapContext& snapc,
+                          const bufferlist &bl, utime_t mtime,
+                          uint64_t trunc_size, __u32 trunc_seq,
+                          Context *oncommit) = 0;
+  virtual ceph_tid_t lock(const object_t& oid, const object_locator_t& oloc,
+                         int op, int flags, Context *onack, Context *oncommit) {
     assert(0 == "this WritebackHandler does not support the lock operation");
   }
 };
index b4cd35ea9790ea98073dda9a34f0a06a8bbf473e..7c678cf43d8b60ca028e00461cf6948f40726ee0 100644 (file)
@@ -68,7 +68,7 @@ void FakeWriteback::read(const object_t& oid,
   m_finisher->queue(wrapper, len);
 }
 
-tid_t FakeWriteback::write(const object_t& oid,
+ceph_tid_t FakeWriteback::write(const object_t& oid,
                           const object_locator_t& oloc,
                           uint64_t off, uint64_t len,
                           const SnapContext& snapc,
index e7d6dc16bb469706c24f985a5aefc1b61188a7e6..2b7fbd679116d025a0718f2c73c4f17b6d3622e5 100644 (file)
@@ -22,10 +22,11 @@ public:
                    bufferlist *pbl, uint64_t trunc_size,  __u32 trunc_seq,
                    Context *onfinish);
 
-  virtual tid_t write(const object_t& oid, const object_locator_t& oloc,
-                     uint64_t off, uint64_t len, const SnapContext& snapc,
-                     const bufferlist &bl, utime_t mtime, uint64_t trunc_size,
-                     __u32 trunc_seq, Context *oncommit);
+  virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc,
+                          uint64_t off, uint64_t len,
+                          const SnapContext& snapc, const bufferlist &bl,
+                          utime_t mtime, uint64_t trunc_size,
+                          __u32 trunc_seq, Context *oncommit);
 
   virtual bool may_copy_on_write(const object_t&, uint64_t, uint64_t, snapid_t);
 private: