]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
reset max if runtime configure change 5339/head
authorxinxin shu <xinxin.shu@intel.com>
Wed, 29 Jul 2015 22:49:13 +0000 (06:49 +0800)
committerxinxin shu <xinxin.shu@intel.com>
Fri, 31 Jul 2015 06:09:35 +0000 (14:09 +0800)
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
src/common/Throttle.h
src/os/FileStore.cc
src/os/KeyValueStore.cc

index ae09a04fe6f0aef76742b828141c4dc3db1ffb11..2faea594d96ed951a734c2b3a3f0f538d3533dbe 100644 (file)
@@ -103,6 +103,10 @@ public:
   bool should_wait(int64_t c) const {
     return _should_wait(c);
   }
+  void reset_max(int64_t m) {
+    Mutex::Locker l(lock);
+    _reset_max(m);
+  }
 };
 
 
index 0e771747b609359a8d42ba181aef2da0025e5e73..560f7c6127526e617ebbe1934d4481d7745ad977 100644 (file)
@@ -5524,6 +5524,8 @@ void FileStore::handle_conf_change(const struct md_config_t *conf,
     m_filestore_sloppy_crc = conf->filestore_sloppy_crc;
     m_filestore_sloppy_crc_block_size = conf->filestore_sloppy_crc_block_size;
     m_filestore_max_alloc_hint_size = conf->filestore_max_alloc_hint_size;
+    throttle_ops.reset_max(conf->filestore_queue_max_ops);
+    throttle_bytes.reset_max(conf->filestore_queue_max_bytes);
   }
   if (changed.count("filestore_commit_timeout")) {
     Mutex::Locker l(sync_entry_timeo_lock);
index 5abe3186c81021fe18d2c698840498019a0e98e6..5b429a09f3f23556b04697f445d88893422898d1 100644 (file)
@@ -2939,6 +2939,8 @@ void KeyValueStore::handle_conf_change(const struct md_config_t *conf,
     m_keyvaluestore_queue_max_ops = conf->keyvaluestore_queue_max_ops;
     m_keyvaluestore_queue_max_bytes = conf->keyvaluestore_queue_max_bytes;
     m_keyvaluestore_max_expected_write_size = conf->keyvaluestore_max_expected_write_size;
+    throttle_ops.reset_max(conf->keyvaluestore_queue_max_ops);
+    throttle_bytes.reset_max(conf->keyvaluestore_queue_max_bytes);
   }
   if (changed.count("keyvaluestore_default_strip_size")) {
     m_keyvaluestore_strip_size = conf->keyvaluestore_default_strip_size;