]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/newstore: renamed TransContext::fds -> sync_items
authorSage Weil <sage@redhat.com>
Sat, 2 May 2015 23:29:24 +0000 (16:29 -0700)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:43 +0000 (13:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/newstore/NewStore.cc
src/os/newstore/NewStore.h

index 5a5f730ad86058ffe92086bddc339747fb4bb745..26a93722ba1eeb297fe4307af5b67f06552c7725 100644 (file)
@@ -2068,7 +2068,7 @@ void NewStore::_txc_state_proc(TransContext *txc)
       // ** fall-thru **
 
     case TransContext::STATE_AIO_WAIT:
-      if (!txc->fds.empty()) {
+      if (!txc->sync_items.empty()) {
        txc->state = TransContext::STATE_FSYNC_WAIT;
        if (!g_conf->newstore_sync_io) {
          _txc_queue_fsync(txc);
@@ -2222,8 +2222,8 @@ void NewStore::_txc_queue_fsync(TransContext *txc)
 {
   dout(20) << __func__ << " txc " << txc << dendl;
   fsync_wq.lock();
-  for (list<fsync_item>::iterator p = txc->fds.begin();
-       p != txc->fds.end();
+  for (list<fsync_item>::iterator p = txc->sync_items.begin();
+       p != txc->sync_items.end();
        ++p) {
     fsync_wq._enqueue(&*p);
     fsync_wq._wake();
@@ -2234,8 +2234,8 @@ void NewStore::_txc_queue_fsync(TransContext *txc)
 void NewStore::_txc_do_sync_fsync(TransContext *txc)
 {
   dout(20) << __func__ << " txc " << txc << dendl;
-  for (list<fsync_item>::iterator p = txc->fds.begin();
-       p != txc->fds.end(); ++p) {
+  for (list<fsync_item>::iterator p = txc->sync_items.begin();
+       p != txc->sync_items.end(); ++p) {
     dout(30) << __func__ << " fsync " << p->fd << dendl;
     int r = ::fdatasync(p->fd);
     if (r < 0) {
index 6d6a28dabfe8050436fe64055851414fd4b12c7a..a399bc046237527e460bc62653c7994c872aa3e2 100644 (file)
@@ -187,7 +187,7 @@ public:
 
     uint64_t ops, bytes;
 
-    list<fsync_item> fds;     ///< these fds need to be synced
+    list<fsync_item> sync_items; ///< these fds need to be synced
     set<OnodeRef> onodes;     ///< these onodes need to be updated/written
     KeyValueDB::Transaction t; ///< then we will commit this
     Context *oncommit;         ///< signal on commit
@@ -230,7 +230,7 @@ public:
     }
 
     void sync_fd(int f) {
-      fds.push_back(fsync_item(f, this));
+      sync_items.push_back(fsync_item(f, this));
     }
     void write_onode(OnodeRef &o) {
       onodes.insert(o);
@@ -239,7 +239,7 @@ public:
     bool finish_fsync() {
       Mutex::Locker l(lock);
       ++num_fsyncs_completed;
-      if (num_fsyncs_completed == fds.size()) {
+      if (num_fsyncs_completed == sync_items.size()) {
        cond.Signal();
        return true;
       }
@@ -247,7 +247,7 @@ public:
     }
     void wait_fsync() {
       Mutex::Locker l(lock);
-      while (num_fsyncs_completed < fds.size())
+      while (num_fsyncs_completed < sync_items.size())
        cond.Wait(lock);
     }
   };