]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: assign per-Sequencer seq to each TransContext
authorSage Weil <sage@redhat.com>
Mon, 21 Mar 2016 18:09:35 +0000 (14:09 -0400)
committerSage Weil <sage@redhat.com>
Wed, 30 Mar 2016 15:23:14 +0000 (11:23 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.h

index 860ff79c9939db493aa187b8dd589ee5a8a990c9..d21dc05ed194e9909f8a00f7213f2ef4deec0fde 100644 (file)
@@ -312,6 +312,7 @@ public:
 
     CollectionRef first_collection;  ///< first referenced collection
 
+    uint64_t seq = 0;
     utime_t start;
 
     explicit TransContext(OpSequencer *o)
@@ -367,6 +368,8 @@ public:
     std::mutex wal_apply_mutex;
     std::unique_lock<std::mutex> wal_apply_lock;
 
+    uint64_t last_seq = 0;
+
     OpSequencer()
        //set the qlock to to PTHREAD_MUTEX_RECURSIVE mode
       : parent(NULL),
@@ -378,6 +381,7 @@ public:
 
     void queue_new(TransContext *txc) {
       std::lock_guard<std::mutex> l(qlock);
+      txc->seq = ++last_seq;
       q.push_back(*txc);
     }