]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore::sync_entry check for stop in after wait 9105/head
authorKefu Chai <kchai@redhat.com>
Tue, 3 May 2016 09:20:04 +0000 (17:20 +0800)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Thu, 12 May 2016 16:20:45 +0000 (21:50 +0530)
there is chance that the sync_entry() gets signaled in the
WaitInterval(max_interval) call because of sync_cond.Signal() call after
"stop = true" in umount(), so without this change, sync_entry() will
continue wait until min_interval is reached. this forces umount() to
wait even it has called d_force_sync(), and hence slows down the
progress of umount(). so we need to check for `stop` if we are not
signalled because of `force_sync`.

Fixes: http://tracker.ceph.com/issues/15695
Reported-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 65426a522d9d052fd7c38964f143087f277816c5)

src/os/filestore/FileStore.cc

index 95a4f5f7f0c2316845434c17d26583e251abb085..5f6d68de7189eee22ac8d8d015451946ed319a88 100644 (file)
@@ -3695,6 +3695,9 @@ void FileStore::sync_entry()
     if (force_sync) {
       dout(20) << "sync_entry force_sync set" << dendl;
       force_sync = false;
+    } else if (stop) {
+      dout(20) << __func__ << " stop set" << dendl;
+      break;
     } else {
       // wait for at least the min interval
       utime_t woke = ceph_clock_now(g_ceph_context);