From 2f193fb931ed09d921e6fa5a985ab87aa4874589 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 20 May 2013 13:34:27 -0700 Subject: [PATCH 1/2] debian: stop sysvinit on ceph.prerm Signed-off-by: Sage Weil --- debian/ceph.prerm | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/ceph.prerm b/debian/ceph.prerm index 557a1dbdac052..4aac21400a9aa 100644 --- a/debian/ceph.prerm +++ b/debian/ceph.prerm @@ -1,5 +1,6 @@ #!/bin/sh [ -x /sbin/stop ] && stop ceph-all || : +[ -x /usr/sbin/service ] && service ceph stop || : exit 0 \ No newline at end of file From 1c7b9c35053d26b556a247297da127ff0d6aa07d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 21 May 2013 08:16:56 -0700 Subject: [PATCH 2/2] os/LevelDBStore: fix compression selection We were always disabling compression. Fixes: #5131 Reported-by: Sylvain Munaut Signed-off-by: Sage Weil --- src/os/LevelDBStore.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/os/LevelDBStore.cc b/src/os/LevelDBStore.cc index 612063cf48141..ff6c557574d2a 100644 --- a/src/os/LevelDBStore.cc +++ b/src/os/LevelDBStore.cc @@ -34,14 +34,15 @@ int LevelDBStore::init(ostream &out, bool create_if_missing) assert(0 == "bloom size set but installed leveldb doesn't support bloom filters"); #endif } - if (!options.compression_enabled) + if (options.compression_enabled) + ldoptions.compression = leveldb::kSnappyCompression; + else ldoptions.compression = leveldb::kNoCompression; if (options.block_restart_interval) ldoptions.block_restart_interval = options.block_restart_interval; ldoptions.error_if_exists = options.error_if_exists; ldoptions.paranoid_checks = options.paranoid_checks; - ldoptions.compression = leveldb::kNoCompression; ldoptions.create_if_missing = create_if_missing; if (options.log_file.length()) {