From c7d281b83142d2608a2d5b45add9c95a51293375 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 19 Aug 2015 07:04:07 -0400 Subject: [PATCH] os/FileStore: ensure sync() doesn't wait forever Avoid 2015-08-19 01:46:37.586450 7f89a53ca980 10 filestore(b.10) start_sync 2015-08-19 01:46:37.586451 7f89a53ca980 10 filestore(b.10) sync waiting 2015-08-19 01:46:37.586528 7f899e2b1700 20 filestore(b.10) sync_entry woke after 5.398564 2015-08-19 01:46:37.586539 7f899e2b1700 20 filestore(b.10) sync_entry waiting for another 35994.601435 to reach min interval 36000.000000 by setting force_sync flag. Signed-off-by: Sage Weil --- src/os/FileStore.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index f9d5554db8447..de66229ea35b1 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -3768,6 +3768,7 @@ void FileStore::start_sync(Context *onsafe) Mutex::Locker l(lock); sync_waiters.push_back(onsafe); sync_cond.Signal(); + force_sync = true; dout(10) << "start_sync" << dendl; } -- 2.39.5