]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os: FileJournal:: fix, uninitialization of FileJournal throttle 3131/head
authorNing Yao <zay11022@gmail.com>
Wed, 10 Dec 2014 04:50:44 +0000 (04:50 +0000)
committerNing Yao <zay11022@gmail.com>
Wed, 10 Dec 2014 04:50:44 +0000 (04:50 +0000)
Since after firefly, take() in class throttle add if(0 == max.read()) return. If throttle is not initialized with max throttle value, it actually does not work. So initialize it in FileJournal

Signed-off-by: Ning Yao <zay11022@gmail.com>
src/os/FileJournal.h

index 878b9094b6687f6083ab9cd59649a8bd3a360f04..fa0b8876bf9dd27439d98122c0b4cd1a51e26170 100644 (file)
@@ -379,8 +379,8 @@ private:
     full_state(FULL_NOTFULL),
     fd(-1),
     writing_seq(0),
-    throttle_ops(g_ceph_context, "filestore_ops"),
-    throttle_bytes(g_ceph_context, "filestore_bytes"),
+    throttle_ops(g_ceph_context, "filestore_ops", g_conf->journal_queue_max_ops),
+    throttle_bytes(g_ceph_context, "filestore_bytes", g_conf->journal_queue_max_bytes),
     write_lock("FileJournal::write_lock", false, true, false, g_ceph_context),
     write_stop(false),
     aio_stop(false),